SDK初始化与配置
1. 在AppDelegate文件中配置初始化代码
//启动FB, 在集成登录SDK的情况下, 此行代码跳过
//[[NGAAppEvents sharedInstance] fbApplication:application didFinishLaunchingWithOptions:launchOptions];
//配置Google Firebase
[[NGAAppEvents sharedInstance] gaConfigure];
//配置启动配置的相关参数
NGAConfig* config = NGAConfig.new;
config.appsFlyerDevKey = @"bLmWavMFiwAyosewWnfQ8g"; //AppsFlyer的key
config.appleAppID = @"1268557479"; //Apple的Appid
config.appKey = @"3411251990"; //NGamesAppid
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
