Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

xcode - how to recreate ios/Runner/infor.plist and get a new fresh copy in flutter

I've messed a bit in my info.plist file and after I started to get the error :

/ios/Runner/Info.plist: The operation couldn’t be completed. (XCBUtil.PropertyListConversionError error 1.) (in target 'Runner' from project 'Runner')

So I think I need to regenerate or rebuild the info.plist file, so I wonder if there is any way to recreate it using flutter commands.

Here is my current info.plist if needed :

<?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>delivery_runner_driver</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>
    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>comgooglemaps</string>
        <string>baidumap</string>
        <string>iosamap</string>
        <string>waze</string>
        <string>yandexmaps</string>
        <string>yandexnavi</string>
        <string>citymapper</string>
        <string>mapswithme</string>
        <string>osmandmaps</string>
        <string>dgis</string>
    </array>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
    <key>NSAppleMusicUsageDescription</key>
    <string>This app may needs to access your Apple Music.</string>
    <key>NSCalendarsUsageDescription</key>
    <string>This app may needs to access your calendars.</string>
    <key>NSContactsUsageDescription</key>
    <string>This app may needs to access your contacts.</string>
    <key>NSLocationAlwaysUsageDescription</key>
    <string>This app needs access to location when in the background.</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>This app needs access to location when open.</string>
    <key>NSMicrophoneUsageDescription</key>
    <string>This app may needs to access your Microphone if needed.</string>
    <key>NSMotionUsageDescription</key>
    <string>This app may needs to access your Motion Sensor.</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>This app may needs to access your PhotoLibrary.</string>
    <key>NSSpeechRecognitionUsageDescription</key>
    <string>This app may needs to access Speech Recognition.</string>
</dict>
</plist>

NOTE: I'm also getting this warning while building :

 error: Found non-key inside <dict> at line 48 / JSON error: JSON text did not start with array or object and option to allow fragments not set.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

just delete info.plist file and run flutter build ios


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...