Improvements on Countly iOS SDK
After a few months of standstill, Countly iOS SDK is finally updated with various improvements and there are more to come soon. You can find the latest version here on GitHub. Before talking about future plans, let’s have a brief look at the latest changes.
- Formatting & Performance Improvements
For better code readability, we adopted Allman style indentation and added pragma marks for each section. It is now much easier to read through the code and navigate between sections and methods. We also added Countly prefix to some helper objects and methods to prevent any namespace conflicts.
We changed the way we create metrics JSON by using built-in iOS JSON serialization available in iOS 5.0+. Previously, metrics JSON was created by string concatenation of brackets, commas and colons manually. This method was very error prone and bad for code readability. In addition to that, we used dispatch_once function to improve thread safety of singletons as Apple suggested. And we took advantages of new Objective-C literals and LLVM compiler too. We cleared all useless @synthesize directives and used simpler syntax for creating object from primitive types. By the way, all the memory leaks are gone now. We have fixed them all, just like the compiler warnings about integer types.
- New Features
You can now use Countly for your Mac applications too. Countly iOS SDK now officially supports OSX, since they are the same platform with vastly similar APIs. There were some community supported OSX versions thanks to our friends Arix, benoitsan, and mrballoon; but we decided to make it official and give continuous support.
There is a new method for Countly Cloud users: startOnCloudWithAppKey. As it is self-explaining, it just starts Countly to work with Cloud directly. You do not need to enter server URL https://cloud.count.ly anymore. We created a new repo on GitHub for testing and showing how the SDK’s work. You can find it here. For now, there is only one iOS example project, but soon we will add example projects for other SDK’s too.
- Future Plans
Now let’s talk about the future plans. We are planning to make the SDK ARC compatible. As Apple encourages using ARC, nowadays most of the projects starts with ARC by default, and lots of old projects are being converted to work with it. We too decided to do so.
We are working on Messaging feature which will let you send push notifications and keep track of them. With Countly Messaging you will be able to compose push notifications easily and send them immediately, or schedule them to be sent later. Then Countly will take care of them and report back how users reacted to your push notifications.
Moreover, we have plans to integrate Crash Reporting feature into Countly. If your app crashes due to an uncaught exception or fatal signal, you will be able to see full stack trace and crash reason with custom logs right on your Countly Dashboard.
- Erkan YILDIZ
Countly SDK Developer