J2ObjC Blog

Breaking Retain Cycles with @Weak and Other Techniques

30 January 2017 by Lukhnos Liu

In this blog post, we'll talk about how you can break retain cycles in your Java code. We will cover the @Weak and @WeakOuter annotations as well as a few additional tools and techniques you can use.

Default Methods

17 March 2016 by Lukhnos Liu

We are pleased to announce the support for Java 8 default methods in J2ObjC. The compiler also translates static methods in interfaces now. Together they make Java interfaces more useful, and, when combined with lambdas, enable a wide range of new idioms and programming styles. To translate this new language feature, pass the command line argument -source 8 to j2objc.

Lambdas in Java 8 - (Dys)functional Interfaces

07 August 2015 by Seth Kirby

Protocol Buffers!

10 April 2015 by Keith Stanger

Protocol Buffers are Google’s preferred method of representing and communicating structured data. For most Google projects, protocol buffers are used for data storage or client-server communication. As such, a working protocol buffer solution has been a requirement for J2ObjC from day one. Until recently our solution contained internal dependencies that prevented it’s public release, but now I am very pleased to be able to make our internal solution available to all J2ObjC users.

Android and iPhones and Web, oh my

22 January 2014 by Tom Ball

It's regularly asked why J2ObjC purposely avoids translating UI code; after all, wouldn't it be wonderful if a tool existed where a developer can drop in Android source and out pops an iOS app? Our usual response is that world-class apps need user interfaces that are tightly integrated with each platform, and that common-denominator attempts to span platforms provide degrades user experiences. As I found when working on Swing many years ago, customers notice the smallest deviations from a platform's UI standards and generally find them off-putting. But non-compromising UIs are just one of the reasons we focus on translating shared logic.