How to Convert an Android App to iOS?

While Android and iOS are both highly popular mobile platforms, Android has a significant advantage over iOS. Android has a 76.88% market share as of August 2018, while iOS has 20.38%. Read more details about this statistics in this GlobalStats statcounter report.

As an entrepreneur launching a mobile app, it is likely that you have looked at this statistic while doing the market research for your new project. If you have budgetary or other constraints, you might have decided to initially only launch an Android app since the platform has a much higher market share and will therefore allow you access to a larger customer base. However, the time will inevitably come when you want to target iOS customers too.

To do this, you will need to convert your app to iOS. In this article, I will describe how to convert an Android app to iOS to help you maximize the business potential of your existing Android app.

Contents

Android vs iOS key differences
Key considerations when porting Android app to iOS
Approach #1: Use the MechDome Android to iOS converter
Approach #2: Use J2ObjC for Android to iOS code porting

Android vs. iOS key differences

I generally recommend that while developing a mobile app for your startup, you should consider building both Android and iOS versions simultaneously. Aside from maximizing your customer exposure, the reason for this recommendation is that it’s not such a straightforward process to port an existing Android app to iOS.

The two platforms have several differences, for e.g.:

  1. Customizing Android is easier, while iOS isn‘t easy to customize. When you develop both versions simultaneously, you get a clearer picture up front of customization requirements. Accordingly, you can design the whole process to fit both platforms.
  2. Android is open-source code, while iOS is not. There are open-source components used in iOS, however. This does help a little.
  3. File transfer is easier with Android than it is with iOS.
  4. Kernel, UI, and other standard apps are open-source in case of Android. However, iOS kernel isn‘t open-source.

I have only mentioned the differences that are relevant to converting Android app to iOS. There are many other differences, and you can read “Android vs. iOS” for a comprehensive list. The differences I have listed above will have a big influence your planning and implementation when porting Android app to iOS. Let‘s see how.

Key considerations when porting Android app to iOS

If you are converting Android app to iOS, you need to address the following aspects:

Download Our Project Specification Template

  1. Navigation on an Android phone is different from iOS. Android phones have 3 buttons, i.e., ’Home‘, ’Back‘, and ’Multitasking‘. However, iPhones have only one ’Main‘ button.
  2. Android and iOS ’User Interfaces’ (UIs) use different design approaches. Android uses the ’Material design’, where iOS works on the ’Flat design’. This is an important factor in converting an Android app to iOS. The flat design is minimalist, and it doesn’t incorporate the 3D effects of graphics. The focus is on design functionality and simplicity. On the other hand, the material design offers greater flexibility. It incorporates grid-based layouts, animations, padding, and responsiveness. Read “Flat Design Vs Material Design, What‘s the difference?” for a detailed description of their differences.
  3. You need to keep in mind the operating system version. Your app should support the latest version of iOS (iOS 10) for example.
  4. Libraries and frameworks are different for these two platforms. Hence, you need to study and find compatible tools, frameworks, libraries, and services.
  5. The differences between the two platforms are significant, hence test your converted app thoroughly. Include integration testing, validation testing, ’user acceptance testing‘ (UAT), and beta testing in your plan.
  6. After completing your testing, you will need to submit your app to Apple‘s ’App Store‘. You need to thoroughly review the “App Store Review Guidelines”.

Let‘s now review a few approaches to convert an Android app to iOS.

Approach #1: Use the MechDome Android to iOS converter

If you don‘t have an experienced iOS development team in your ompany, then using MechDome could be a good option for you. You can complete your project to convert APK to iOS quite quickly with their Android to iOS converter.

How does MechDome work?

You need to do the following:

  1. Take your compiled Android app and upload it to MechDome.
  2. Select whether you will create an iOS app for a simulator or a real device.
  3. It will then convert your Android app to an iOS app very quickly. MechDome also optimizes it for your selected device.
  4. You are done! You can now download your new iOS app and distribute.

