在我的Mac OS应用程序上接收TIC SSL信任错误

时间:2018-04-19 03:55:58

标签: swift macos

我的后端团队已从1台服务器迁移到另一台服务器,现在我的Mac OS应用程序无法再连接到API层。

这是在控制台中打印的日志记录:

2018-04-19 11:52:00.634982+0800 you-backoffice-mac[97978:18379023] Strict Trust Evaluation yielded status(-9802) for [2:0x604000169b40]
2018-04-19 11:52:00.635030+0800 you-backoffice-mac[97978:18379023] TIC SSL Trust Error [2:0x604000169b40]: 3:0
2018-04-19 11:52:00.635134+0800 you-backoffice-mac[97978:18379023] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)
2018-04-19 11:52:00.635162+0800 you-backoffice-mac[97978:18379023] Task <4D81A9B5-1C56-4F06-A331-DF06F3EF2389>.<2> HTTP load failed (error code: -1200 [3:-9802])

我已开启允许任意负载:

<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

我的Info.plist的完整XML:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>CFBundleDevelopmentRegion</key>
        <string>$(DEVELOPMENT_LANGUAGE)</string>
        <key>CFBundleExecutable</key>
        <string>$(EXECUTABLE_NAME)</string>
        <key>CFBundleIconFile</key>
        <string></string>
        <key>CFBundleIdentifier</key>
        <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
        <key>CFBundleName</key>
        <string>$(PRODUCT_NAME)</string>
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
        <string>1.0</string>
        <key>CFBundleURLTypes</key>
        <array>
            <dict>
                <key>CFBundleTypeRole</key>
                <string>Editor</string>
                <key>CFBundleURLName</key>
                <string>you-backoffice-mac</string>
                <key>CFBundleURLSchemes</key>
                <array>
                    <string>you-backoffice-mac</string>
                </array>
            </dict>
        </array>
        <key>CFBundleVersion</key>
        <string>1</string>
        <key>LSMinimumSystemVersion</key>
        <string>$(MACOSX_DEPLOYMENT_TARGET)</string>
        <key>NSAppTransportSecurity</key>
        <dict>
            <key>NSAllowsArbitraryLoads</key>
            <true/>
        </dict>
        <key>NSHumanReadableCopyright</key>
        <string>Copyright © 2017 Rutger Huijsmans. All rights reserved.</string>
        <key>NSMainStoryboardFile</key>
        <string>Main</string>
        <key>NSPrincipalClass</key>
        <string>NSApplication</string>
    </dict>
</plist>

0 个答案:

没有答案