The SOOMLA SDK
How it works?
Once the SOOMLA SDK is initialized, it automatically detects which ad networks' SDKs are integrated in the app. For each one of these Ad Networks' SDKs, the SOOMLA SDK knows exactly how to listen to all events and attributes it needs to collect in order to allow the SOOMLA Platform to work.
SOOMLA keeps improving it's SDKs and methods trying to make it as easy as possible on your R&D teams to integrate and operate its SDK. Each time an ad networks changes its SDK logic, SOOMLA also adapts to those changes so data collection will continue normally.
SDK Integration Steps:
(article: Creating a new App in Dashboard)
1. Add the SOOMLA SDK to your App:
We support both Cocoapods and manual download of our SDK.
Podfile
## SOOMLA Agent
pod 'Soomla-SDK-Agent',''
Manual Download
Just download the SDK and follow the instructions below
Updated
- Extract the zip and import libSoomlaTraceback-vx.x.x.a,libKeeva.a to your ios project.
- Add the headers/public/SoomlaTraceback.h header file.
- Link your project with libz, libsqlite3.0, AdSupport, StoreKit, WebKit, SystemConfiguration(since 5.7.6) and JavaScriptCore frameworks if you haven't done it already.
- In your project's build settings, add -ObjC to "Other Linker Flags".
.
2. Initializing the SDK:
Additionally, Soomla SDK should be initialized on the Main thread or on the same thread as other ad network SDKs.
#import "SoomlaTraceback.h"
- (void)viewDidLoad {
[super viewDidLoad];
// Get the appKey from the App's Settings page.
NSString *appKey = @"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
// Initialize
[[SoomlaTraceback getInstance] initializeWithAppKey:appKey];
...
}
3. SDK Call-Back events
InitCallback:
Send a callback once:
- Soomla SDK was successfully initialized.
This callback indicates that it's now safe to initialize all other Ad-networks.
Note: It usually takes a few seconds to initialize Soomla SDK (1~5 seconds) depending on the number of Ad Network SDKs used. Keep in mind, delays can also be caused by network connectivity issues.
@interface InitDelegate : NSObject<SoomlaInitDelegate>
@end
@implementation InitDelegate
- (void)initFinishedSuccessfully:(BOOL)success {
NSLog(@"initFinishedSuccessfully %d", success);
}
@end
SoomlaConfig *config = [SoomlaConfigconfig];
self.initDelegate = [[InitDelegate alloc] init];
[config setInitDelegate:self.initDelegate];
SDKConfigListener:
Send callback once:
- Configuration from the server completed successfully
- All ad-network remote connectors were updated.
Notes:
- Callback response might take a bit more time, depending on the number of connectors.
- In order to use the connector shut down functionality this call back must be used.
@interface ConfigDelegate : NSObject<SoomlaSdkConfigDelegate>
@end
@implementation ConfigDelegate
- (void)onSdkConfigured {
NSLog(@"onSdkConfigured");
}
@end
SoomlaConfig *config = [SoomlaConfigconfig];
self.configDelegate = [[ConfigDelegate alloc] init];
[config setSdkConfigDelegate:self.configDelegate];
That's it!
Next steps: