2012-11-15 51 views
0

我已經在我的Cordova.plist以下白名單錯誤的PhoneGap

<?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> 

我已經加入*作爲此前一直工作沒有問題,我使用的科爾多瓦2.2.0當外部主機試圖使AJAX調用我得到白名單錯誤。

我看不到我要去哪裏錯了!

回答

0

我已經改變的XML這部分 -

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

爲了這一點 -

<key>ExternalHosts</key> 
    <array> 
     <string>*</string> 
    </array> 
相關問題