java 如何将Android应用移植到iOS平台?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3686450/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to port Android application to iOS platform?
提问by Fran Fitzpatrick
I'm developing an Android application and I would really like to deploy it for the iPhone as well.
我正在开发一个 Android 应用程序,我真的很想为 iPhone 部署它。
However, I do not know Objective-C and I think it would take an annoyingly long time to figure that and the Apple framework out.
但是,我不了解 Objective-C,我认为弄清楚这一点和 Apple 框架需要很长时间。
Is there a recommended way to port an Android application to iOS? Would the best bet be to hire a freelancer?
是否有推荐的方法将 Android 应用程序移植到 iOS?最好的办法是聘请自由职业者吗?
回答by Big Rich
On the run now (home time ;-) ), so my answer will be concise (sorry)
现在正在跑步(回家时间;-)),所以我的回答会很简洁(抱歉)
Take a look at/Google (in no particular order):
看看/谷歌(排名不分先后):
MoSync <- Compiles C++ native apps to several mobile platforms, including Android and IOS, GPL for non-commercial projects.
MoSync <- 将 C++ 原生应用程序编译到多个移动平台,包括 Android 和 IOS,非商业项目的 GPL。
AirplaySDK: Similar to MoSync, mainly commercial, has some free licensing for one of the 2 environments you're after (believe that's IOS, please verify yourself). Has been used comercially by Konami, Activision etc.
AirplaySDK:与 MoSync 类似,主要是商业版,为您所追求的 2 个环境之一提供一些免费许可(相信这是 IOS,请自行验证)。已被 Konami、Activision 等商业使用。
OpenFrameworks (OF) - Collections of C++ 'wrapper' code which enables unified cross-platform development of Audio/Visual projects (could be used for Games etc). The Android port is beta, see Android/Eclipse/OF Installationand the Android port's GitHub repository/developer (branch 0062_Android). The iPhone-specific code is quite complete (accelerometer access, etc. etc.).
OpenFrameworks (OF) - C++ 'wrapper' 代码的集合,它支持音频/视觉项目的统一跨平台开发(可用于游戏等)。Android 移植是测试版,参见Android/Eclipse/OF 安装和Android 移植的 GitHub 存储库/开发者(分支 0062_Android)。iPhone 特定的代码非常完整(加速度计访问等)。
XMLVM - It allows some level of porting from Java to a native IOS executable. Not sure how far forward this project is, and you might need to implement some of their framework classes (relatively trivial if you've got good separation of your existing Java libs).
XMLVM - 它允许某种程度的从 Java 移植到本地 IOS 可执行文件。不确定这个项目有多远,您可能需要实现他们的一些框架类(如果您已经很好地分离了现有的 Java 库,则相对简单)。
Personally, I'm looking at OpenFrameworks right now, mainly as I like the 'One API' concept and I'm avoidingObjective-C for the moment (Want to ease myself in, I'm a Java/C# dev).
就我个人而言,我现在正在研究 OpenFrameworks,主要是因为我喜欢“一个 API”的概念,而且我目前正在避免使用Objective-C(想要让自己轻松一点,我是一名 Java/C# 开发人员)。
Edit: Notice that since this answer was written XMLVM development has stopped. Also Codename Onecame out in the interim and provides a path for Java developers.
编辑:请注意,自从编写此答案以来,XMLVM 开发已停止。此外代号一个在此期间出来,并为Java开发人员的路径。
Cheers
干杯
Rich
富有的
回答by Thorbj?rn Ravn Andersen
Right now I've only seen MonoTouch (now Xamarin) available for cross platform development, which allows you to develop in .NET targetting the iPhone.
现在我只看到 MonoTouch(现在是Xamarin)可用于跨平台开发,它允许您在 .NET 中针对 iPhone 进行开发。
I have not seen a similar product for Android, but would a .NET based conversion process be feasible? The pricing is not outrageous.
我还没有看到类似的 Android 产品,但是基于 .NET 的转换过程是否可行?定价并不离谱。
回答by logancautrell
Your best bet for X-plat is HTML 5.
X-plat 的最佳选择是 HTML 5。
You will not be able to automagically port your native code because Android and iPhone use completely different patterns for developing all aspects of "the app".
您将无法自动移植您的本机代码,因为 Android 和 iPhone 使用完全不同的模式来开发“应用程序”的各个方面。