【问题标题】:Whitelist error in Cordova/PhonegapCordova/Phonegap 中的白名单错误
【发布时间】:2012-11-15 19:03:02
【问题描述】:

我的 Cordova.plist 中有以下内容

<?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>KeyboardDisplayRequiresUserAction</key>
    <true/>
    <key>SuppressesIncrementalRendering</key>
    <false/>
    <key>UIWebViewBounce</key>
    <false/>
    <key>TopActivityIndicator</key>
    <string>gray</string>
    <key>EnableLocation</key>
    <false/>
    <key>EnableViewportScale</key>
    <false/>
    <key>AutoHideSplashScreen</key>
    <true/>
    <key>ShowSplashScreenSpinner</key>
    <true/>
    <key>MediaPlaybackRequiresUserAction</key>
    <false/>
    <key>AllowInlineMediaPlayback</key>
    <false/>
    <key>OpenAllWhitelistURLsInWebView</key>
    <false/>
    <key>BackupWebStorage</key>
    <string>cloud</string>
    <key>ExternalHosts</key>
    <array/>
    <key>item 0</key>
    <string>*</string>
    <key>Plugins</key>
    <dict>
        <key>NavigationBar</key>
        <string>NavigationBar</string>
        <key>EmailComposer</key>
        <string>EmailComposer</string>
        <key>Device</key>
        <string>CDVDevice</string>
        <key>TabBar</key>
        <string>TabBar</string>
        <key>Logger</key>
        <string>CDVLogger</string>
        <key>Compass</key>
        <string>CDVLocation</string>
        <key>Accelerometer</key>
        <string>CDVAccelerometer</string>
        <key>Camera</key>
        <string>CDVCamera</string>
        <key>NetworkStatus</key>
        <string>CDVConnection</string>
        <key>Contacts</key>
        <string>CDVContacts</string>
        <key>Debug Console</key>
        <string>CDVDebugConsole</string>
        <key>Echo</key>
        <string>CDVEcho</string>
        <key>File</key>
        <string>CDVFile</string>
        <key>FileTransfer</key>
        <string>CDVFileTransfer</string>
        <key>Geolocation</key>
        <string>CDVLocation</string>
        <key>Notification</key>
        <string>CDVNotification</string>
        <key>Media</key>
        <string>CDVSound</string>
        <key>Capture</key>
        <string>CDVCapture</string>
        <key>SplashScreen</key>
        <string>CDVSplashScreen</string>
        <key>Battery</key>
        <string>CDVBattery</string>
        <key>Globalization</key>
        <string>CDVGlobalization</string>
    </dict>
</dict>
</plist>

我已将 * 添加为外部主机,该主机以前一直正常工作,我使用的是 Cordova 2.2.0,在尝试进行 AJAX 调用时出现白名单错误。

我看不出哪里出错了!

【问题讨论】:

    标签: xcode cordova whitelist


    【解决方案1】:

    XML这部分我已经改了-

    <array/>
        <key>item 0</key>
        <string>*</string>
    

    到这里-

    <key>ExternalHosts</key>
        <array>
            <string>*</string>
        </array>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-01-03
      • 2015-03-03
      • 2012-06-03
      • 1970-01-01
      • 2017-05-02
      • 1970-01-01
      • 2015-06-01
      • 1970-01-01
      相关资源
      最近更新 更多