原生的iOS / Android应用到Windows Phone [英] Native iOS/android application to Windows Phone
问题描述
我有一个iPhone应用程序(使用一个Android对应),开发了X code和用Objective-C。这是一个经典的原生iOS应用,已经工作,在App Store上传。同样,Android版本是建立在Java和Android的软件开发工具包联系在一起。它上传到市场上。
I have an iPhone application (with an android counterpart), developed in Xcode and written in Objective-C. It is a classical native iOS app, already working and uploaded in the App Store. Similarly, the android version is built with Java and linked with the android SDKs. It's uploaded to the market place.
有人问我端口应用程序到Windows Phone。这是可能的,而无需修改code? 我不熟悉Windows Phone的开发,但它看起来就像是一个完全 开发应用程序独立的生态系统(不同的编程语言,不同的IDE,不同的应用程序商店等)。
I was asked to port the app to Windows Phone. Is this possible without modifying the code? I am not familiar with Windows Phone dev, however it looks like that is a completely separate ecosystem for developing apps (different programming language, different IDE, different app store etc).
我可以从安卓到Windows Phone或iOS系统的Windows Phone?
Can I go from Android to Windows Phone or from iOS to Windows Phone?
PhoneGap的 - 或者类似的平台 - 不是因为code已经用Objective-C和Java选项。
PhoneGap - or similar platforms - are not options since the code is already written in Objective-C and Java.
推荐答案
像iOS和Android,Windows Phone的是一个完全不同的操作系统,目前需要一个完全不同的开发平台。
Like iOS and Android, Windows Phone is a completely different operating system and currently requires a completely different development platform.
这是不可能把现有的code,使其在Windows Phone的功能。
It is not possible to take the existing code and make it function on a Windows Phone.
- 的iOS 通常使用的Objective-C的应用开发。即使有办法编译的Objective-C到Windows手机,这将是本质上依赖于平台的功能和用户界面控件。虽然你可以写一些code C ++和共享,与iOS应用程序,你仍然需要的一些在Objective-C 。
- 机器人应用程序使用Java正常。 Java是不适用于Windows Phone平台。所以,语言的。此外,像的iOS,平台特征不一定共享和UI控制和行为是不同的。 Android应用程序可以使用C ++(如果你使用它发生在code),但它有限制一>,通过使用它,再次,你会追平了code到Android平台可能。有些code可以移植的。
- 的Windows Phone 应用程序通常用C#/ C ++和XAML或DirectX。虽然在语言中的某些相似性(Java和C#),你会遇到,可能需要显著的努力转换更为平台的差异。从路网的请求作出处理线程将是不同的(和许多许多)。 Objective-C的也是从C非常不同++。
- iOS commonly uses Objective-C for application development . Even if there was a way to compile Objective-C onto a Windows Phone, it would be inherently tied to platform features, and UI controls. While you could write some code in C++ and share it, with an iOS application, you'll still need some in Objective-C.
- Android applications use Java normally. Java is not available for the Windows Phone platform. So, the language is out. Further, like iOS, the platform features are not necessarily shared and the UI control and behaviors are different. Android applications can use C++ (if you happened to code using it), but it has limitations, and by using it, again, you'd be tying the code to the Android platform potentially. Some code may be portable.
- Windows Phone applications are usually written in C#/C++ and XAML or DirectX. While there is some similarity in languages (Java and C#), you'll encounter far more platform differences that could need significant effort to convert. From the way network requests are made to handling threads will be different (and many many more). Objective-C is also very different from C++.
除非你使用过类似 Xamarin 并通过编写一个通用的平台(C#/。NET)的基本商业逻辑,你需要考虑移植到Windows Phone的一个新的开始。
Unless you had used something like Xamarin and written the underlying business logic using a common platform (C#/.NET), you'll need to consider a port to Windows Phone a fresh start.
这是不可能只重用所有这一切一直写在code。通过仔细的努力,你可以有一些共同的code(如果它被写在C ++),但作为共享code将不直接与用户界面(和其他平台的特性)的工作,你仍然需要做在UI每个平台上,变通的限制,并有可能定制每个平台的用户体验。
It's not possible to just reuse all of the code that's been written. With a careful effort, you could share some common code (if it were written in C++), but as the shared code will not directly work with UI (and other platform features), you'd still need to do the UI on each platform, work around limitations, and potentially customize the user experience for each platform.
微软已经提供了对移植一些指导,并提供了一些环节使用API等效表<一个href="http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh394031%28v=vs.105%29.aspx">here.
Microsoft has provided some guidance on porting, and provided some links with an API equivalency table here.
这篇关于原生的iOS / Android应用到Windows Phone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!