Considerations for using MechDome

Keep the following considerations in mind when you use MechDome:

  1. You can use the standard Android Java APIs, 3rd party Android libraries, and 3rd party Java libraries. Additionally, you can use ’Java Virtual Machine‘ (JVM)-based languages, for e.g. ’Kotlin‘.
  2. The standard iOS features and hardware support are available to you. You can use the camera, sensors, Touch IDs, and GPS. You can share data with AirDrop, and you can open URLs with the Safari browser. You don‘t need to write any specialized iOS code for these.
  3. MechDome compiles the Android app directly into fully native iOS code. The converted code is optimized. The company provides a free trial, you can sign-up for it in their “Create Account” webpage.

MechDome product features

MechDome offers the following product features:

  1. Their Android App compiler takes your Android app that you had submitted to the Google Play Store. The compiler converts your Android bytecode into optimized executable. It creates an iOS bundle, where it packages all resources and metadata. You get a standard iOS app with your Android APK contents fully reproduced.
  2. MechDome supports Android AOSP API level 22.
  3. There is no virtualization involved here.
  4. The code conversion is from binary to binary.
  5. Since the converted app runs on the iOS sandbox using iOS frameworks, security isn‘t compromised. Check the MechDome product webpage for more details.
  6. You can design the UI using tools like Android Studio. Alternatively, you can use other standard Android tools. Quartz Composer and ’Core Animation‘ will provide for high frame-rates for better user experience when you convert the app to iOS. There will not be any compromise with the ’User Experience‘ (UX).
  7. MechDome ensures integration with iOS without any code change. For e.g. push notifications raise local iOS notifications.

Advantages of MechDome

MechDome offers you the following advantages:

  1. You save iOS development time.
  2. Your team needs to maintain one codebase only, that is for the Android app. You create features for the Android app only.
  3. Upgrading to a new iOS release is easy, you just reconvert your app.
  4. You reuse your entire Android app code.
  5. It‘s not just converting new apps, but you can convert your existing ones too. More on this when I explain their pricing plan.
  6. Your development team probably has only Android skills, and that’s fine! You don’t need any proprietary tools or separate training.

MechDome product documentation

The company provides excellent product documentation, which you can view in the MechDome Docs webpage. There is also a ’Frequently Asked Questions’ (FAQ) section.

There are instructions for installing your converted app. They guide you for installing it in iOS simulators as well as iOS devices.

MechDome informs customers that they don‘t support certain Android packages and features. For e.g. there are no equivalent functionalities for widgets, root access, wallpapers, etc. They plan to support a few Android APIs like RenderScript, Bluetooth, ’Battery Manager’ in the future.

They also have a few optional features, for e.g., ’AdMob‘. MechDome supports a few ad formats like banner ads, and ’Native Ads Express‘. However, they don‘t yet support ’Native Ads Advanced‘.

Similarly, they support some of the Google Firebase APIs, like ’Realtime Database‘, and authentication. On the other hand, they don‘t support a few APIs like crash reporting. Head to their site to find out more.

MechDome pricing

As I mentioned earlier, you can also convert your existing Android apps to iOS. MechDome offers packages with varying prices depending on what service you require. For e.g. with the basic plan, you can convert 3 android apps a month to iOS. Alternatively, 5 conversions to iOS simulators are allowed in a week.

If you buy more expensive plans, you can convert more per month. Also, you can convert more features such as maps and ’Google Places‘ when using their premium priced plans. There is also a higher level of technical support with premium plans, something more inexperienced development teams will appreciate. Check out their price information in the MechDome pricing webpage.

You can continue to use your existing ’Mobile Backend as a Service‘ (MBaaS) account, for e.g., Google Firebase. MechDome doesn‘t charge you for runtime. If you need guidance about MBaaS providers, read “How To Choose The Best Mobile Backend As A Service (MBaaS)?”.

Read How We Helped a Marketing Company to Build a Back-Office Custom Ads Dashboard

