Ios 在我的应用程序中使用Mapbox sdk时,无法从文件Info.plist读取属性列表

Ios 在我的应用程序中使用Mapbox sdk时,无法从文件Info.plist读取属性列表,ios,flutter,dart,error-handling,info.plist,Ios,Flutter,Dart,Error Handling,Info.plist,我在我的一个Flitter应用程序中遇到了一个问题。Im使用的是MapBox SDK插件,但当我在IOS上测试应用程序时,它要求我将MapBox SDK更新到某个版本(我使用pop安装命令进行了更新)。现在,在我的info.plist文件中,我面临着新的错误。我忘了备份我的旧info.plist文件。 无论如何,新的info.plist是: <plist version="1.0"> <dict> <string>YES</string> <

我在我的一个Flitter应用程序中遇到了一个问题。Im使用的是MapBox SDK插件,但当我在IOS上测试应用程序时,它要求我将MapBox SDK更新到某个版本(我使用pop安装命令进行了更新)。现在,在我的info.plist文件中,我面临着新的错误。我忘了备份我的旧info.plist文件。 无论如何,新的info.plist是:

<plist version="1.0">
<dict>
<string>YES</string>
<key>io.flutter.embedded_views_preview</key>
<true/>
<key>MGLMapboxAccessToken</key>
<string>Mapbox-key-not-visible</string>
<true/>
<key>NSLocationWhenInUseUsageDescription</key>
<key>NSLocationAlwaysUsageDescription</key>
<key>NSPhotoLibraryUsageDescription</key>
<key>NSCameraUsageDescription</key>
<key>NSMicrophoneUsageDescription</key>
<string>This app needs access to location when open.</string>
<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>project1</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/>
</dict>
</plist

对
io.flatter.embedded\u视图\u预览
MGLMapboxAccessToken
映射框键不可见
NSLocationWhenUse用途说明
N位置始终使用说明
NSPhotoLibraryUsageDescription
NSCameraUsageDescription
NSM话筒用途说明
此应用在打开时需要访问位置。
CfBundledDevelopmentRegion
$(开发语言)
Cbundlexecutable
$(可执行文件名称)
CbundleIdentifier
$(产品\捆绑包\标识符)
CbundleInfo字典版本
6
CFBundleName
项目1
CbundlePackageType
应用
CbundleShortVersionString
$(颤振\u构建\u名称)
CFBundleSignature
????
循环流化床锅炉
$(颤振/建造/编号)
LSREQUIRESPHONEOS
UILaunchStoryboardName
发射屏
UIMainstryBoardFile
主要
UI支持接口方向
UIInterfaceOrientationPortrait
UIInterface方向和左视图
UIInterfaceOrientationAndscapeRight
UI支持界面方向~ipad
UIInterfaceOrientationPortrait
UIInterfaceOrientation上下方向图
UIInterface方向和左视图
UIInterfaceOrientationAndscapeRight
UIViewControllerBasedStatusBarAppearance

错误
错误:无法从文件Info.plist中读取属性列表通常是由于plist文件缺少配置造成的。如前所述,您需要在
nslocationwhenUsageDescription
上设置一个值。更多细节将在中解释

n不使用时的位置说明
[你的解释在这里]

如果不使用usagedescription
的话,您没有
nslocation的值,我想这就是problem@Dimitar你是救世主!
Users/apple/flutter-practice/Project-Casky/casky/ios/Runner/Info.plist: Property List       error: Found non-key inside <dict> at line 10 / JSON error: JSON text did not start with array or object and option to allow fragments not set.
Xcode build done.                                           24.2s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
error: unable to read property list from file: /Users/apple/flutter-practice/Project-  Casky/casky/ios/Runner/Info.plist: The operation couldn’t be completed.  (XCBUtil.PropertyListConversionError error 1.) (in target 'Runner' from project 'Runner')
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
warning: Mapping architecture armv7 to i386. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS Simulator  platform. (in target 'image_picker' from project 'Pods')
warning: Mapping architecture arm64 to x86_64. Ensure that this target's Architectures and Valid Architectures build settings are configured correctly for the iOS  Simulator platform. (in target 'image_picker' from project 'Pods')
warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in  the Runner editor. (in target 'Runner' from project 'Runner')
Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
Exited (sigterm)
<key>NSLocationWhenInUseUsageDescription</key>
<string>[Your explanation here]</string>