-
Notifications
You must be signed in to change notification settings - Fork 0
Plist Configuration
The Yieldmo SDK's initial default configuration in your app can be modified through the use of an optional plist file. You can create a YieldmoConfiguration.plist file in your Xcode project which can take the following keys:
| Key | Type | Default Value |
|---|---|---|
| shouldUseLogging | Boolean | *see below |
| shouldAutomaticallyFetchLocation | Boolean | NO |
| shouldUseExternalBrowser | Boolean | NO |
There are several Yieldmo SDK log levels. By default, the log level is set to YMLogLevelInfo. This can be modified either through code, or through the YieldmoConfiguration.plist file.
If you choose to modify the log level through the plist file, setting shouldUseLogging to YES changes the initial log level to YMLogLevelDebug. Setting shouldUseLogging to NO changes the initial log level to YMLogLevelNone. If you set the log level by calling setLogLevel, the log level set through code will take precedence over the log level set initially through plist.
For more information on Yieldmo log levels and how to set the level through code, see our Logging page.
Location can be passed to the Yieldmo SDK via the setLocation, which takes a CLLocation object. If you choose to pass the location in this manner, the onus is on you, the developer, to handle all location polling on your end. However, there is an alternate method to pass location information to the Yieldmo SDK without ever calling the setLocation. You can pass the location polling responsibility to the SDK itself via shouldAutomaticallyFetchLocation.
If you set shouldAutomaticallyFetchLocation to YES in your YieldmoConfiguration.plist file, be sure to also do the following in order for location polling to work correctly:
-
In your
Info.plistadd the keyNSLocationWhenInUseUsageDescriptionand set its value to the message you want to give the user about location permissions. -
In your AppDelegate, add a property to hold a reference to the CLLocationManager:
@property (strong, nonatomic) CLLocationManager * manager;- In your AppDelegate's
application:didFinishLaunchingWithOptions:method add the following:
self.manager = [[CLLocationManager alloc] init];
self.manager.delegate = self;
if ([CLLocationManager authorizationStatus] == kCLAuthorizationStatusNotDetermined) {
[self.manager requestWhenInUseAuthorization];
}The YMPlacementView's default behavior when a user taps on an ad that links to a web URL is to present a modal view controller to display the content in-app. If you would prefer to change this behavior to launch an external web browser instead, you can set shouldUseExternalBrowser to YES. We recommend the default method of launching ads in a modal, as it makes it easier for users to return to your app after engaging with an ad.
Start Here
iOS Version Support
Troubleshooting & Logging
Have a previous SDK?