简体   繁体   English

将iPhone App移植到Android平台

[英]Porting iPhone App to Android platform

I am trying to get my iPhone App on Android platform as well. 我也试图在Android平台上获取我的iPhone应用程序。 I was wondering if there is anyway I can directly port my iPhone App or Code to Android? 我想知道无论如何我可以直接将我的iPhone应用程序或代码移植到Android? Do I need to write whole App from the scratch for Android platform or is there anyway I can reduce my work? 我是否需要从头开始为Android平台编写整个应用程序,或者无论如何我可以减少我的工作? Thanks. 谢谢。

To the best of my knowledge there is no way to port apps between platforms, and there is no reason you would ever want to. 据我所知,没有办法在平台之间移植应用程序,没有理由你想要。 Android and iPhone are two wildly varying platforms both with unique interfaces, api layers, design guidelines and all sorts. Android和iPhone是两个截然不同的平台,它们都有独特的界面,api层,设计指南和各种类型。 Where you would use a navigation bar in iPhone (for instance) with a logo/title in the centre, a back button on the left and other buttons on the right, you would use an action bar in Android with a logo/title on the left hand side and action buttons on the right, possibly with a drop down for extra buttons. 如果您在iPhone中使用导航栏(例如),中间有徽标/标题,左侧是后退按钮,右侧是其他按钮,您可以在Android中使用带有徽标/标题的操作栏右侧有左侧和动作按钮,可能还有一个下拉式按钮。

Obviously there are some concepts which are "shared", such as tabbed browsing (although this is being overtaken in android by the dashboard concept and other ways of navigating) you should never port between these two platforms. 显然有一些概念是“共享的”,例如标签式浏览(虽然这是在仪表板概念和其他导航方式中被Android取代),但你永远不应该在这两个平台之间移植。 You should always start from scratch. 你应该始终从头开始。

Same goes for cross platform frameworks... there is so much that's different and unique about the two platforms that you'd be writing so much platform specific code it wouldn't be worth trying to maintain just one code base. 跨平台框架也是如此......对于你要编写如此多平台特定代码的两个平台来说,有很多不同和独特的东西,不值得尝试维护一个代码库。

I believe their isn't a program that ports it for you. 我相信他们不是一个为你移植它的程序。

Android is written in Java, however, they also developed an NDK, that is based on C++. Android是用Java编写的,但他们也开发了一种基于C ++的NDK。 So if you already wrote for the Iphone, then porting it to android with C++ (NDK) is probably easier for you then write it in Java. 因此,如果您已经为Iphone写过,那么使用C ++(NDK)将其移植到android可能更容易,然后用Java编写它。

You can use 3rd party tools to create apps that work in both. 您可以使用第三方工具创建可在两者中工作的应用程序。 That's what Titanium and PhoneGap were aiming at. 这就是Titanium和PhoneGap的目标。 With the new changes to the SDK Agreement, those look like they're not really "legal" or at least violate the agreement. 随着SDK协议的新变化,这些变化看起来并非真正“合法”或至少违反了协议。

However I am not 100% sure. 但是我不是百分百肯定。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM