{"action":"opened","number":80,"pull_request":{"url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/80","id":33077436,"html_url":"https://github.com/BranchMetrics/Branch-iOS-SDK/pull/80","diff_url":"https://github.com/BranchMetrics/Branch-iOS-SDK/pull/80.diff","patch_url":"https://github.com/BranchMetrics/Branch-iOS-SDK/pull/80.patch","issue_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues/80","number":80,"state":"open","locked":false,"title":"Callback all the things v1","user":{"login":"shortstuffsushi","id":1016147,"avatar_url":"https://avatars.githubusercontent.com/u/1016147?v=3","gravatar_id":"","url":"https://api.github.com/users/shortstuffsushi","html_url":"https://github.com/shortstuffsushi","followers_url":"https://api.github.com/users/shortstuffsushi/followers","following_url":"https://api.github.com/users/shortstuffsushi/following{/other_user}","gists_url":"https://api.github.com/users/shortstuffsushi/gists{/gist_id}","starred_url":"https://api.github.com/users/shortstuffsushi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shortstuffsushi/subscriptions","organizations_url":"https://api.github.com/users/shortstuffsushi/orgs","repos_url":"https://api.github.com/users/shortstuffsushi/repos","events_url":"https://api.github.com/users/shortstuffsushi/events{/privacy}","received_events_url":"https://api.github.com/users/shortstuffsushi/received_events","type":"User","site_admin":false},"body":"@aaustin @qinweigong @derrickstaten @Sarkar \r\n\r\nThis is largely a rewrite of most of the internals of Branch.m. It is step one of what I'm hoping to accomplish in separating a lot of the queuing logic from Branch itself.\r\n\r\nSome other things coming out of this:\r\n  * Errors are more specific to their failure, not just a generic message.\r\n  * Queue is not persisted on *every* request, but instead on a time basis.\r\n  * Fix infinite loop of logging/encoding in debug mode.\r\n  * Requests are actually asynchronous, no need to have `dispatch_async` everywhere anymore.\r\n  * Requests now have a specific callback rather than the big switch statement.\r\n  * When not initialized and a request is made, an initialization requests will be pushed into the queue.\r\n  * Initialization is managed by a single boolean instead of five.\r\n  * Logic around failure has changed some:\r\n    * All requests call back to their callbacks, every time.\r\n    * All requests are dequeued\r\n    * `setIdentity` and `userCompletedAction` requests are re-enqueued, minus their callback.\r\n\r\nThis will need manual review, you're not just going to be able to read the diff, since it's such a huge rework.","created_at":"2015-04-10T19:46:36Z","updated_at":"2015-04-10T19:46:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/80/commits","review_comments_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/80/comments","review_comment_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues/80/comments","statuses_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/statuses/bde6a27cad59847eceda49940ac9093718406691","head":{"label":"BranchMetrics:callback_all_the_things_v1","ref":"callback_all_the_things_v1","sha":"bde6a27cad59847eceda49940ac9093718406691","user":{"login":"BranchMetrics","id":7772941,"avatar_url":"https://avatars.githubusercontent.com/u/7772941?v=3","gravatar_id":"","url":"https://api.github.com/users/BranchMetrics","html_url":"https://github.com/BranchMetrics","followers_url":"https://api.github.com/users/BranchMetrics/followers","following_url":"https://api.github.com/users/BranchMetrics/following{/other_user}","gists_url":"https://api.github.com/users/BranchMetrics/gists{/gist_id}","starred_url":"https://api.github.com/users/BranchMetrics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BranchMetrics/subscriptions","organizations_url":"https://api.github.com/users/BranchMetrics/orgs","repos_url":"https://api.github.com/users/BranchMetrics/repos","events_url":"https://api.github.com/users/BranchMetrics/events{/privacy}","received_events_url":"https://api.github.com/users/BranchMetrics/received_events","type":"Organization","site_admin":false},"repo":{"id":20539166,"name":"Branch-iOS-SDK","full_name":"BranchMetrics/Branch-iOS-SDK","owner":{"login":"BranchMetrics","id":7772941,"avatar_url":"https://avatars.githubusercontent.com/u/7772941?v=3","gravatar_id":"","url":"https://api.github.com/users/BranchMetrics","html_url":"https://github.com/BranchMetrics","followers_url":"https://api.github.com/users/BranchMetrics/followers","following_url":"https://api.github.com/users/BranchMetrics/following{/other_user}","gists_url":"https://api.github.com/users/BranchMetrics/gists{/gist_id}","starred_url":"https://api.github.com/users/BranchMetrics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BranchMetrics/subscriptions","organizations_url":"https://api.github.com/users/BranchMetrics/orgs","repos_url":"https://api.github.com/users/BranchMetrics/repos","events_url":"https://api.github.com/users/BranchMetrics/events{/privacy}","received_events_url":"https://api.github.com/users/BranchMetrics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BranchMetrics/Branch-iOS-SDK","description":"","fork":false,"url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK","forks_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/forks","keys_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/teams","hooks_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/hooks","issue_events_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues/events{/number}","events_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/events","assignees_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/assignees{/user}","branches_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/branches{/branch}","tags_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/tags","blobs_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/refs{/sha}","trees_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/statuses/{sha}","languages_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/languages","stargazers_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/stargazers","contributors_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/contributors","subscribers_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/subscribers","subscription_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/subscription","commits_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/commits{/sha}","git_commits_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/commits{/sha}","comments_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/comments{/number}","issue_comment_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues/comments{/number}","contents_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/contents/{+path}","compare_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/merges","archive_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/downloads","issues_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues{/number}","pulls_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls{/number}","milestones_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/milestones{/number}","notifications_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/labels{/name}","releases_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/releases{/id}","created_at":"2014-06-05T19:56:21Z","updated_at":"2015-04-08T23:31:49Z","pushed_at":"2015-04-10T19:46:36Z","git_url":"git://github.com/BranchMetrics/Branch-iOS-SDK.git","ssh_url":"git@github.com:BranchMetrics/Branch-iOS-SDK.git","clone_url":"https://github.com/BranchMetrics/Branch-iOS-SDK.git","svn_url":"https://github.com/BranchMetrics/Branch-iOS-SDK","homepage":"","size":23290,"stargazers_count":42,"watchers_count":42,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":2,"forks":8,"open_issues":2,"watchers":42,"default_branch":"master"}},"base":{"label":"BranchMetrics:master","ref":"master","sha":"0677a3181a955fb9feaf158d03983c383cbe3064","user":{"login":"BranchMetrics","id":7772941,"avatar_url":"https://avatars.githubusercontent.com/u/7772941?v=3","gravatar_id":"","url":"https://api.github.com/users/BranchMetrics","html_url":"https://github.com/BranchMetrics","followers_url":"https://api.github.com/users/BranchMetrics/followers","following_url":"https://api.github.com/users/BranchMetrics/following{/other_user}","gists_url":"https://api.github.com/users/BranchMetrics/gists{/gist_id}","starred_url":"https://api.github.com/users/BranchMetrics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BranchMetrics/subscriptions","organizations_url":"https://api.github.com/users/BranchMetrics/orgs","repos_url":"https://api.github.com/users/BranchMetrics/repos","events_url":"https://api.github.com/users/BranchMetrics/events{/privacy}","received_events_url":"https://api.github.com/users/BranchMetrics/received_events","type":"Organization","site_admin":false},"repo":{"id":20539166,"name":"Branch-iOS-SDK","full_name":"BranchMetrics/Branch-iOS-SDK","owner":{"login":"BranchMetrics","id":7772941,"avatar_url":"https://avatars.githubusercontent.com/u/7772941?v=3","gravatar_id":"","url":"https://api.github.com/users/BranchMetrics","html_url":"https://github.com/BranchMetrics","followers_url":"https://api.github.com/users/BranchMetrics/followers","following_url":"https://api.github.com/users/BranchMetrics/following{/other_user}","gists_url":"https://api.github.com/users/BranchMetrics/gists{/gist_id}","starred_url":"https://api.github.com/users/BranchMetrics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BranchMetrics/subscriptions","organizations_url":"https://api.github.com/users/BranchMetrics/orgs","repos_url":"https://api.github.com/users/BranchMetrics/repos","events_url":"https://api.github.com/users/BranchMetrics/events{/privacy}","received_events_url":"https://api.github.com/users/BranchMetrics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BranchMetrics/Branch-iOS-SDK","description":"","fork":false,"url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK","forks_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/forks","keys_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/teams","hooks_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/hooks","issue_events_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues/events{/number}","events_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/events","assignees_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/assignees{/user}","branches_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/branches{/branch}","tags_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/tags","blobs_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/refs{/sha}","trees_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/statuses/{sha}","languages_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/languages","stargazers_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/stargazers","contributors_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/contributors","subscribers_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/subscribers","subscription_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/subscription","commits_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/commits{/sha}","git_commits_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/git/commits{/sha}","comments_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/comments{/number}","issue_comment_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues/comments{/number}","contents_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/contents/{+path}","compare_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/merges","archive_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/downloads","issues_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues{/number}","pulls_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls{/number}","milestones_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/milestones{/number}","notifications_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/labels{/name}","releases_url":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/releases{/id}","created_at":"2014-06-05T19:56:21Z","updated_at":"2015-04-08T23:31:49Z","pushed_at":"2015-04-10T19:46:36Z","git_url":"git://github.com/BranchMetrics/Branch-iOS-SDK.git","ssh_url":"git@github.com:BranchMetrics/Branch-iOS-SDK.git","clone_url":"https://github.com/BranchMetrics/Branch-iOS-SDK.git","svn_url":"https://github.com/BranchMetrics/Branch-iOS-SDK","homepage":"","size":23290,"stargazers_count":42,"watchers_count":42,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":2,"forks":8,"open_issues":2,"watchers":42,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/80"},"html":{"href":"https://github.com/BranchMetrics/Branch-iOS-SDK/pull/80"},"issue":{"href":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues/80"},"comments":{"href":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/issues/80/comments"},"review_comments":{"href":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/80/comments"},"review_comment":{"href":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/pulls/80/commits"},"statuses":{"href":"https://api.github.com/repos/BranchMetrics/Branch-iOS-SDK/statuses/bde6a27cad59847eceda49940ac9093718406691"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":17,"additions":2342,"deletions":4222,"changed_files":54}}