2017-04-24 94 views
0

我使用IBM移动头伏7.1 iOS应用程序,这个问题是我的应用程序提交到店里后,面料开始给我奇怪的例外:生成钥匙扣IBM移动头伏7.1

致命例外:无法生成密钥对。钥匙扣返回 以下状态:-25308

每次我检查Crashlytics时候我看到了异常的不同的跟踪栈,下面是我得到的例外之一:

Fatal Exception: Unable to generate key pair. 
0 CoreFoundation     0x18db1d1b8 __exceptionPreprocess 
1 libobjc.A.dylib    0x18c55455c objc_exception_throw 
2 CoreFoundation     0x18db1d100 -[NSException initWithCoder:] 
3 RTA       0x1012ba4a0 +[WLCertManager generateKeyPair:withPublicKeyLabel:withKeySize:] 
4 RTA       0x1012be730 +[WLCertManager signJWSPartsWithPayload:withPrivateKeyLabel:withPublicKeyLabel:withKeySize:] 
5 RTA       0x10129ffcc -[WLAuthorizationManager buildJWSPartsWithClientId:] 
6 RTA       0x10128607c __71-[WLRequest addClientInstanceIdHeaderWithRequest:withCompetionHandler:]_block_invoke 
7 RTA       0x10129b4ec -[WLAuthorizationManager clientInstanceIdWithCompletionHandler:] 
8 RTA       0x101285f2c -[WLRequest addClientInstanceIdHeaderWithRequest:withCompetionHandler:] 
9 RTA       0x101284f40 -[WLRequest sendRequest:path:withOptions:] 
10 RTA       0x10128685c -[WLRequest makeRequest:withOptions:withCallback:] 
11 RTA       0x1012862f4 -[WLRequest makeRequest:withOptions:] 
12 RTA       0x1012c36e8 -[WLClient invokeProcedure:withDelegate:options:] 
13 RTA       0x1002e8d60 specialized FavouritesModel.getFavouritesList(FavouritesRequestDelegate?) ->() (FavouritesModel.swift) 
14 RTA       0x1002e8484 FavouritesModel.getFavouritesList(FavouritesRequestDelegate?) ->() (FavouritesModel.swift:21) 
15 RTA       0x10037508c MainDashboardViewController.pullToRefreshAction() ->() (MainDashboardViewController.swift:1793) 
16 RTA       0x100389dc8 partial apply for MainDashboardViewController.(upperViewAnimation() ->()).(closure #2).(closure #4) (MainDashboardViewController.swift:614) 
17 Foundation      0x18e61a46c __NSFireDelayedPerform 
18 CoreFoundation     0x18dacb1d8 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ 
19 CoreFoundation     0x18dacaeec __CFRunLoopDoTimer 
20 CoreFoundation     0x18daca7a8 __CFRunLoopDoTimers 
21 CoreFoundation     0x18dac83a4 __CFRunLoopRun 
22 CoreFoundation     0x18d9f62b8 CFRunLoopRunSpecific 
23 GraphicsServices    0x18f4aa198 GSEventRunModal 
24 UIKit       0x193a3d7fc -[UIApplication _run] 
25 UIKit       0x193a38534 UIApplicationMain 
26 RTA       0x100913fe0 main (AppDelegate.swift:35) 
27 libdispatch.dylib    0x18c9d95b8 (Missing) 

经过一番调查和搜索,我发现了一些建议,以使钥匙扣共享和下面的截图是我的应用程序的权利:

Entitlement

请任何建议如何我可以解决这个问题,或者是否有任何丢失的配置应用

+0

这是iOS 10上的问题吗?启用钥匙串共享后,它正在工作? –

+0

是的,大部分崩溃都依赖于Fabric 10在iOS 10上,但是在启用钥匙串共享之后,我们仍然存在这个问题。 –

回答

1

致命异常:无法生成密钥对。钥匙扣返回 以下状态:当应用程序尝试生成密钥对,而电话被锁定或同时应用程式在后台模式期间运行,则会发生-25308

上述错误。这似乎是你的应用程序正在做MFP请求,而应用程序是背景或手机被锁定。

当前Mobilefirst iOS 7.x客户端SDK不支持在后台运行的MFP请求。如果您正在访问不安全的资源,则可以使用非MFP API。

+0

感谢您的回答,但我想问问如果应用程序进入后台,是否有任何方法取消MFP请求 –

+0

@ammararangy根据错误,您的应用程序正在后台模式本身启动MFP请求。在进行MFP请求之前,请先检查应用程序是否处于前景模式。 –

+0

啊哈可以处理这种情况,但是如果应用程序在前台请求MFP请求,然后用户将应用程序置于后台 –