Java 将 iPhone 应用程序移植到 Android

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2633742/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 10:07:38  来源:igfitidea点击:

Port iPhone application to Android

javaiphoneobjective-candroid

提问by wgpubs

What is the most efficient way to port an iPhone app to Android? I know Apple doesn't like 3rd-party, non-Objective C platforms generating code for their platform ... but is there something out there that can take an iPhone app and convert it to Android friendly code?

将 iPhone 应用程序移植到 Android 的最有效方法是什么?我知道 Apple 不喜欢为他们的平台生成代码的 3rd 方、非 Objective C 平台……但是有什么东西可以将 iPhone 应用程序转换为 Android 友好代码吗?

If not, how have folks out there been creating Android versions of their existing iPhone apps?

如果没有,人们是如何为他们现有的 iPhone 应用程序创建 Android 版本的?

Thanks

谢谢

采纳答案by John Wang

There's nothing of the sort to port your app. You can use 3rd party tools to create apps that work in both. That's what Titaniumand PhoneGapwere aiming at. With the new changes to the SDK Agreement, those look like they're not really "legal" or at least violate the agreement.

没有任何东西可以移植您的应用程序。您可以使用 3rd 方工具来创建可在两者中使用的应用程序。这就是TitaniumPhoneGap的目标。随着 SDK 协议的新变化,那些看起来并不真正“合法”或至少违反了协议。

As for your other question, yes, people do create 2 separate apps. One for Android and one for iPhone. That's the way I currently do it and seems as if Facebook and others do the same.

至于你的另一个问题,是的,人们确实创建了 2 个独立的应用程序。一种用于 Android,一种用于 iPhone。这就是我目前这样做的方式,似乎 Facebook 和其他人也这样做。

回答by Rajnikant

There are few alternatives to port an app from one platform to other. like Rhodes Mobile, Titanium and PhoneGap. In fact they did a good job and tried very well to remove fragmentation in smart phone app development.

将应用程序从一个平台移植到另一个平台的替代方法很少。如 Rhodes Mobile、Titanium 和 PhoneGap。事实上,他们做得很好,并在消除智能手机应用程序开发中的碎片化方面做了很好的尝试。

But according to Apple's SDK Agreement version 4.0, section 3.3.1

但是根据Apple的SDK协议版本4.0,第3.3.1节

app must be developed in C/C++/JAVA script.

应用程序必须使用 C/C++/JAVA 脚本开发。

At this stage convincing way is to write it separately.

现阶段比较有说服力的方法是单独写。

回答by Appiction

Yeah, people don't usually love the answer that we have for this one at Appiction. It seems like it should be easy since they are so similar, but they are completely different operating systems with different ways of being used. Sometimes a company will be able to cut a deal with you since the art has already be developed and the basic wireframes have been conceived. At Appiction we created a video to answer this exact question for our clients: http://www.youtube.com/watch?v=Y-fdRw1WNYI

是的,人们通常不喜欢我们在 Appiction 上为这个问题提供的答案。看起来应该很容易,因为它们非常相似,但它们是完全不同的操作系统,使用方式不同。有时,由于艺术已经开发并且基本线框已经构思,公司将能够与您达成协议。在 Appiction,我们制作了一个视频来为我们的客户回答这个确切的问题:http: //www.youtube.com/watch?v=Y-fdRw1WNYI

回答by gregg

There really isn't a short cut to porting. The best thing you can do is use a company that specializes in porting, like migration.mobi. The cross-platform frameworks have performance problems and really limit what you're able to do.

移植真的没有捷径可走。您能做的最好的事情是使用专门从事移植的公司,例如 migration.mobi。跨平台框架存在性能问题,并且确实限制了您的能力。

Games are a different story altogether, so be ready for different answers if you've been a complex real-time game on iPhone and you want it to work on another platform.

游戏完全是另一回事,所以如果您在 iPhone 上玩过复杂的实时游戏并且希望它在另一个平台上运行,请准备好接受不同的答案。

回答by Anshul

