应用是一个ios工程 初始化加载 网络权限未弹出 退出到后台才弹出权限 <content src="index.html"/> <preference name="appBackground"value="rgba(0,0,0,0)"/> <preference name="windowBackground"value="rgba(0,0,0,0)"/> <preference name="frameBackgroundColor"value="rgba(0,0,0,0)"/> <preference name="autoLaunch"value="true"/> <preference name="autoUpdate"value="true"/> <preference name="smartUpdate"value="true"/> <preference name="debug"value="false"/> <preference name="appBackground"value="#177AFA"/> <preference name="statusBarAppearance"value="false"/> <preference name="iOS7StatusBarAppearance"value="true"/> <preference name="fullScreen"value="false"/> <permission name="internet"/> <preference name="pageBounce"value="false" /> <preference name="userAgent"value="APICloudV1.1.0" /> <preference name="softInputMode"value="resize"/> <preference name="checkSslTrusted"value="false" /> <preference name="querySchemes"value="baidumap,iosamap" />
- ( BOOL)application UIApplication *)application didFinishLaunchingWithOptions NSDictionary *)launchOptions { APIConfiguration *configuration = [[APIConfiguration alloc] init]; // 调试时可以开启WiFi代码同步功能 // configuration.enableWifiSync = NO; // configuration.defaultWidgetPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent "widget"]; [[APIManager sharedManager] initSDKWithLaunchOptions:launchOptions configuration:configuration]; // [self initSensorsAnalyticsWithLaunchOptions:launchOptions];
// RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; // RNViewController *rootViewController = [RNViewController new]; // rootViewController.bridge = bridge; // [GGZJRNControlCenter defaultCenter].bridge = bridge; APIWidgetContainer *window = [[APIWidgetContainer alloc]initWithUrl "widget://index.html" userInfo {@"gg_platfrom": @"react-native"}];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; self.window.backgroundColor = [UIColor colorWithRed:23/255.0 green:122/255.0 blue:250/255.0 alpha:1.0]; self.window.rootViewController = window; [self.window makeKeyAndVisible]; return YES;
|