我有一个React-Native应用程序我试图与MaaS360 MDM平台的SDK集成。
一切正常,直到构建并尝试初始化视图。
2017-02-10 14:52:06.844697 AppName[1675:604526] Unbalanced calls to begin/end appearance transitions for <UIViewController: 0x10122ae20>.
2017-02-10 14:52:08.721767 AppName[1675:604526] *** Assertion failure in +[FLCRKeyServicesUtils getDeviceBasedKeyUsingMKSharedRounds], /u002/AppSDK/3.02.000.SDK_93/core/core/FLCRKeyServicesUtils.m:472
2017-02-10 14:52:08.723552 AppName[1675:604526] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'MK shared rounds is not loaded yet'
错误上方:对开始/结束外观转换的不平衡调用
我认为这与我的rootView和initMaaS360SDK有关,两者都存在于应用程序didFinishLaunchingWithOptions bool中,但我不知道从哪里开始。
SDK旨在在应用程序启动时运行,并确保允许设备运行内部应用程序,但SDK无法完全运行,因为它在react-native自己的初始化时发生了我认为rootView。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSURL *jsCodeLocation;
jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
moduleName:@"AppName"
initialProperties:nil
launchOptions:launchOptions];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
//sdk integration
[self initMaaS360SDK];
return YES;
}
如果重要,我使用的是React-Native 0.37.0和iOS Target 8.0。
答案 0 :(得分:2)
过去我遇到过同样的问题。这与MaaS360有关。导致此错误的原因是您忘记将com.fiberlink.authServices
添加到您的钥匙串共享功能。
Bas du Pre