Apache Cordova vs J2ObjC: What are the differences?
What is J2ObjC? Java to iOS Objective-C translation tool and runtime used by Google Inbox to share 70% of its code across Android, iOS, and Web. J2ObjC is an open-source command-line tool from Google that translates Java code to Objective-C for the iOS (iPhone/iPad) platform. This tool enables Java code to be part of an iOS application's build, as no editing of the generated files is necessary. The goal is to write an app's non-UI code (such as data access, or application logic) in Java, which is then shared by web apps (using GWT), Android apps, and iOS apps.
Apache Cordova and J2ObjC belong to "Cross-Platform Mobile Development" category of the tech stack.
"Lots of plugins" is the top reason why over 31 developers like Apache Cordova, while over 3 developers mention "Backed by Google" as the leading cause for choosing J2ObjC.
Apache Cordova and J2ObjC are both open source tools. It seems that J2ObjC with 5.47K GitHub stars and 771 forks on GitHub has more adoption than Apache Cordova with 766 GitHub stars and 327 GitHub forks.
I've done some Hybrid Mobile apps with both technologies
Apache Cordova and
React Native and described my experience in my blog.
In a few words, I would suggest to use each technology in accordance what what is your current code base and what do you want to achieve.
React Native is a great option if you need that extra edge in performance with multi-threading and native UI rendering. Or you already have a web app based on React which you want to port to mobile.
On the other hand, if you have an existing web application code and you want to reuse some or all, including the ability to use web third-party libraries, then Cordova is the best option.
ProGuard is the most popular optimizer for Java bytecode. It makes your Java and Android applications up to 90% smaller and up to 20% faster. ProGuard also provides minimal protection against reverse engineering by obfuscating the names of classes, fields and methods.How to use it in
I didn't find any plugins for it. So I've implemented it by myself and shared it on GitHub.
Feel free to use!