mapbox/mapbox-ios-sdk — pull request #290 by RubioV (2013-08-13 10:17:10+00:00)
Title: Fix RMMapBoxSource initWithMapID crash when offline

This pull request is a duplicate of pull request https://github.com/mapbox/mapbox-ios-sdk/pull/288, now opened on a dedicated branch.

This change fixes `RMMapboxSource` `initWithMapID:` functions crashing when the user is offline (issue https://github.com/mapbox/mapbox-ios-sdk/issues/259). These init methods will now return nil instead, if the user is offline.

There are two other pull requests which fix this issue: https://github.com/mapbox/mapbox-ios-sdk/pull/255 and https://github.com/mapbox/mapbox-ios-sdk/pull/267. However, these do not check `_infoDictionary` agains `nil` in `initWithTileJSON`.

Also included in the pull request are `NSError` parameters which are changed from `nil` to `NULL` (https://github.com/mapbox/mapbox-ios-sdk/issues/287), and a replacement for the deprecated `NSPropertyListSerialization propertyListFromData` call.