I have a program written in Java (for Android). Now you need to write a similar for iOS. In my program, the model is quite well separated from the UI, and all this logic in the iOS program will be the same. I began to rewrite it all with my hands, but now I understand that it will take too much time. Especially when errors appear, it will be necessary to make the same changes in both applications.

Is it possible to somehow quickly generate Objectve-C code from Java code?

    3 answers 3

    I would not try to go that way. All the same, the android and IOS have different behaviors. For example, an application on an android should always be ready to be closed, but under the IOS, the application is given some time to complete the work. The presence-lack of applications in the background, the presence of a garbage collector and the need to monitor resources. Therefore, it’s still more correct to simply rewrite. But there is one workaround. Android allows you to write part of the application on s / s ++ (ndk, although this is not recommended), for IOS, as far as I know, you can also write on s. Therefore, we write the graphic part for each platform, and the complex logic is simply recompiled.

      You can rewrite the logic in C ++, and then only UI will remain in Obj-C / Java. And converting, this is certainly something of a series of fiction (=

        Better to copy from Java Android to any of the frameworks, such as PhoneGap , Appcelerator Titanium , Rhodes , RhoSync , etc.
        And you can port not only to iOS, but also to Symbian , Blackberry and others.

        • When do not listen to the advice urging you to use PhoneGap !!! Why force the end user to suffer seeing your poor design and lethargy in work! - vanyamelikov
        • I agree. Framework shit (at least for applications). I myself studied Appcelerator and realized what kind of city it is. For a responsive UX, you only need to write native applications. 2 vanyamelikov: could see that the comment is over 2 years old - gabin