简体   繁体   中英

IOS app missing purpose string in info.plist while it is added

my ios app was rejected 3x now because missing purpose string from info.plist. Apple says I have to add purpose string for location usage. Funny thing is, I have added, it is in the info.plist but for some reason neither the phone, neither Apple find it. What do I do wrong?!

Here is part of my info.plist (sensitive info deleted out):

<?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>CFBundleDisplayName</key>
    <string>----</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleVersion</key>
    <string>1.1</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>MinimumOSVersion</key>
    <string>13.0</string>
    <key>UIDeviceFamily</key>
    <array>
        <integer>1</integer>
    </array>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIMainStoryboardFile</key>
    <string>Main</string>
    <key>UIMainStoryboardFile~ipad</key>
    <string>Main</string>
    <key>UIRequiredDeviceCapabilities</key>
    <array>
        <string>armv7</string>
    </array>
    <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>CFBundleIdentifier</key>
    <string>-----</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <array>
        <string>App would like to use location to track the exact location of the vehicle in real time. Also notify our warehouses when the driver is arriving.</string>
    </array>
    <key>NSLocationAlwaysUsageDescription</key>
    <array>
        <string>App would like to use location to track the exact location of the vehicle in real time. Also notify our warehouses when the driver is arriving.</string>
    </array>
    <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
    <array>
        <string>App would like to use location to track the exact location of the vehicle in real time. Also notify our warehouses when the driver is arriving</string>
    </array>

Update your Info.plist file as below.

<?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>CFBundleDisplayName</key>
    <string>----</string>
    <key>CFBundleShortVersionString</key>
    <string>1.0</string>
    <key>CFBundleVersion</key>
    <string>1.1</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>MinimumOSVersion</key>
    <string>13.0</string>
    <key>UIDeviceFamily</key>
    <array>
        <integer>1</integer>
    </array>
    <key>UILaunchStoryboardName</key>
    <string>LaunchScreen</string>
    <key>UIMainStoryboardFile</key>
    <string>Main</string>
    <key>UIMainStoryboardFile~ipad</key>
    <string>Main</string>
    <key>UIRequiredDeviceCapabilities</key>
    <array>
        <string>armv7</string>
    </array>
    <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>CFBundleIdentifier</key>
    <string>-----</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>App would like to use location to track the exact location of the vehicle in real time. Also notify our warehouses when the driver is arriving.</string>
    <key>NSLocationAlwaysUsageDescription</key>
    <string>App would like to use location to track the exact location of the vehicle in real time. Also notify our warehouses when the driver is arriving.</string>
    <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
    <string>App would like to use location to track the exact location of the vehicle in real time. Also notify our warehouses when the driver is arriving</string>

You need to add an only string for location permission And you have added it inside the array.

Hope It will work for you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM