PhoneGap官網(wǎng)翻譯 開(kāi)發(fā)中常見(jiàn)問(wèn)題文檔
Q. I have an issue with PhoneGap for iOS?
A. See “PhoneGap for iOS FAQ”
問(wèn):對(duì)于iOS PhoneGap我有一個(gè)問(wèn)題?
答:請(qǐng)參考“iOS PhoneGap常見(jiàn)問(wèn)題”。
Q. Do I need to “Jailbreak” my iphone to use iPhone PhoneGap?
A. No.
問(wèn):我需要“Jailbreak”我的iphone去使用iPhone PhoneGap嗎?
答:不需要。
Q. What PhoneGap apps are available in the iPhone store?
A. projects
問(wèn)題:在iPhone 商店里面什么樣的PhoneGap應(yīng)用程序可以使用?
答案:項(xiàng)目
Q. How do you change the default PhoneGap loading screen?
A. Change the default.png file to one of your liking.
問(wèn):如何更改PhoneGap默認(rèn)的載入畫(huà)面?
答:將default.png文件改成你喜歡的圖片。
Q. I get errors while building my iPhone app in Xcode.
A. See the known problems & solutions.
問(wèn):當(dāng)我在Xcode上生成我的iPhone應(yīng)用程序時(shí),遇到了一個(gè)錯(cuò)誤。
答:請(qǐng)參考 已知問(wèn)題和解決方案。
Q. What’s this I hear about Apple rejecting PhoneGap apps? Will my app get rejected?
A. Of course, Apple always has the final say. As of version 0.8, PhoneGap apps should be okay. (or PDF) Also, Apple has done a technical review, and PhoneGap apps should be ok and each app will be judged on its own merits.
問(wèn):我聽(tīng)說(shuō)Apple拒絕PhoneGap的應(yīng)用程序,我的應(yīng)用程序會(huì)被拒絕嗎?
答:當(dāng)然,蘋(píng)果擁有最終的決定權(quán)。0.8版的PhoneGap應(yīng)用程序應(yīng)該是沒(méi)有問(wèn)題的(或者PDF),此外,Apple已經(jīng)做了技術(shù)審查,并且PhoneGap應(yīng)用程序是沒(méi)有問(wèn)題的, each app will be judged on its own merits.
Q. I’m using navigator.geolocation on the iPhone, why does it show a popup alert with a funny url to my index.html file?
A. On iPhone OS 3.x, UIWebView’s navigator.geolocation takes over, which will use the native Javascript API for it. This shows the warning and the location of the page asking for the location permission. Discussion here.
The latest solution for iPhone OS 4.x and PhoneGap 0.9.x is to follow the example of the docs for and add an event listener that waits for the device to be ready, otherwise the native navigator.geolocation is used and you get an alert like this: “var/mobile/Applications/UUID/appname.app/www/index.html” Would Like To Use Your Current Location.
問(wèn):我在iPhone上使用navigator.geolocation,為什么會(huì)彈出有一個(gè)奇怪的url到指向我的index.html文件的提示? (為什么會(huì)彈出一個(gè)指向我的index.html文件的奇怪的url的提示?)
答:在iPhone OS 3.x中,UIWebView中的navigator.geolocation將會(huì)使用本地的Javascript API來(lái)接管他,這樣就會(huì)出現(xiàn)警告,并且要求頁(yè)面所在的路徑有權(quán)限。這里有討論。
Q. Why do the iPhone PhoneGap functions not work when navigating to another local html file from index.html?
A. See this bug for discussion.
問(wèn):當(dāng)從index.html導(dǎo)航到其他本地的html文件時(shí),為什么iPhone PhoneGap功能不能運(yùn)行?
答:請(qǐng)參考這里對(duì)錯(cuò)誤的討論。
Q. Can I just create an iPhone PhoneGap-based app that just loads my website?
A.You can, but as for Apple approving it, that’s another matter, and they most likely won’t. As a rule of thumb, if there is no Internet connection, you must at least load the UI (your views) without the corresponding data, and put an error notice to that effect. Therefore your app must have these views included in it. For a guideline, set your iPhone to Airplane Mode in the Settings, then load either the Maps, Weather, Youtube, ITunes or Facebook apps, and see what they do (have a “shell”). Apple is probably concerned about them approving your app based on your app description and functionality as promised by you, and then you turning around and changing it completely after approval to something undesirable.
問(wèn):我可以創(chuàng)建一個(gè)iPhone PhoneGap-based 應(yīng)用程序只加載我的網(wǎng)站嗎?
答: 可以,但是要被Apple批準(zhǔn),那就是另外一件事情 (這是另一回事) ,他們很有可能不會(huì)。根據(jù)經(jīng)驗(yàn),如果沒(méi)有連接互聯(lián)網(wǎng),你必須加載UI(你的意見(jiàn))沒(méi)有相應(yīng)的數(shù)據(jù),會(huì)產(chǎn)生一個(gè)錯(cuò)誤提示。因此,你的應(yīng)用程序必須有這些包含它的意見(jiàn)。有一個(gè)規(guī)定,在你的配置中將你的iPhone設(shè)置為Airplane模式,然后無(wú)論是加載地圖,天氣,原鏈接、Itunes或者Facebook應(yīng)用程序,看看他們做了什么(有一個(gè)“shell”)。Apple可能關(guān)心 批準(zhǔn)你許諾你的應(yīng)用程序的描述和功能,在批準(zhǔn)以后,你將他完全修改一些不可取的內(nèi)容。
Q. Is the Edge version “safe” to use, since its architecture has evolved? Apple has “approved” only 0.8.0 right, so will using anything else be unsafe?
A. The architecture has evolved only externally to make it easier to develop for, and easier to deploy for users (so if we update the core code, users will not have to integrate it in to their existing code, a big hassle with 0.8.0 and lower). Internally everything is the same, the way we handle commands, etc.
If you are looking for assurances of ultimate safety, there will be none, since Apple can change their mind no matter what they said before. We have never submitted anything to Apple to validate, they are the ones that chose to do so with the last version (a security review), and with any upcoming versions, it will be their decision ultimately.
問(wèn):Edge 版本是可以“安全”使用,因?yàn)樗募軜?gòu)已經(jīng)演變了?Apple只“批準(zhǔn)”0.8.0的版權(quán),因此使用任何東西都是不安全的?
答:已經(jīng)演變的架構(gòu)只是外部使用戶(hù)更容易開(kāi)發(fā)、部署(因此如果我們修改核心代碼,用戶(hù)將不會(huì)與他們現(xiàn)在有的代碼進(jìn)行集成,0.8.0版本和更低的版本都會(huì)遇到這個(gè)大問(wèn)題)內(nèi)部任何事情都是一樣的,我們處理命令的方式,等等。
如果你正在尋找最終的安全保證,沒(méi)有。因?yàn)樵贏pple在沒(méi)有說(shuō)任何問(wèn)題之前,他可以改變主意。我們從來(lái)沒(méi)有提交過(guò)任何事情讓Apple去驗(yàn)證,他們一旦選擇這樣做了,***的版本(a security review),和任何即將到來(lái)的版本,將成為他們最終的決定。
Q. I want to create an application for phonegap to access externally deployed web services via AJAX. How can i resolve the issue with the cross-domain security policy of XmlHttpRequest?
A. The cross-domain security policy does not affect PhoneGap applications. Since the html files are called by webkit with the file:// protocol, the security policy does not apply.
(in Android,you may grant android.permission.INTERNET to your app by edit the AndroidManifest.xml)
問(wèn):我要?jiǎng)?chuàng)建一個(gè)通過(guò)Ajax訪問(wèn)PhoneGap外部部署的Web服務(wù)應(yīng)用程序,我怎樣解決XmlHttpRequest的跨域的安全策略?
答:跨域安全策略不會(huì)影響PhoneGap應(yīng)用。由于html文件被webkit用 file:// protocol,安全策略并不適用。

