Approach #2: Use J2ObjC for Android to iOS code porting

This approach uses an open-source command-line tool called “J2ObjC”. This tool, created by Google, translates Java source code to Objective-C, which is the iOS platform language. If you want to use this approach for your project, then you need to have a skilled iOS development team. It‘s a more complex approach than using the MechDome converter, and so requires extensive software development knowledge.

What is J2ObjC?

The tool allows you to keep Java source code within an iOS application. There is no need to edit the generated files. Your Android app has non-UI codes, for e.g. application logic, and data model. You are likely to have developed them using Java. With this tool, you can use it for your proposed iOS app too.

J2ObjC supports most Java language and runtime features. That includes exceptions, various classes, generic types, etc. You can also have JUnit test translation. However, the tool doesn‘t include any platform-independent UI toolkit. You still need to write iOS UI code, and you need a development team for that.

Note that unlike MechDome, which converted binary to binary, J2ObjC is unable to make this conversion. Instead, your team needs to access to the Java source code from your Android app.

You need an iOS development team

UI code for iOS is usually in Objective-C, Objective-C++, or Swift. iOS developers use Apple‘s iOS ’software development kit‘ (SDK) to code iOS UIs. Hence, you need 2 iOS developers with these skills. You will also need a UI designer.

As you can see, this tool will help you with porting application logic and data model related code, however, you need to test it thoroughly. Hence, you need to have 1-2 testers. Additionally, you need a project manager with iOS development project experience.

Requirements for using J2ObjC

Your team needs to meet the following pre-requisites:

  • They need JDK 1.8 or higher;
  • Mac laptop;
  • Mac OS X 10.11 or higher;
  • Xcode 7 or higher.

I recommend your team to review the following guides before they start with this project:

  1. Using J2Objc with Xcode;
  2. Using J2ObjC with Make;
  3. Using J2ObjC with Eclipse, assuming your team will use the Eclipse IDE;
  4. Required Link Settings;
  5. Translating JUnit Tests;
  6. Gradle Plugin for J2ObjC;
  7. Maven Plugin for J2ObjC.

J2ObjC reference documentation for your team

The J2ObjC project has good reference documentation. Your iOS development team needs to study the following reference documents in-depth:

  1. J2ObjC common options;
  2. J2ObjC translation options;
  3. J2ObjC non-standard options.

Additional useful guides for working with J2ObjC

There are additional important guides for your team, and they are as follows:

  1. Translation reference;
  2. Reading Generated Sources;
  3. Changing Method Names;
  4. Writing Native Methods;
  5. Memory Management;
  6. J2ObjC Memory Model;
  7. Dead Code Elimination.

This is not an exhaustive list, and the project team has more documentation for reference.

J2ObjC installation and source code

Your team can download J2ObjC and install it following instructions in the Google/J2ObjC GitHub repository. The team can also view the source in the Google / J2ObjC GitHub webpage.

Cost estimate for converting an Android app to iOS using J2ObjC

With this approach, you are required to build a significant part of the app from scratch since J2ObjC doesn‘t help with UI coding. I recommend, for a medium complexity app, that you hire a team of 1 UI designer, 2 or more iOS developers, 1-2 testers, and a PM with iOS development experience, for 2 months.

Keep in mind that your geographical location will heavily impact your labor costs. In many parts of the world, iOS development is considered a niche, hence, you will need to pay more for outside professional help.

 

To conclude, I have described two approaches for Android to iOS conversion. The first one utilizes MechDome and doesn‘t require a skilled iOS development team. This provides you with better time-to-market for your business. However, I have highlighted the limitations of this tool.

The second approach is more complex and requires a lot of custom development. Naturally, this will take longer and require a bigger and more experienced team. Your team should read the J2ObjC guides and tips thoroughly before starting. Depending on the complexity of your app, this approach could cost you more, but is more likely to yield better results. Good Luck!

Download Our Project Specification Template