I’m using the MoPub iOS SDK (v3.3) to integrate ads in our app. Looking at the MoPub.h header, it looks like this property should control whether the app uses the device’s location or not:
/**
* A Boolean value indicating whether the MoPub SDK should use Core Location APIs to automatically
* derive targeting information for location-based ads.
*
* When set to NO, the SDK will not attempt to determine device location. When set to YES, the
* SDK will periodically try to listen for location updates in order to request location-based ads.
* This only occurs if location services are enabled and the user has already authorized the use
* of location services for the application. The default value is YES.
*
* @param enabled A Boolean value indicating whether the SDK should listen for location updates.
*/
@property (nonatomic, assign) BOOL locationUpdatesEnabled;
But, when I leave that flag to its default (YES), or explicitly set it to YES, I still see this in the console logs:
MOPUB: Will not start location updates: the application is not authorized for location services.
And in Settings.app, I see no entry for my app under the Location Services Privacy settings.
Is the idea that I need to explicitly create a CLLocationManager myself, and try to request a location, in order for this to work?
Note: I have added the appropriate location frameworks to the app build settings in Xcode.