帖子
帖子
用户
博客
课程
显示全部楼层
6
帖子
0
勋章
24
Y币

[superwebview] ios加载widget首次安装用户权限未弹出,退到后台 才弹出来

[复制链接]
发表于 2019-10-29 20:31:38
应用是一个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)applicationUIApplication *)application didFinishLaunchingWithOptionsNSDictionary *)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;




20
帖子
0
勋章
6613
Y币
试过其他机型吗?
9
帖子
0
勋章
5634
Y币
重新编译个包试一下
您需要登录后才可以回帖 登录

本版积分规则