Search code examples
iosreact-nativeapp-storeplist

Missing purpose strings in Info.plist for sensitive user data access in React Native iOS app


I recently submitted my React Native iOS app to the App Store and received review points regarding missing purpose strings in the Info.plist file. The reviews specifically mentioned the following issues:

ITMS-90683: Missing purpose string in Info.plist - The app's code references APIs that access sensitive user data, and the Info.plist file should include the NSLocationAlwaysAndWhenInUseUsageDescription key with a purpose string explaining why the app needs access to the user's location.

ITMS-90738: Invalid purpose string value - The NSLocationWhenInUseUsageDescription key has an empty value in the Info.plist file, which is not allowed. A purpose string should be provided to explain why the app needs access to the user's location.

By default, React Native includes the NSLocationWhenInUseUsageDescription key in the Info.plist file, but it leaves it empty. I understand that it is important to provide a meaningful purpose string, but I have a few questions:

Why does React Native add the NSLocationWhenInUseUsageDescription key by default but leave it empty? Should I update this value with a purpose string?

Although my app doesn't directly use location services, I discovered some relevant code related to location permissions in the react-native-permission module, which is a third-party library. Do I still need to add the NSLocationAlwaysAndWhenInUseUsageDescription purpose string, even if I'm not using location services in my app?

I want to ensure that my app complies with App Store guidelines and includes the necessary purpose strings. Any advice or guidance on how to address these issues would be greatly appreciated. Thank you!


Solution

  • It's the message gonna show when asking for user's location info. You just need to write a simple explain message into the "Privacy - Location When In Use Usage Description" open Xcode select project root directory => go to "info" page and fill in the message to "Privacy - Location When In Use Usage Description"