You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.6 KiB
48 lines
1.6 KiB
#import "AppDelegate.h" |
|
#import "GeneratedPluginRegistrant.h" |
|
#import <AMapFoundationKit/AMapFoundationKit.h> |
|
#import "DCUniMP.h" |
|
|
|
@implementation AppDelegate |
|
|
|
- (BOOL)application:(UIApplication *)application |
|
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { |
|
[GeneratedPluginRegistrant registerWithRegistry:self]; |
|
// Override point for customization after application launch. |
|
|
|
[AMapServices.sharedServices setApiKey:@"feaae7986201b571cace1b83728be5bb"]; |
|
|
|
|
|
// 配置参数 |
|
NSMutableDictionary *options = [NSMutableDictionary dictionaryWithDictionary:launchOptions]; |
|
// 设置 debug YES 会在控制台输出 js log,默认不输出 log,注:需要引入 liblibLog.a 库 |
|
[options setObject:[NSNumber numberWithBool:YES] forKey:@"debug"]; |
|
// 初始化引擎 |
|
[DCUniMPSDKEngine initSDKEnvironmentWithLaunchOptions:options]; |
|
|
|
|
|
return [super application:application didFinishLaunchingWithOptions:launchOptions]; |
|
} |
|
|
|
#pragma mark - App 生命周期方法 |
|
- (void)applicationDidBecomeActive:(UIApplication *)application { |
|
[DCUniMPSDKEngine applicationDidBecomeActive:application]; |
|
} |
|
|
|
- (void)applicationWillResignActive:(UIApplication *)application { |
|
[DCUniMPSDKEngine applicationWillResignActive:application]; |
|
} |
|
|
|
- (void)applicationDidEnterBackground:(UIApplication *)application { |
|
[DCUniMPSDKEngine applicationDidEnterBackground:application]; |
|
} |
|
|
|
- (void)applicationWillEnterForeground:(UIApplication *)application { |
|
[DCUniMPSDKEngine applicationWillEnterForeground:application]; |
|
} |
|
|
|
- (void)applicationWillTerminate:(UIApplication *)application { |
|
[DCUniMPSDKEngine destory]; |
|
} |
|
|
|
@end
|
|
|