Phonegap动态更新 [英] Phonegap Dynamic Updates

查看:78
本文介绍了Phonegap动态更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用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.

我知道这是这样的: 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-功能-动态更新移动应用程序%2F& ei = 9J_lUvrTOMHesASx-IG4Bw& usg = AFQjCNHGMzvAldrNy8DIikP2qP2F6K-TwSn = 0SnTsWhTsWhTsnWs0TwSnTwS0TwSnT0S0T通过API构建和发布.

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:

  1. 保持Xcode打开,并打开一个终端标签(在您的应用根目录中)
  2. 运行"cordova build ios"以更新iOS应用程序
  3. 在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:

  1. 提交您的代码并推送到您的git repo
  2. 获取您仓库的.zip文件(使用github十分容易)
  3. 将该.zip上载到Phonegap Build(如果您输入了密码,则输入密码并手动点击"Build")
  4. 打开手机上的应用程序,它将提示您进行更新

这篇关于Phonegap动态更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