Error Appstore connect : Missing Purpose String in

2020-02-07 16:31发布

I've submitted my app for review to the App Store Connect. Although the app is still under review, I've received an email to inform me that I have to fix an error. Here is the content of the message:

Dear Developer,

We identified one or more issues with a recent delivery for your app XXXXX. Your delivery was successful, but you may wish to correct the following issues in your next delivery:

"Missing Purpose String in Info.plist File. Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSLocationAlwaysUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting spring 2019, all apps submitted to the App Store that access user data will be required to include a purpose string.If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs.

After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to iTunes Connect.

Best regards,

The App Store Team

My app is fully built with Expo and I don't know how to access and modify the Info.plist.

Any idea?

19条回答
小情绪 Triste *
2楼-- · 2020-02-07 16:54

With Xcode 11 copy the key NSLocationAlwaysUsageDescription and add this to Info -> Custom iOS Target Properties -> Click + in the bottom left of this tab and as a value insert some kind of description like This app requires location access to function properly..

查看更多
3楼-- · 2020-02-07 16:56

If you're using Expo, you can add solve by adding infoPlist to app.json like so:

  "expo": {
     "ios": {
       "bundleIdentifier": "com.app.myapp",
       "infoPlist": {
         "NSLocationAlwaysUsageDescription": "Some message to appease Apple.",
       },
     },
   }

Expo Docs

查看更多
一夜七次
4楼-- · 2020-02-07 17:00

For more simplifying you can add these lines in your info.plist. These error are coming because Starting spring 2019, all apps submitted to the App Store that access user data will be required to include a purpose string.

  1. Open info.plist as source code.
  2. Add these following lines in your plist

    <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
    <string>$(PRODUCT_NAME) needs Location access for "some reason"!</string>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string>$(PRODUCT_NAME) needs Location access for "some reason"!</string>
    <key>NSLocationAlwaysUsageDescription</key>
    <string>$(PRODUCT_NAME) needs Location access for "some reason"!</string>
    
查看更多
爱情/是我丢掉的垃圾
5楼-- · 2020-02-07 17:00

same issue in Feb 19, got an email with a bunch of permissions I am not using, I assume they are from plugins. Apple says in March 19 it is a requirement so I am adding these in info.plst and uploading again.

It is very silly indeed.

查看更多
beautiful°
6楼-- · 2020-02-07 17:00

I had <key>NSLocationWhenInUseUsageDescription </key> instead of <key>NSLocationWhenInUseUsageDescription</key>

be sure to remove trailing whitespace

查看更多
不美不萌又怎样
7楼-- · 2020-02-07 17:00

A short answer to the above problem -

NSLocationAlwaysUsageDescription must be updated with the following description in Info.plist file

{Your App Name} requires access to the location to suggest dengue outbreak zones.

查看更多
登录 后发表回答