![](/img/trans.png)
[英]Ibm Mobile First - WL.Client.Push Detect App Launch From Notification Banner
[英]Error Registering Client IBM Mobile First
我正在使用IBM Mobile First Starter Pack,無法找到如何解決錯誤“錯誤注冊客戶端”。 有辦法調試嗎? 從昨天開始,它開始出現在我的移動應用程序上,從今天早上開始,這也出現在我的模擬器上。 我懷疑我的模擬器有效,因為它正在緩存憑據。
2015-11-26 18:44:54.835 bluelist-objective-c[32334:2189606] Intializing IMFCLient
2015-11-26 18:44:54.836 bluelist-objective-c[32334:2189606] IapplicationRoute [appurl]
2015-11-26 18:44:54.836 bluelist-objective-c[32334:2189606] IapplicationId [app id]
2015-11-26 18:44:55.286 bluelist-objective-c[32334:2189606] [ERROR] [IMF_REQUEST] -
[IMFAuthorizationRequest requestFailed:error:] in IMFAuthorizationRequest.m:368 ::
Status code='400' error='Expected status code in (200-299), got 400' response='Error
registering client'
2015-11-26 18:44:55.289 bluelist-objective-c[32334:2189606] [ERROR] [IMF] -
[IMFAuthorizationRequest requestFailed:error:] in IMFAuthorizationRequest.m:372 ::
Error=Error Domain=WLAFNetworkingErrorDomain Code=-1011 "Expected status code in (200-299),
got 400" UserInfo={WLAFNetworkingOperationFailingURLRequestErrorKey=<NSMutableURLRequest:
0x7ff9714135b0> { URL: [appurl]/imf-authserver/authorization/v1/apps/
6e88ec09-fa48-4848-aeef-8fe59c3226e9/clients/instance }, NSLocalizedRecoverySuggestion=
Error registering client, NSErrorFailingURLKey=[appurl]/imf-authserver/authorization/v1/
apps/6e88ec09-fa48-4848-aeef-8fe59c3226e9/clients/instance,
WLAFNetworkingOperationFailingURLResponseErrorKey
=<NSHTTPURLResponse: 0x7ff971536660> { URL: [appurl]/imf-authserver/authorization/v1/apps/
6e88ec09-fa48-4848-aeef-8fe59c3226e9/clients/instance } { status code: 400, headers {
Connection = "Keep-Alive";
"Content-Type" = "text/plain";
Date = "Fri, 27 Nov 2015 02:44:55 GMT";
"Transfer-Encoding" = Identity;
"X-Backside-Transport" = "FAIL FAIL";
"X-Cf-Requestid" = "aad33684-69d5-4535-433a-216e141a3d2d";
"X-Client-IP" = "50.174.210.191";
"X-Global-Transaction-ID" = 1566005617;
"X-Powered-By" = "Servlet/3.0";
} }, NSLocalizedDescription=Expected status code in (200-299), got 400}
重置模擬器或刪除應用程序並重新安裝。 然后,該錯誤將不再發生: https : //developer.ibm.com/answers/questions/206025/imfauthorizationrequest-error-invalid-grant/
canOpenURL: failed for URL:"fbauth2://"
錯誤表明您的Info.plist安全設置存在問題。 首先,我將確認以下LSApplicationQueriesSchemes值或將其添加到您的Info.plist中。
根據Facebook 在這里概述的建議
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fbapi20130214</string>
<string>fbapi20130410</string>
<string>fbapi20130702</string>
<string>fbapi20131010</string>
<string>fbapi20131219</string>
<string>fbapi20140410</string>
<string>fbapi20140116</string>
<string>fbapi20150313</string>
<string>fbapi20150629</string>
<string>fbauth</string>
<string>fbauth2</string>
<string>fb-messenger-api20140430</string>
</array>
如果那不能單獨解決問題,我還將考慮同時替換Info.plist中的應用程序傳輸安全性定義。 為了進行測試,您可能希望將完整的ATS替換為
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.