Using Services In Passive Mode
Appodeal SDK already includes services such as Adjust, AppsFlyer, and Firebase, and we initialize them automatically with Appodeal initialization.
If you want to be able to initialize services and use their methods yourself, then you need to follow the steps below.
In order to use services in passive mode, you need to contact our support team so that we make the necessary settings on our side.
You can find the details in the step below.
Contact Us
Contact our support team via live chat or email [email protected] with the following information:
- Links to the apps in the store where you want to initialize Adjust/AppsFlyer/Firebase on your own.
Integrate Adjust, AppsFlyer, And Firebase
Complete all the steps from our integration guide, and make sure to include services in your build.
Complete basic integration steps for Adjust, AppsFlyer, and Firebase.
Initialize Adjust
After you have contacted our support team and got confirmation to go further, you can initialize Adjust on your own and use all its methods according to the official documentation.
It is recommended to initialize Adjust in the
didFinishLaunchingWithOptions method of your AppDelegate.
- Swift
- Objective-C
import Adjust
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
initializeAdjust()
return true
}
// Initialize Adjust
func initializeAdjust () {
let yourAppToken = "YOUR_APP_TOKEN"
let environment = ADJEnvironmentProduction
let adjustConfig = ADJConfig(
appToken: yourAppToken,
environment: environment)
Adjust.appDidLaunch(adjustConfig)
}
#import "Adjust.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[self initializeAdjust];
return YES;
}
// Initialize Adjust
- (void)initializeAdjust {
NSString *yourAppToken = @"{YourAppToken}";
NSString *environment = ADJEnvironmentProduction;
*adjustConfig = [ADJConfig configWithAppToken:yourAppToken
environment:environment];
[Adjust appDidLaunch:adjustConfig];
}
When running tests you should ensure that your environment is set to
ADJEnvironmentSandbox.
Change this to ADJEnvironmentProduction before you submit your
application to the App Store.
Initialize AppsFlyer
After you have contacted our support team and got confirmation to go further, you can initialize AppsFlyer on your own and use all its methods according to the official documentation и ad-revenue guide.
- Swift
- Objective-C
import AppsFlyerLib
import AppsFlyerAdRevenue
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
initializeAppsFlyer()
return true
}
// Initialize AppsFlyer
func initializeAppsFlyer () {
AppsFlyerLib.shared().appsFlyerDevKey = "YOUR_AF_DEV_KEY"
AppsFlyerLib.shared().appleAppID = "YOUR_APPLE_APP_ID"
AppsFlyerLib.shared().start()
AppsFlyerAdRevenue.start()
}
#import <AppsFlyerLib/AppsFlyerLib.h>
#import <AppsFlyerAdRevenue/AppsFlyerAdRevenue.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[self initializeAppsFlyer];
return YES;
}
// Initialize AppsFlyer
- (void)initializeAppsFlyer {
[[AppsFlyerLib shared] setAppsFlyerDevKey:@"YOUR_AF_DEV_KEY"];
[[AppsFlyerLib shared] setAppleAppID:@"YOUR_APPLE_APP_ID"];
[[AppsFlyerLib shared] start];
[AppsFlyerAdRevenue start];
}
Initialize Firebase
After you have contacted our support team and got confirmation to go further, you don't need to initialize Firebase, as this is already done on our side.
Firebase analytics will work automatically, and you can use any methods you want, from Firebase Analytics and Firebase Remote-Config.
If you want to use Firebase Remote-Config in your app, then you need to set it up as shown below and in the official documentation
- Swift
- Objective-C
import FirebaseRemoteConfig
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
initializeFirebase()
return true
}
// Initialize Firebase
func initializeFirebase () {
var remoteConfig = RemoteConfig.remoteConfig()
let settings = RemoteConfigSettings()
settings.minimumFetchInterval = 0
remoteConfig.configSettings = settings
}
#import <FirebaseRemoteConfig/FirebaseRemoteConfig.h>
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[self initializeFirebase];
return YES;
}
// Initialize Firebase
- (void)initializeFirebase {
self.remoteConfig = [FIRRemoteConfig remoteConfig];
FIRRemoteConfigSettings *remoteConfigSettings = [[FIRRemoteConfigSettings alloc] init];
remoteConfigSettings.minimumFetchInterval = 0;
self.remoteConfig.configSettings = remoteConfigSettings;
}
Track In-app Purchases
You can track in-app purchase information and send info to Appodeal servers for analytics. It allows users to group by the fact of purchasing in-apps.
This will help you adjust the ads for such users or turn them off if needed.
To track in-app purchases, please refer to this guide.
Event Tracking
Thanks to in-app events, you can track user activity inside your app. You can keep track of events such as registration, passing levels, purchases, etc., as in-app events.
The implementation of in-app events is mandatory for all post-install analysis purposes.
You can send events to Adjust, AppsFlyer, and Firebase using the methods from our documentation.