SDK初始化与配置
1. 在AppDelegate文件中配置初始化代码
//启动FB, 在集成登录SDK的情况下, 此行代码跳过
//[[NGAAppEvents sharedInstance] fbApplication:application didFinishLaunchingWithOptions:launchOptions];
//配置Google Firebase, 需要在项目中添加GoogleService-Info.plist文件
[[NGAAppEvents sharedInstance] gaConfigure];
//配置启动配置的相关参数
NGAConfig* config = NGAConfig.new;
config.appsFlyerDevKey = @"bLmWavMFiwAywrxcewWnfQ8g"; //AppsFlyer的key
config.appleAppID = @"1268557479"; //Apple的Appid
config.appKey = @"gs-99"; //游戏id
config.enableAddIDFA = YES; //开启IDFA追踪
[[NGAAppEvents sharedInstance] startWithConfig:config];配置如下代码:
-(void)applicationDidBecomeActive:(UIApplication *)application{
[[NGAAppEvents sharedInstance] afTrackAppLaunch];
[[NGAAppEvents sharedInstance] fbActivateApp];
}
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *_Nullable))restorationHandler{
[[NGAAppEvents sharedInstance] afContinueUserActivity:userActivity restorationHandler:restorationHandler];
return YES;
}实现openURL方法
2. Info.plist文件配置
Last updated
