简体   繁体   English

有没有一种简单的方法将我的苹果应用程序转换为Android应用程序?

[英]Is there an easy way to convert my apple apps into android apps?

I am an app developer and I use Xcode to develop all my apps, but seeing in today's market a lot of people now have non apple devices. 我是一名应用程序开发人员,我使用Xcode开发我的所有应用程序,但在今天的市场中看到很多人现在都拥有非苹果设备。 So I guess I'm wondering if there's an easy way to take my code for my apple apps and convert it to android format so I can submit to both markets? 所以我想我想知道是否有一种简单的方法来获取我的苹果应用程序的代码并将其转换为Android格式,以便我可以提交给两个市场?

Also does Android have their own version of "iAds"? Android也有自己版本的“iAds”吗?

I agree with Ben, I was in the same boat a few months ago since the only mobile development I had done was on Xcode and I was trying to find ways to convert my existing project but instead I opted to just build a new version using Android Studio. 我同意Ben的观点,几个月前我在同一条船上,因为我所做的唯一移动开发是在Xcode上,我试图找到转换现有项目的方法,但我选择使用Android构建新版本工作室。 As Ben said, even if you convert the iOS app, some of the UI and design patterns are different when comparing an iOS App to an Android App (for example iOS uses tableviews and the cells can have disclosure indicators while on Android you would need to use a list view and not use a disclosure indicator since it goes against the design patterns for Android). 正如Ben所说,即使您转换iOS应用程序,在将iOS应用程序与Android应用程序进行比较时,一些UI和设计模式也不同(例如iOS使用的是tableviews,而单元格可以在Android上使用披露指示符,您需要使用列表视图而不使用披露指标,因为它违反了Android的设计模式。 I would suggest taking a look at the Android documentation, specifically the recommended design patterns as that will help give you an idea of how much you would need to change to make your code work for Android. 我建议您查看Android文档,特别是推荐的设计模式,这将有助于您了解需要更改多少才能使代码适用于Android。

You can use your iOS app's code as a guide to your Android app since even though the language is different, the overall structure would be pretty close. 您可以使用iOS应用程序的代码作为Android应用程序的指南,因为即使语言不同,整体结构也会非常接近。

You could share some parts of your android application with iOs using j2objc which converts java to objective-c. 您可以使用j2objc与iOs共享您的Android应用程序的某些部分,它将java转换为objective-c。 However anything that relies on the android framework will not work (the same would apply if you found something to convert it obj-c to java). 然而,依赖于android框架的任何东西都不会起作用(如果你发现将obj-c转换为java的话,同样适用)。

You could use something like Phonegap or Appcelerator . 你可以使用像PhonegapAppcelerator这样的东西。 You would write code in javascript, HTML, CSS and then it would create iOS and android applications for you. 你可以用javascript,HTML,CSS编写代码然后它会为你创建iOS和Android应用程序。

However there is some things that cannot be done using these technologies. 然而,使用这些技术有些事情无法完成。 I know that to get around this appcelerator allows you to create native modules. 我知道绕过这个appcelerator可以让你创建本机模块。

You will never get an app on both platforms for 'free' there is always a cost involved whether it requires more work or you loose some features on one or both the platforms. 您永远不会在两个平台上获得“免费”的应用程序,无论是需要更多工作还是在一个或两个平台上放弃某些功能,总会产生成本。

You need to work out how complex your application is going to be and what parts could be separated into a shared module/library. 您需要弄清楚应用程序的复杂程度以及可以将哪些部分分成共享模块/库。 You would also need to consider how you are going to visually represent your app, it would be easier to come up with some middle ground between android and iOS than it would be to create iOS visuals on android or vice-versa. 您还需要考虑如何直观地表示您的应用程序,在Android和iOS之间建立一些中间地点比在Android上创建iOS视觉效果更容易,反之亦然。

If your making a game take a look at unity 如果你制作游戏看看团结

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

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