入门指南
Last updated
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
Adx3AdManager.shared().initWithAppId("Your App ID") { isSuccess in
//result handler
}
// Override point for customization after application launch.
return true
}
func applicationDidBecomeActive(_ application: UIApplication) {
Adx3AdManager.shared().applicationDidBecomeActive(application)
}
func applicationDidEnterBackground(_ application: UIApplication) {
Adx3AdManager.shared().applicationDidEnterBackground(application)
}
}#import "Adx3Framework/Adx3Ad.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[[Adx3AdManager sharedManager] initWithAppId:@"Your App ID" success:^(BOOL isSuccess) {
//result handler
}];
return YES;
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
[[Adx3AdManager sharedManager] applicationDidBecomeActive:application];
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
[[Adx3AdManager sharedManager] applicationDidEnterBackground:application];
}
@end