IOS приложение пропускает целевую строку в info.plist, пока она добавляется - PullRequest
0 голосов
/ 17 января 2020

мое ios приложение было отклонено 3 раза, потому что отсутствует строка назначения из info.plist. Apple говорит, что я должен добавить целевую строку для использования местоположения. Забавно, я добавил, что он есть в info.plist, но почему-то ни телефон, ни Apple не находят его. Что я делаю не так ?!

Вот часть моего 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>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>

1 Ответ

3 голосов
/ 17 января 2020

Обновите файл 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>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>

Вам нужно добавить единственную строку для разрешения местоположения, и вы добавили ее в массив.

Надеюсь, это будет работать для тебя.

...