Q:

Errors when added image_picker dependency for flutter (iOS)

I needed to use image_picker for my application.  I added image_picker dependency onto my pubspec.yaml file, and for the iOS I have added    NSCameraUsageDescription
    NSPhotoLibraryUsageDescription
    NSMicrophoneUsageDescription
onto the info.plist file, but I get this error when trying to run the app on iOS simulator. 
This is the error I got when trying to run the app. 
`Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
/Users/sirapol/Desktop/FirstCareFrontEnd/care_now_frontend_v1/ios/Runner/Info.plist: Property List error: Found non-key inside
 at line 27 / JSON error: JSON text did not start with array or object and option to allow fragments not set. 
Running Xcode build...                                                  
Xcode build done.                                             2.4s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **
Xcode's output:
↳
    /Users/sirapol/Desktop/FirstCareFrontEnd/care_now_frontend_v1/build/ios/Debug-iphonesimulator/flutter_plugin_android_lifecycl
    e/flutter_plugin_android_lifecycle.framework: resource fork, Finder information, or similar detritus not allowed
    Command CodeSign failed with a nonzero exit code
    note: Using new build system
    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')`
this is part of my pubspec.yaml file
dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application. 
  # Use with the CupertinoIcons class for iOS style icons. 
  cupertino_icons: ^0.1.2
  provider: ^3.0.0
  http: ^0.12.0+4
  image_picker: ^0.6.3+1
  path_provider: ^1.1.0

dev_dependencies:
  flutter_test:
    sdk: flutter

This is my info.plist file
<? 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>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>care_now_frontend_v1</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>UIViewControllerBasedStatusBarAppearance</key>
    <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>NSLocationWhenInUseUsageDescription</key>
    <key>NSCameraUsageDescription</key>
    <key>NSPhotoLibraryUsageDescription</key>
    <key>NSMicrophoneUsageDescription</key>
  <false/>
</dict>
</plist>

I have no idea why the error is happening.  Because I have done this once and got no error.  Thank you for your help

A:

You need to be sure you have a value added after key values in plist files.  Add string values under those keys and it should fix the problem. 
Example:
<key>NSLocationWhenInUseUsageDescription</key>
<string>Allow access to your phone's location</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Allow access your photo library</string>
<key>NSCameraUsageDescription</key>
<string>Allow access your phone's camera</string>
<key>NSMicrophoneUsageDescription</key>
<string>Allow the app to record using your phone's microphone</string>

As for the architecture mapping errors try setting your iOS deployment target to 9.0 or above in the xcode project. 
Also, I noticed you have a trailing  value in your code example, that looks like it should be moved to under
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>