PhoneGap is not a true cross platform app development tool.
If you want to create an app for both iPhone and Android using PhoneGap, then you have to create two different apps that will make use of PhoneGap framework. But one single app for iPhone and Android can't be created using PhoneGap.

PhoneGap 不是真正的跨平台应用程序开发工具。
如果您想使用 PhoneGap 为 iPhone 和 Android 创建一个应用程序,那么您必须创建两个不同的应用程序来使用 PhoneGap 框架。但是不能使用PhoneGap 为iPhone 和Android 创建一个应用程序。

回答by Mathesoft

At android there are 2 categories: the lower one, with g1 and the better with Nexus 1 if you want to develop games. Those cross platform libraries I think they can do cross platform "Hello word" applications. To generate a correct Blackberry networking application or an optimized Android graphic application (to both categories), I highly doubt it!

在 android 上有 2 个类别:较低的类别,g1 和 Nexus 1 更好,如果你想开发游戏。那些跨平台库我认为他们可以做跨平台的“Hello word”应用程序。要生成正确的 Blackberry 网络应用程序或优化的 Android 图形应用程序(针对这两个类别),我非常怀疑!

  • the frameworks has the big cons, when you want to look outside of the sandbox. Those 3-4 custom stuff, plugin often cost more, than the whole application written fast until that point.
  • 当您想在沙箱之外查看时,这些框架有很大的缺点。那些 3 到 4 个自定义的东西,插件通常比在那时快速编写的整个应用程序花费更多。

So, "Hello word" +very basic, only soft stuff with cross platform. High performance, nice graphic, easier to bugfix, support, professional work: develop for each platform and categories.

所以,“Hello word”+非常基本的,只有跨平台的软东西。高性能,漂亮的图形,更容易修复错误,支持,专业工作:为每个平台和类别开发。

回答by liamcampbell

Noodlecake Studiosappear to have solved the issue of porting from iOS to Android, recently porting Trainyard among others:

Noodlecake Studios似乎已经解决了从 iOS 移植到 Android 的问题,最近移植了 Trainyard 等:

Its no secret that the process of porting iOS games to the Android platform has been met with rough waters... These issues are familiar to us at Noodlecake Studios and prompted the creation of Noodlecake Games, a porting and publishing entity designed to alleviate many of these problems. Through our efforts over the past year, we have developed technology that allows us run iOS code natively on android devices. What that means for developers is there is no need to rewrite iOS code for the Android platform, it all runs automatically. To be expected, many developers at first didn't believe what we were doing was even possible.

众所周知,将 iOS 游戏移植到 Android 平台的过程遇到了波涛汹涌的水域......这些问题对我们 Noodlecake Studios 来说很熟悉,并促使 Noodlecake Games 的创建,这是一个移植和发布实体,旨在缓解许多这些问题。通过我们过去一年的努力,我们开发了允许我们在 Android 设备上本地运行 iOS 代码的技术。对于开发人员来说,这意味着无需为 Android 平台重写 iOS 代码,一切都会自动运行。不出所料,许多开发人员起初并不相信我们正在做的事情是可能的。

回答by Paul Beusterien

Apportableprovides a platform to build and deploy existing Objective C apps to Android.

Apportable提供了一个平台来构建和部署现有的 Objective C 应用到 Android。

回答by Cal

There actually is a tool that does exactly what you're asking called O2J. You can leverage your existing Objective-C codebase and convert it to Java with the O2J conversion tool.

实际上有一种工具可以完全满足您的要求,称为 O2J。您可以利用现有的 Objective-C 代码库并使用 O2J 转换工具将其转换为 Java。

It's a paid app available on the Mac App Store... O2J Objective-C to Java Converter

这是 Mac App Store 上提供的付费应用程序... O2J Objective-C to Java Converter

Most of the time it's preferable to have a native UI and native code for performance, working with the platform UI paradigms and to take advantage of platform specific APIs/services.

大多数情况下,最好使用本机 UI 和本机代码来提高性能、使用平台 UI 范例并利用平台特定的 API/服务。