ios - 将flutter项目导入MacOS并运行时出现Info.plist错误
问题描述
我运行了我的颤振项目,但它给了我这个错误:
Error: unable to read property list from file: /Users/myname/Developer/appname/ios/Runner/Info.plist:
The operation couldn't be completed. (XCBUtil.PropertyListConversionError error 1.)
这是我的 Info.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>https</string>
<string>http</string>
<string>tel</string>
<string>mailto</string>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>apitesting</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>io.flutter.embedded_views_preview</key>
<String>YES<String>
</dict>
</plist>
该应用程序通过 Android 模拟器在 VS Code 上运行良好,但是当我在 Xcode 中运行项目时,它给出了这个错误。当我不得不对其进行一些配置时,我自己进行了一些编辑:
我添加的 LSApplicationQueriesSchemes 和“https、http、tel、mailto”是因为我的一个包需要它。
解决方案
好的,我发现了错误。我使用的依赖项(WebView)在不应该大写的情况下将字符串大写时出错。他们也忘记在 YES 字符串周围加上引号。
推荐阅读
- java - 类似Node Js的Java中拼接一个ArrayList
- django - 处理 TypeError:不支持从 NoneType 到 Decimal 的转换
- ansible - Ansible 社区模块未执行
- angular - 通过组件之间的路由链接传递数组
- pip - 我无法使用命令提示符和 pip install ChatterBot 安装模块 ChatterBot
- javascript - 如何终止 node.js 中的循环?
- regex - 使用正则表达式清理 url 路径
- php - 使用 echo 将变量插入到 img url
- interceptor - BigBlueButton 校验和绕过?
- python - 返回多个复选框输入的函数未在 Django 中呈现