并行 PhoneGap 开发 - 适用于 iPhone 和 Android 的应用程序
我即将开始使用 Sencha Touch 和 PhoneGap 开发一个应用程序。它应该可以在 iPhone 和 Android 设备上运行。我想获得有关如何以最佳方式设置我的开发环境的提示,以便能够使用 svn 上的通用代码库在两个平台(设备)上不断进行测试。
在我到目前为止所做的 PoC 中,我只有在 svn 中控制 www 文件夹版本,并签出到我的本地 Xcode 项目,然后符号链接到我的本地 Eclipse 项目(在 Xcode 中没有符号链接) ,那么它就不会在设备上运行)。这样我的所有 webapp 文件总是在两个平台上更新。然而,现在我们将有不止一名开发人员致力于此工作,并且我们也需要控制整个项目的版本。我的想法是对 Xcode 项目进行完整的版本控制(带有 www),并对没有 www 的 Eclipse 进行版本控制。然后,每个开发人员在本地将 xcode 项目中的 www checkout 符号链接到 eclipse 项目 checkout。有道理吗?大家有什么更好的想法或经验可以分享吗?
I am about to start developing an application using Sencha Touch and PhoneGap. It is supposed to be runnable on both iPhone and Android devices. I would like to get tips about how to set up my dev environment in the best way, to be able to constantly test on both platforms (device) with a common codebase on svn.
In the PoC that I have been doing until now, I have only the www-folder version controlled in svn, and checked out into my local Xcode project and then symlinked into my local Eclipse project (it didn't work to have symlink in xcode, it doesn't run on device then). This way all my webapp files are always updated in both platforms. However, now we will be more than one developer working on it, and we will need to have the whole projects version controlled too. My thought is to version control the Xcode-project in its full (with the www there), and the Eclipse without the www. Then locally each developer symlinks the www checkout from the xcode project to the eclipse project checkout. Makes sense? Anyone has any better idea or experience to share?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
最简单的方法之一是使用 Adobe 云构建平台 (PhoneGap Build) https://build.phonegap.com /
我通常在文本编辑器中尽可能多地开发并使用 Chrome 进行调试,当我深入研究特定设备功能时,我会使用 PG Build 从 Github 进行构建并将 APK 安装到 Android 模拟器中例如。
One of the easiest ways to do this is to use Adobes cloud build platform (PhoneGap Build) https://build.phonegap.com/
I usually develop as much as I can in just a text editor and debug with Chrome, when I go to dig in to specific device features I'll build from Github with PG Build and install the APK into the Android emulator for example.
我也遇到了这个问题(请参阅此问题)。从我在 PhoneGap 开发人员发布的演示中看到的情况来看,他们使用的是基于目录而不是基于项目的 IDE。有些人使用 Sublime Text 编辑器,而其他人则使用新的开源编辑器 Brackets,由 Adobe 的一些 PG 人员支持。
任一者都应该允许您的团队在 /www 文件夹中进行开发,而不是在 /platforms 目录中进行开发。目前我已经在不同的工作站上为 iOS、Android 和 WP7 设置了平台(没有方便的 Windows 8 机器来运行 WP8)。我已经使用 Brackets 大约一个月了 - 它完全无法达到与 Visual Studio / Xcode 相同的开发功能集,但它显示出了很大的前景。而且管理 PG 代码比使用 Xcode/VS(甚至 Eclipse)要容易得多。
I ran into this issue as well (see this question). From what I've seen on the demos that the PhoneGap devs have posted, they're using IDEs that are directory based rather than project based. Some are using the Sublime Text editor, while others are using the new open source editor Brackets, backed by some of the same PG people at Adobe.
Either one should allow your team to do their development in the /www folder instead of down in the /platforms directory. Currently I've got the platforms set up on different workstations for iOS, Android and WP7 (don't have a Windows 8 machine handy for WP8). I've been using Brackets for about a month -- it's not quite up to the same dev feature set as Visual Studio / Xcode, but it is showing a lot of promise. And it's a lot easier to manage the PG code than using Xcode / VS (or even Eclipse).
我也遇到过这个问题。查了网上各种解决方案,我认为合理的解决方案有3种。
1) 将 www 文件夹放在两个项目之外并对其进行符号链接
2) 将 www 文件夹放在两个项目之外并使用构建脚本复制到适当的文件夹。如果是 iOS,请使用“构建阶段”选项卡;如果是 droid,则可以使用 ant 脚本。
3)使用git子模块(或svn外部)功能。
有关 1) 和 3) 的更多详细信息,请参见 http://www .senchatouchbits.com/8/organizing-files-within-phonegap-projects.html
所有解决方案和您的项目要求(环境等)都有优点和缺点。
I have also ran into this issue. Checking various solutions on the web I think there are three reasonable solutions.
1) Place www folder outside both projects and symlink them
2) Place www folder outside both projects and use build scripts to copy to the appropriate folder. In case of iOS use the build phases tab, in case of droid you can use an ant script.
3) Use git submodule (or svn external) feature.
See 1) and 3) in more details at http://www.senchatouchbits.com/8/organizing-files-within-phonegap-projects.html
There are pros and cons for all solutions and your project's requirements (environment, etc).