{"action":"opened","number":22,"pull_request":{"url":"https://api.github.com/repos/schibsted/sdk-ios/pulls/22","id":54091362,"html_url":"https://github.com/schibsted/sdk-ios/pull/22","diff_url":"https://github.com/schibsted/sdk-ios/pull/22.diff","patch_url":"https://github.com/schibsted/sdk-ios/pull/22.patch","issue_url":"https://api.github.com/repos/schibsted/sdk-ios/issues/22","number":22,"state":"open","locked":false,"title":"Replace deprecated NSURLConnection with NSURLSession","user":{"login":"mikaoj","id":4034956,"avatar_url":"https://avatars.githubusercontent.com/u/4034956?v=3","gravatar_id":"","url":"https://api.github.com/users/mikaoj","html_url":"https://github.com/mikaoj","followers_url":"https://api.github.com/users/mikaoj/followers","following_url":"https://api.github.com/users/mikaoj/following{/other_user}","gists_url":"https://api.github.com/users/mikaoj/gists{/gist_id}","starred_url":"https://api.github.com/users/mikaoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikaoj/subscriptions","organizations_url":"https://api.github.com/users/mikaoj/orgs","repos_url":"https://api.github.com/users/mikaoj/repos","events_url":"https://api.github.com/users/mikaoj/events{/privacy}","received_events_url":"https://api.github.com/users/mikaoj/received_events","type":"User","site_admin":false},"body":"NSURLConnection has been deprecated by apple (and can't be used on apple watch/tv) so this PR replaces it with NSURLSession.\r\n\r\n* Replaced NSURLConnection with NSURLSession.\r\n* Bumped version number to 2.0.0 (as there are some breaking changes).\r\n* Bumped deployment targets to iOS 7.0 (NSURLSession requires it).\r\n* Removed the SPiDError class and moved it's functionality to a category\r\n* Fixed a memory leak\r\n* A bunch of small fixes/cleanup\r\n\r\nThere are some breaking changes:\r\n* A couple of method names where renamed (had ugly java-style naming).\r\n* Callbacks happen on a background thread, it should be up to the user of this SDK to decide if the callback needs to do stuff on main (UI) not the SDK itself (And if I read the code correctly, it was even executing the requests on main before).","created_at":"2015-12-18T11:17:55Z","updated_at":"2015-12-18T11:17:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/schibsted/sdk-ios/pulls/22/commits","review_comments_url":"https://api.github.com/repos/schibsted/sdk-ios/pulls/22/comments","review_comment_url":"https://api.github.com/repos/schibsted/sdk-ios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/schibsted/sdk-ios/issues/22/comments","statuses_url":"https://api.github.com/repos/schibsted/sdk-ios/statuses/8e57e6b1eeae8bd34740af309413c4a36309ffc9","head":{"label":"mikaoj:master","ref":"master","sha":"8e57e6b1eeae8bd34740af309413c4a36309ffc9","user":{"login":"mikaoj","id":4034956,"avatar_url":"https://avatars.githubusercontent.com/u/4034956?v=3","gravatar_id":"","url":"https://api.github.com/users/mikaoj","html_url":"https://github.com/mikaoj","followers_url":"https://api.github.com/users/mikaoj/followers","following_url":"https://api.github.com/users/mikaoj/following{/other_user}","gists_url":"https://api.github.com/users/mikaoj/gists{/gist_id}","starred_url":"https://api.github.com/users/mikaoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikaoj/subscriptions","organizations_url":"https://api.github.com/users/mikaoj/orgs","repos_url":"https://api.github.com/users/mikaoj/repos","events_url":"https://api.github.com/users/mikaoj/events{/privacy}","received_events_url":"https://api.github.com/users/mikaoj/received_events","type":"User","site_admin":false},"repo":{"id":28093331,"name":"sdk-ios","full_name":"mikaoj/sdk-ios","owner":{"login":"mikaoj","id":4034956,"avatar_url":"https://avatars.githubusercontent.com/u/4034956?v=3","gravatar_id":"","url":"https://api.github.com/users/mikaoj","html_url":"https://github.com/mikaoj","followers_url":"https://api.github.com/users/mikaoj/followers","following_url":"https://api.github.com/users/mikaoj/following{/other_user}","gists_url":"https://api.github.com/users/mikaoj/gists{/gist_id}","starred_url":"https://api.github.com/users/mikaoj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikaoj/subscriptions","organizations_url":"https://api.github.com/users/mikaoj/orgs","repos_url":"https://api.github.com/users/mikaoj/repos","events_url":"https://api.github.com/users/mikaoj/events{/privacy}","received_events_url":"https://api.github.com/users/mikaoj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikaoj/sdk-ios","description":"SPiD SDK Client for iOS","fork":true,"url":"https://api.github.com/repos/mikaoj/sdk-ios","forks_url":"https://api.github.com/repos/mikaoj/sdk-ios/forks","keys_url":"https://api.github.com/repos/mikaoj/sdk-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikaoj/sdk-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikaoj/sdk-ios/teams","hooks_url":"https://api.github.com/repos/mikaoj/sdk-ios/hooks","issue_events_url":"https://api.github.com/repos/mikaoj/sdk-ios/issues/events{/number}","events_url":"https://api.github.com/repos/mikaoj/sdk-ios/events","assignees_url":"https://api.github.com/repos/mikaoj/sdk-ios/assignees{/user}","branches_url":"https://api.github.com/repos/mikaoj/sdk-ios/branches{/branch}","tags_url":"https://api.github.com/repos/mikaoj/sdk-ios/tags","blobs_url":"https://api.github.com/repos/mikaoj/sdk-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikaoj/sdk-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikaoj/sdk-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikaoj/sdk-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikaoj/sdk-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/mikaoj/sdk-ios/languages","stargazers_url":"https://api.github.com/repos/mikaoj/sdk-ios/stargazers","contributors_url":"https://api.github.com/repos/mikaoj/sdk-ios/contributors","subscribers_url":"https://api.github.com/repos/mikaoj/sdk-ios/subscribers","subscription_url":"https://api.github.com/repos/mikaoj/sdk-ios/subscription","commits_url":"https://api.github.com/repos/mikaoj/sdk-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikaoj/sdk-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikaoj/sdk-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikaoj/sdk-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikaoj/sdk-ios/contents/{+path}","compare_url":"https://api.github.com/repos/mikaoj/sdk-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikaoj/sdk-ios/merges","archive_url":"https://api.github.com/repos/mikaoj/sdk-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikaoj/sdk-ios/downloads","issues_url":"https://api.github.com/repos/mikaoj/sdk-ios/issues{/number}","pulls_url":"https://api.github.com/repos/mikaoj/sdk-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/mikaoj/sdk-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/mikaoj/sdk-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikaoj/sdk-ios/labels{/name}","releases_url":"https://api.github.com/repos/mikaoj/sdk-ios/releases{/id}","created_at":"2014-12-16T15:34:23Z","updated_at":"2015-02-12T15:34:13Z","pushed_at":"2015-12-18T11:09:23Z","git_url":"git://github.com/mikaoj/sdk-ios.git","ssh_url":"git@github.com:mikaoj/sdk-ios.git","clone_url":"https://github.com/mikaoj/sdk-ios.git","svn_url":"https://github.com/mikaoj/sdk-ios","homepage":null,"size":987,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"schibsted:master","ref":"master","sha":"df22ca1497b3e2ad8d5fca412ab673d18b89cfb5","user":{"login":"schibsted","id":2492354,"avatar_url":"https://avatars.githubusercontent.com/u/2492354?v=3","gravatar_id":"","url":"https://api.github.com/users/schibsted","html_url":"https://github.com/schibsted","followers_url":"https://api.github.com/users/schibsted/followers","following_url":"https://api.github.com/users/schibsted/following{/other_user}","gists_url":"https://api.github.com/users/schibsted/gists{/gist_id}","starred_url":"https://api.github.com/users/schibsted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schibsted/subscriptions","organizations_url":"https://api.github.com/users/schibsted/orgs","repos_url":"https://api.github.com/users/schibsted/repos","events_url":"https://api.github.com/users/schibsted/events{/privacy}","received_events_url":"https://api.github.com/users/schibsted/received_events","type":"Organization","site_admin":false},"repo":{"id":6354396,"name":"sdk-ios","full_name":"schibsted/sdk-ios","owner":{"login":"schibsted","id":2492354,"avatar_url":"https://avatars.githubusercontent.com/u/2492354?v=3","gravatar_id":"","url":"https://api.github.com/users/schibsted","html_url":"https://github.com/schibsted","followers_url":"https://api.github.com/users/schibsted/followers","following_url":"https://api.github.com/users/schibsted/following{/other_user}","gists_url":"https://api.github.com/users/schibsted/gists{/gist_id}","starred_url":"https://api.github.com/users/schibsted/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schibsted/subscriptions","organizations_url":"https://api.github.com/users/schibsted/orgs","repos_url":"https://api.github.com/users/schibsted/repos","events_url":"https://api.github.com/users/schibsted/events{/privacy}","received_events_url":"https://api.github.com/users/schibsted/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/schibsted/sdk-ios","description":"SPiD SDK Client for iOS","fork":false,"url":"https://api.github.com/repos/schibsted/sdk-ios","forks_url":"https://api.github.com/repos/schibsted/sdk-ios/forks","keys_url":"https://api.github.com/repos/schibsted/sdk-ios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/schibsted/sdk-ios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/schibsted/sdk-ios/teams","hooks_url":"https://api.github.com/repos/schibsted/sdk-ios/hooks","issue_events_url":"https://api.github.com/repos/schibsted/sdk-ios/issues/events{/number}","events_url":"https://api.github.com/repos/schibsted/sdk-ios/events","assignees_url":"https://api.github.com/repos/schibsted/sdk-ios/assignees{/user}","branches_url":"https://api.github.com/repos/schibsted/sdk-ios/branches{/branch}","tags_url":"https://api.github.com/repos/schibsted/sdk-ios/tags","blobs_url":"https://api.github.com/repos/schibsted/sdk-ios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/schibsted/sdk-ios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/schibsted/sdk-ios/git/refs{/sha}","trees_url":"https://api.github.com/repos/schibsted/sdk-ios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/schibsted/sdk-ios/statuses/{sha}","languages_url":"https://api.github.com/repos/schibsted/sdk-ios/languages","stargazers_url":"https://api.github.com/repos/schibsted/sdk-ios/stargazers","contributors_url":"https://api.github.com/repos/schibsted/sdk-ios/contributors","subscribers_url":"https://api.github.com/repos/schibsted/sdk-ios/subscribers","subscription_url":"https://api.github.com/repos/schibsted/sdk-ios/subscription","commits_url":"https://api.github.com/repos/schibsted/sdk-ios/commits{/sha}","git_commits_url":"https://api.github.com/repos/schibsted/sdk-ios/git/commits{/sha}","comments_url":"https://api.github.com/repos/schibsted/sdk-ios/comments{/number}","issue_comment_url":"https://api.github.com/repos/schibsted/sdk-ios/issues/comments{/number}","contents_url":"https://api.github.com/repos/schibsted/sdk-ios/contents/{+path}","compare_url":"https://api.github.com/repos/schibsted/sdk-ios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/schibsted/sdk-ios/merges","archive_url":"https://api.github.com/repos/schibsted/sdk-ios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/schibsted/sdk-ios/downloads","issues_url":"https://api.github.com/repos/schibsted/sdk-ios/issues{/number}","pulls_url":"https://api.github.com/repos/schibsted/sdk-ios/pulls{/number}","milestones_url":"https://api.github.com/repos/schibsted/sdk-ios/milestones{/number}","notifications_url":"https://api.github.com/repos/schibsted/sdk-ios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/schibsted/sdk-ios/labels{/name}","releases_url":"https://api.github.com/repos/schibsted/sdk-ios/releases{/id}","created_at":"2012-10-23T14:53:47Z","updated_at":"2015-09-29T12:49:36Z","pushed_at":"2015-11-27T16:18:27Z","git_url":"git://github.com/schibsted/sdk-ios.git","ssh_url":"git@github.com:schibsted/sdk-ios.git","clone_url":"https://github.com/schibsted/sdk-ios.git","svn_url":"https://github.com/schibsted/sdk-ios","homepage":null,"size":983,"stargazers_count":1,"watchers_count":1,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"open_issues_count":3,"forks":7,"open_issues":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/schibsted/sdk-ios/pulls/22"},"html":{"href":"https://github.com/schibsted/sdk-ios/pull/22"},"issue":{"href":"https://api.github.com/repos/schibsted/sdk-ios/issues/22"},"comments":{"href":"https://api.github.com/repos/schibsted/sdk-ios/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/schibsted/sdk-ios/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/schibsted/sdk-ios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/schibsted/sdk-ios/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/schibsted/sdk-ios/statuses/8e57e6b1eeae8bd34740af309413c4a36309ffc9"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":20,"additions":711,"deletions":756,"changed_files":47}}