gpt4 book ai didi

iOS native 无法连接到 MFP 服务器 : requires the use of a secure connection

转载 作者:行者123 更新时间:2023-11-29 10:24:29 25 4
gpt4 key购买 nike

我正在尝试使用 CLI 7.1 跟踪 MobileFirst 虚拟 PoT,并在 Xcode 控制台中收到以下错误:

    2015-10-12 18:35:06.649 IBMBankNativeApp[45125:3922307] ViewController - viewDidLoad
2015-10-12 18:35:06.650 IBMBankNativeApp[45125:3922307] ViewController - connectToServer - Initializing ...
2015-10-12 18:35:06.651 IBMBankNativeApp[45125:3922307] [DEBUG] [WL_CONFIG] -[WLConfig init] in WLConfig.m:68 :: {
"application id" = IBMBankNativeiOSApi;
"application version" = "1.0";
environment = iOSnative;
host = localhost;
platformVersion = "6.3.0.00.20141127-1357";
port = 10080;
protocol = http;
wlServerContext = "/MyMFPProject/";
wlUid = "wY/mbnwKTDDYQUvuQCdSgg==";
}
2015-10-12 18:35:06.664 IBMBankNativeApp[45125:3922307] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] +[WLAFHTTPClientWrapper requestWithURL:] in WLAFHTTPClientWrapper.m:37 :: Request url is http://localhost:10080/MyMFPProject/apps/services/api/IBMBankNativeiOSApi/iOSnative/init
2015-10-12 18:35:06.666 IBMBankNativeApp[45125:3922307] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:119 :: Request timeout is 60.000000
2015-10-12 18:35:06.666 IBMBankNativeApp[45125:3922307] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:195 :: Sending request (http://localhost:10080/MyMFPProject/apps/services/api/IBMBankNativeiOSApi/iOSnative/init) with headers:
{
"Accept-Language" = "en-US";
"User-Agent" = "IBMBankNativeApp/1.0 (iPhone; iOS 9.0; Scale/2.00)/WLNativeAPI/6.3.0.00.20141127-1357";
"X-Requested-With" = XMLHttpRequest;
"x-wl-app-version" = "1.0";
"x-wl-clientlog-appname" = IBMBankNativeiOSApi;
"x-wl-clientlog-appversion" = "1.0";
"x-wl-clientlog-deviceId" = "29C6B767-6E3B-430C-B5F6-5B2280290539";
"x-wl-clientlog-env" = iOSnative;
"x-wl-clientlog-model" = "x86_64";
"x-wl-clientlog-osversion" = "9.0";
"x-wl-platform-version" = "6.3.0.00.20141127-1357";
}
Post Data: action=test&isAjaxRequest=true
2015-10-12 18:35:06.694 IBMBankNativeApp[45125:3922307] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper start] in WLAFHTTPClientWrapper.m:182 :: Starting the request with URL http://localhost:10080/MyMFPProject/apps/services/api/IBMBankNativeiOSApi/iOSnative/init
2015-10-12 18:35:06.751 IBMBankNativeApp[45125:3922307] [DEBUG] [WL_REQUEST] -[WLRequest sendRequest:path:withOptions:] in WLRequest.m:200 :: waiting for response... (Thread=<NSThread: 0x7c269a60>{number = 1, name = main})
2015-10-12 18:35:06.758 IBMBankNativeApp[45125:3922396] App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.
2015-10-12 18:35:06.774 IBMBankNativeApp[45125:3922307] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFailed:error:] in WLAFHTTPClientWrapper.m:209 :: Request Failed
2015-10-12 18:35:06.774 IBMBankNativeApp[45125:3922307] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFailed:error:] in WLAFHTTPClientWrapper.m:210 :: Response Status Code : 0
2015-10-12 18:35:06.775 IBMBankNativeApp[45125:3922307] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFailed:error:] in WLAFHTTPClientWrapper.m:211 :: Response Error : The resource could not be loaded because the App Transport Security policy requires the use of a secure connection.

我应该以某种方式禁用测试环境的安全性吗?

最佳答案

是的。启动 iOS 9 需要安全连接。
按照此博客文章中的说明了解更多信息:https://developer.ibm.com/mobilefirstplatform/2015/09/09/ats-and-bitcode-in-ios9/

在开发阶段,最简单的方法是禁用 ATS,但请记住在进入生产阶段时正确配置您的应用程序和服务器。

编辑 Xcode 项目的 info.plist 文件。添加以下内容:

<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<!--Include to allow HTTP requests-->
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>

顺便说一句,您说您使用的是 7.1,但您的应用程序清楚地表明您使用的是 MPFF 6.3。

关于iOS native 无法连接到 MFP 服务器 : requires the use of a secure connection,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33085230/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com