in News

With HealthKit Apple is sweating the details

This blew my mind. Apple is really sweating every detail about HealthKit. Would be interesting to see what Android is doing…

If the user grants permission to read a data type, you can query that data from the HealthKit store. Unfortunately, even knowing that the user has denied your request to read a particular type of data may reveal potential health problems. Therefore, your app cannot determine whether or not the user has granted permission to read data. If you are not given permission, it simply appears as if there is no data of the requested type in the HealthKit store.

Apple HealthKit

 

I like this. This is the first stand against “if you have nothing to hide” mentality. Good on you Apple.

 

Cost of using Google Maps

I wasn’t really shocked when I found this, but damn! it really pushes the envelop on how much Google services are costing us!

If you ever logged into your Google account in Google Maps from Android or iOS, there’s a link you should know about: https://maps.google.com/locationhistory/

What this means you’re being followed for better advertising dollars.

This is the true cost of Google Maps. Some will say it’s a small price to pay, and I’m sure many are oblivious to it, many that will be up at arms defending it and more will be upset by it.

 

Helpful Swift extensions

swift-extensions

Well, I’ve been dipping my toes in Swift for the past couple of months and I have grown a few extensions that I would like to share: an extension for String class and UIColor class…

Wouldn’t be nice to be able to access String instances and get sections of it (substring) as a new String but with a simple syntax?

Wouldn’t defining UIColor instances with a String make life easier for developers when working with graphical designers?

Continue reading

issues with Google Analytics and iOS 7 background fetch

preview_image-2

Since the introduction of iOS 7, there’s an abundance of articles that explain how to use iOS 7′s background fetch to download data for your apps while the phone is in it’s downtime.

Background fetch can be used to update weather information, traffic report status, load new articles, etc. It’s a way for your app to reach your server and update the user’s screen during downtimes (phone not being used, phone is sleeping and being charged).

iOS uses a bunch of factors before giving your app the precious time-slice (around 30sec max) in order for your app to do its business. The faster you execute the process, the more chances the OS will give you future time-slices. The more processor intensive you are, the less likely for the OS to give you time in the future.

This is all well and good, and I have recently launched an app update that uses this feature to the App Store.

What came next was perplexing…

Continue reading

Best feature of Swift

It’s been a bit more than a month that I’ve been playing around with Swift. I’m still in the awe phase. Programming with Objective-C has always been fun, but with Swift it gets better. Kudos to Apple’s engineers for developing a well thought out language.

Swift fixes a lot of C’s and Objective-C’s shortfalls. It is designed from the ground up to be a safe language where memory management and common programming errors and are thing of the past.

One of the biggest gripes I have with objective-c is that NSArray didn’t return a typed object. Every object we get from an NSArray must be cast into a temporary variable in order to use it.

Java had typed arrays for a long time but it wasn’t enforced by it’s compiler, so programmer got away with defining untyped arrays.

In Swift this is all gone, all arrays and dictionaries are typed from the moment they’re defined.

Writing in Swift should make for more stable programs, quicker updates and better code portability from one project to another.

In my honest opinion, I believe the automatic type inference and Array/Dictionary typed value is the best feature of Swift.

What about you? What feature of Swift you like the most?

Swift vs Objective-C

Swift is an awesome new language for iOS developers. It’s a first class citizen in terms of compiler support that mean going forward, Apple will be favouring this language over objective-c.

I’m currently writing an overview about what Swift means for Objective-C programmers. I should be completing it soon, so stay tuned…