ADJConfig class
Use the ADJConfig
class to store settings for use with the Adjust SDK.
ADJConfig
class before you initialize the Adjust SDK. This is because the SDK copies properties from this class at runtime.
Class methods
Set up the SDK with the ADJConfig class
To set up the SDK, you need to pass information about your app to your config object. You need to specify your app token, environment, and log level.
+ (nullable ADJConfig *) configWithAppToken: (nonnull NSString *) appToken
environment: (nonnull NSString *) environment
allowSuppressLogLevel: (BOOL) allowSuppressLogLevel
Instance methods
Prevent communication with SKAdNetwork
By default, the Adjust SDK will share information with Apple's SKAdNetwork. You can disable this behavior if you do not plan to share this information with Apple.
- (void) deactivateSKAdNetworkHandling
Properties
Enable/disable reading of AdServices framework data
If you have added AdServices.framework
to your app, the Adjust SDK will have access to AdServices information. To prevent this, toggle the allowAdServicesInfoReading
property.
true
by default
- (BOOL) allowAdServicesInfoReading
Enable/disable reading of iAd framework data
By default, the Adjust SDK will read information from the iAd framework for use with ASA tracking. You can disable this by toggling the allowiAdInfoReading
property.
- (BOOL) allowiAdInfoReading
Enable/disable reading of IDFA
The Adjust SDK will read the ID for Advertisers (IDFA) from a device to improve attribution accuracy. Toggle the allowIdfaReading
property to prevent this.
true
by default
- (BOOL) allowIdfaReading
Set the default tracker for organic installs
You can set a default tracker for your app. The Adjust SDK will use this tracker when there is no other tracker information to read.
- (NSString *) defaultTracker
Delay the launch of the SDK
Some information may not be available until after your app has launched. If you need to wait for the data to become available, you can delay the SDK's first launch. You can specify the number of seconds to delay the launch by.
- (double) delayStart
Set up a delegate to record changes to attribution
The Adjust SDK can notify you of changes to user attribution. To enable this, register a delegate to record these changes. This information will be accessible as a JSON object.
- (NSObject< AdjustDelegate > *) delegate
Enable event buffering
If you are triggering a lot of events in your app, you may want to enable event buffering. Event buffering staggers the sending of events. When enabled, the Adjust SDK sends events once per minute rather than in real-time. The buffer will hold events until the Adjust SDK sends them to the Adjust backend.
- (BOOL) eventBufferingEnabled
Change the logging level
You can change the level of logging you receive from the Adjust SDK by changing the logLevel
property. Some log levels are only available when you are running the application in a sandboxed environment.
- (ADJLogLevel) logLevel
Require sending of cost data with attribution
The Adjust SDK enables you to specify if you need to send cost data as part of attribution.
- (BOOL) needsCost
Enable sending of data in the background
By default, the Adjust SDK will only send event information when the app is open in the foreground. You can enable the SDK to send events when the app is running in the background.
- (BOOL) sendInBackground
Set external device ID
You can add a custom device identifier to track devices and users in your BI system. This external device identifier can be set to any value you choose.
You may need to delay your SDK initialization until your identifier is obtained.
externalDeviceId
has a lower priority than other identifiers such as advertising ID, so it only works for new devices. Existing devices will continue to be attributed by higher-ranked identifiers.
- (NSString *) externalDeviceId
Set URL strategy
The Adjust SDK can use the url strategy setting to prioritise regional endpoints. You can use this if you are making use of the data residency feature.
- (NSString *) urlStrategy