Phonegap动态更新 [英] Phonegap Dynamic Updates
问题描述
我有一个使用Phonegap和Ripple构建的应用程序.这不是我测试和修改应用程序的最简单方法,因为必须在台式机上打开Chrome.我希望能够进行更改并将其反映在手机上的应用程序中.
I have an app that I am building using Phonegap and Ripple. This isn't the the easiest way for me to test and make modifications to my app as I have to have Chrome open on a desktop. I'd like to be able to make changes and have this reflected on the app on my phone.
I know there is this: https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CCkQFjAA&url=http%3A%2F%2Fideanotion.net%2Fphonegaps-ability-dynamically-updating-mobile-app%2F&ei=9J_lUvrTOMHesASx-IG4Bw&usg=AFQjCNHGMzvAldrNy8DIikP2qP2F6c-KWw&sig2=N8KT0hmslpCH0Siq5Tw28Q, so it's possible to build and ship via API.
将PhoneGap应用程序从服务器端动态更新到应用程序的最简单方法是什么?
What would be the simplest method to dynamically update a PhoneGap app from server-side to app?
推荐答案
如果听起来像是要进行测试,那么最简单的答案就是插入手机,而不是服务器". -应用更新.对于iOS,它看起来像:
If, as it sounds like, you're doing this for just testing, the easiest answer is going to be plugging your phone in, instead of a 'server-side to app' update. For iOS, this looks like:
- 保持Xcode打开,并打开一个终端标签(在您的应用根目录中)
- 运行"cordova build ios"以更新iOS应用程序
- 在Xcode中运行应用程序以在手机上将其打开
如果您在开发中使用git分支,请确保将Xcode设置为在源代码控制-> YourAppName"下使用该分支.
If you're using a git branch for your development, make sure you set Xcode to use that branch under 'Source Control -> YourAppName'.
如果您需要快速更新已部署的应用程序,则在测试时,PhoneGap Build的水化"功能是您的最佳选择. http://docs.build.phonegap.com/zh_CN/3.1 .0/tools_hydration.md.html
If you need to quickly update a deployed app, then PhoneGap Build's 'Hydration' feature is your best option while testing. http://docs.build.phonegap.com/en_US/3.1.0/tools_hydration.md.html
使用Hydration,您可以构建一个新应用程序,并且可以立即从该应用程序本身进行更新. 一旦您的手机上安装了启用了Hydration的应用程序,此过程即可:
With Hydration you can build a new application and it will be immediately updateable from the app itself. Once you have a Hydration enabled app installed on your phone, the process can be:
- 提交您的代码并推送到您的git repo
- 获取您仓库的.zip文件(使用github十分容易)
- 将该.zip上载到Phonegap Build(如果您输入了密码,则输入密码并手动点击"Build")
- 打开手机上的应用程序,它将提示您进行更新
这篇关于Phonegap动态更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!