Question:
Apple sent us a “Missing Purpose String in Info.plist File” warning about NSLocationAlwaysUsageDescription. We do not use any location APIs ourselves, but our build contains PushwooshGeozones.framework. What should we do?
Answer:
Geozones are shipped as a separate framework, PushwooshGeozones. It is never added to your project automatically — it is added explicitly (pod 'PushwooshXCFramework/Geozones', the SwiftPM package PushwooshGeozones-XCFramework, or a manual drag-and-drop). See the Geozones integration guide.
So you have two options:
- You do not use Geozones — remove PushwooshGeozones from your target. The warning disappears, because the core Pushwoosh SDK does not reference location APIs.
-
You do use Geozones — add the location purpose strings to your
Info.plist:-
NSLocationWhenInUseUsageDescription— required, for tracking geozones while the app is in the foreground. -
NSLocationAlwaysAndWhenInUseUsageDescription— required, for tracking geozones in both foreground and background and for showing the permission dialog. -
NSLocationAlwaysUsageDescription— optional, only needed if your app still targets iOS 10 or earlier.
-
<key>NSLocationWhenInUseUsageDescription</key>
<string>We use your location to send you offers from nearby stores</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>We use your location to send you offers from nearby stores</string>
Each string is shown to the user in the permission alert, so give a clear, specific explanation. More background: Protecting the user’s privacy.
Comments
0 comments
Please sign in to leave a comment.