When the iOS SDK came out in 2009, our choice at Lightstreamer was to build a new client library from scratch. We took as a reference the Java client library and started developing an entirely new Objective-C codebase, trying to merge the best object-oriented design we had at that time with a new language and environment.
This had both advantages and disadvantages. On one side, native integration with iOS led to good performance and useful features, like network availability monitoring to avoid battery drainage. On the other hand, the slow process of discovering and fixing corner-conditions and bugs, which the Java library had passed through already, had to be repeated all over again. Moreover, as new features were introduced in the server, they had to be introduced in the client libraries multiple times.
For these reasons, when the opportunity to rewrite the iOS client came in, we decided to try a different approach: transpile (i.e. trans-compile) a single Java codebase, in common with the Java client (now mostly dedicated to Android) and fill in the gaps with well designed wrappers and dependency injection. We explored this possibility before, but tools were not mature enough. Now they are, trans-compilaiton is a reality thanks to
j2objc, an impressive tool made by the Google team, and transpiled code
works and performs very well.
So, today we are proud and excited to announce the availability of the alpha version of iOS and OS X client libraries version 2.0, both developed from a highly engineered codebase in common with the Java/Android client. The library's core is written in Java, transpiled to Objective-C and then wrapped and integrated with especially written native code, providing a natural and seamless interface to iOS and OS X developers.
Version 2.0 adheres to the so-called Lightstreamer Unified Client API Model, i.e. an API designed to be the same across all environments: Javascript, Java/Android, iOS/OS X, .NET and so on. Developers will be able to switch between different platforms sure to find the same objects and methods, behaviors and features.
Let's see how it works and how to port your code.
Note: if you need download and example pointers, jump directly to the end of the post ("Get the SDKs").