Native iOS/android application to Windows Phone
Asked Answered
A

5

8

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.

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).

Can I go from Android to Windows Phone or from iOS to Windows Phone?

PhoneGap - or similar platforms - are not options since the code is already written in Objective-C and Java.

Aaron answered 18/1, 2014 at 8:20 Comment(1)
The main question actually is if it possible to port a iphone app (or android) to windows phone directly without code modifyAaron
B
8

Like iOS and Android, Windows Phone is a completely different operating system and currently requires a completely different development platform.

It is not possible to take the existing code and make it function on a Windows Phone.

  • 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++.

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.

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.

Microsoft has provided some guidance on porting, and provided some links with an API equivalency table here.

Barbarous answered 22/1, 2014 at 2:22 Comment(2)
@Avanz, there are a lot of multiplatform technologies, like phonegap, xamarin, codename one, qt. But any of them let you port an app to other platform if you didn't build that app using that platform on the first place. In the question the OP says "PhoneGap - or similar platforms - are not options since the code is already written in objective c and java.", so stop commenting it's possible with QT, because it's not, if he has native code, that native code won't work on other platformsPropagandist
The whole iOS app is built with objective-c, the whole android app is built with java, I don't know where did you get that he used c++, because I haven't read it from cateof. So there is no easy or instant port. Even if you use codename one, that uses java for development, the existing android java code won't work. It's clear to us that you can use c++ for cross-platform development, but that isn't the question herePropagandist
K
3

Yes, you can use Microsoft's Windows bridge for iOS to convert your iOS application code to Windows mobile platform code.

You need to use WinObjC SDK provided by Microsoft for this purpose.

Follow this link for more details.

Karyotin answered 21/8, 2015 at 5:21 Comment(0)
P
2

No, you can't, WP apps are build with c# or .net and in visual studio IDE. There is no automated way to port a previously coded ios or android native app built with objetive-c or java to WP.

Propagandist answered 20/1, 2014 at 9:26 Comment(0)
H
1

In my opinion there is no way to directly port a iphone app to windows phone app. You need to develop windows phone app with its needed environment like Visual Studio , windows phone sdk and with windows os.

You can also use cross platform like phonegap if it may fit to your requirement.

Hypervitaminosis answered 18/1, 2014 at 8:32 Comment(0)
L
1

It looks like you have an existing Obj-C codebase for iOS, and a Java codebase for Android. No matter how you cut it, you're looking at [re]writing code to get something on WP8.

I don't know how "UI heavy" your app is; in general the UI code is the most platform specific (unless you're willing to put up with "cross platform" stuff that might not have good UX).

You might consider keeping the non-UI code mostly plain C++ and using Obj-C, etc. only for the parts where you have to talk to the framework. It will be easier to support multiple platforms with C++.

I took this approach with an app I'm working on; it's targeted for iOS but it's about 80% C++ (including Open GL). If I decide to port to Android I just need to deal with the 20%, mostly UI-ish code.

Lenalenard answered 27/1, 2014 at 6:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.