{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/4421","repository_url":"https://api.github.com/repos/mapbox/mapbox-gl-native","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/4421/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/4421/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/4421/events","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/4421","id":142491443,"number":4421,"title":"Marking MGLOfflinePack init method NS_UNAVAILABLE inhibits unit testing","user":{"login":"postmechanical","id":133463,"avatar_url":"https://avatars.githubusercontent.com/u/133463?v=3","gravatar_id":"","url":"https://api.github.com/users/postmechanical","html_url":"https://github.com/postmechanical","followers_url":"https://api.github.com/users/postmechanical/followers","following_url":"https://api.github.com/users/postmechanical/following{/other_user}","gists_url":"https://api.github.com/users/postmechanical/gists{/gist_id}","starred_url":"https://api.github.com/users/postmechanical/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postmechanical/subscriptions","organizations_url":"https://api.github.com/users/postmechanical/orgs","repos_url":"https://api.github.com/users/postmechanical/repos","events_url":"https://api.github.com/users/postmechanical/events{/privacy}","received_events_url":"https://api.github.com/users/postmechanical/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/iOS","name":"iOS","color":"207de5"},{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/offline","name":"offline","color":"5319e7"},{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/labels/OS%20X","name":"OS X","color":"333333"}],"state":"open","locked":false,"assignee":{"login":"boundsj","id":63186,"avatar_url":"https://avatars.githubusercontent.com/u/63186?v=3","gravatar_id":"","url":"https://api.github.com/users/boundsj","html_url":"https://github.com/boundsj","followers_url":"https://api.github.com/users/boundsj/followers","following_url":"https://api.github.com/users/boundsj/following{/other_user}","gists_url":"https://api.github.com/users/boundsj/gists{/gist_id}","starred_url":"https://api.github.com/users/boundsj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boundsj/subscriptions","organizations_url":"https://api.github.com/users/boundsj/orgs","repos_url":"https://api.github.com/users/boundsj/repos","events_url":"https://api.github.com/users/boundsj/events{/privacy}","received_events_url":"https://api.github.com/users/boundsj/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/milestones/30","html_url":"https://github.com/mapbox/mapbox-gl-native/milestones/ios-v3.2.0","labels_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/milestones/30/labels","id":1620618,"number":30,"title":"ios-v3.2.0","description":"","creator":{"login":"1ec5","id":1231218,"avatar_url":"https://avatars.githubusercontent.com/u/1231218?v=3","gravatar_id":"","url":"https://api.github.com/users/1ec5","html_url":"https://github.com/1ec5","followers_url":"https://api.github.com/users/1ec5/followers","following_url":"https://api.github.com/users/1ec5/following{/other_user}","gists_url":"https://api.github.com/users/1ec5/gists{/gist_id}","starred_url":"https://api.github.com/users/1ec5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/1ec5/subscriptions","organizations_url":"https://api.github.com/users/1ec5/orgs","repos_url":"https://api.github.com/users/1ec5/repos","events_url":"https://api.github.com/users/1ec5/events{/privacy}","received_events_url":"https://api.github.com/users/1ec5/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":54,"state":"open","created_at":"2016-03-03T16:50:53Z","updated_at":"2016-03-21T23:43:30Z","due_on":"2016-03-31T07:00:00Z","closed_at":null},"comments":5,"created_at":"2016-03-21T22:37:40Z","updated_at":"2016-03-22T16:18:16Z","closed_at":null,"body":"The use case is testing of a category on `MGLOfflinePack` to add functionality to `MGLOfflinePack` instances that are specific to the app domain. The `NS_UNAVAILABLE` attribute on `MGLOfflinePack` prevents the use of partial mocks. Going through `MGLOfflineStorage`'s `addPackForRegion:withContext:completionHandler:` just to obtain a `MGLOfflinePack` instance to mock is overkill."},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/comments/199887477","html_url":"https://github.com/mapbox/mapbox-gl-native/issues/4421#issuecomment-199887477","issue_url":"https://api.github.com/repos/mapbox/mapbox-gl-native/issues/4421","id":199887477,"user":{"login":"postmechanical","id":133463,"avatar_url":"https://avatars.githubusercontent.com/u/133463?v=3","gravatar_id":"","url":"https://api.github.com/users/postmechanical","html_url":"https://github.com/postmechanical","followers_url":"https://api.github.com/users/postmechanical/followers","following_url":"https://api.github.com/users/postmechanical/following{/other_user}","gists_url":"https://api.github.com/users/postmechanical/gists{/gist_id}","starred_url":"https://api.github.com/users/postmechanical/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/postmechanical/subscriptions","organizations_url":"https://api.github.com/users/postmechanical/orgs","repos_url":"https://api.github.com/users/postmechanical/repos","events_url":"https://api.github.com/users/postmechanical/events{/privacy}","received_events_url":"https://api.github.com/users/postmechanical/received_events","type":"User","site_admin":false},"created_at":"2016-03-22T16:18:15Z","updated_at":"2016-03-22T16:18:15Z","body":"@1ec5 Why not have `MGLOfflinePack` extract the C++ object rather than `MGLOfflineStorage`?\r\n\r\nhttps://github.com/mapbox/mapbox-gl-native/blob/1ee7264b0edf6601a8170a30c40af4282679f495/platform/darwin/src/MGLOfflineStorage.mm#L86"}}