{"action":"created","comment":{"url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/comments/193456366","pull_request_review_id":126432472,"id":193456366,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzQ1NjM2Ng==","diff_hunk":"@@ -298,4 +300,22 @@ + (void)setLogLevelVerbose {\n   [WTRLogger setLogLevel:WTRLogLevelVerbose];\n }\n \n+#pragma mark - Notifications\n+\n++ (NSNotificationName)surveyWillAppearNotification {\n+  return @\"com.wootric.surveyWillAppearNotification\";\n+}\n+\n++ (NSNotificationName)surveyWillDisappearNotification {\n+  return @\"com.wootric.surveyWillDisappearNotification\";\n+}\n+\n++ (NSNotificationName)surveyDidAppearNotification {\n+  return @\"com.wootric.surveyDidAppearNotification\";\n+}\n+\n++ (NSNotificationName)surveyDidDisappearNotification {\n+  return @\"com.wootric.surveyDidDisappearNotification\";","path":"WootricSDK/WootricSDK/Wootric.m","position":34,"original_position":34,"commit_id":"63417a9e5ee9c31177541ec86dab1bee3f42cf02","original_commit_id":"63417a9e5ee9c31177541ec86dab1bee3f42cf02","user":{"login":"hachibu","id":10385848,"node_id":"MDQ6VXNlcjEwMzg1ODQ4","avatar_url":"https://avatars0.githubusercontent.com/u/10385848?v=4","gravatar_id":"","url":"https://api.github.com/users/hachibu","html_url":"https://github.com/hachibu","followers_url":"https://api.github.com/users/hachibu/followers","following_url":"https://api.github.com/users/hachibu/following{/other_user}","gists_url":"https://api.github.com/users/hachibu/gists{/gist_id}","starred_url":"https://api.github.com/users/hachibu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hachibu/subscriptions","organizations_url":"https://api.github.com/users/hachibu/orgs","repos_url":"https://api.github.com/users/hachibu/repos","events_url":"https://api.github.com/users/hachibu/events{/privacy}","received_events_url":"https://api.github.com/users/hachibu/received_events","type":"User","site_admin":false},"body":"Oh wow, I had no idea!","created_at":"2018-06-06T15:34:27Z","updated_at":"2018-06-06T15:34:27Z","html_url":"https://github.com/Wootric/WootricSDK-iOS/pull/52#discussion_r193456366","pull_request_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/52","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/comments/193456366"},"html":{"href":"https://github.com/Wootric/WootricSDK-iOS/pull/52#discussion_r193456366"},"pull_request":{"href":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/52"}},"in_reply_to_id":193204653},"pull_request":{"url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/52","id":191595526,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxNTk1NTI2","html_url":"https://github.com/Wootric/WootricSDK-iOS/pull/52","diff_url":"https://github.com/Wootric/WootricSDK-iOS/pull/52.diff","patch_url":"https://github.com/Wootric/WootricSDK-iOS/pull/52.patch","issue_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues/52","number":52,"state":"open","locked":false,"title":"Add NSNotification for 'appear' events","user":{"login":"diegoserranoa","id":1431421,"node_id":"MDQ6VXNlcjE0MzE0MjE=","avatar_url":"https://avatars2.githubusercontent.com/u/1431421?v=4","gravatar_id":"","url":"https://api.github.com/users/diegoserranoa","html_url":"https://github.com/diegoserranoa","followers_url":"https://api.github.com/users/diegoserranoa/followers","following_url":"https://api.github.com/users/diegoserranoa/following{/other_user}","gists_url":"https://api.github.com/users/diegoserranoa/gists{/gist_id}","starred_url":"https://api.github.com/users/diegoserranoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diegoserranoa/subscriptions","organizations_url":"https://api.github.com/users/diegoserranoa/orgs","repos_url":"https://api.github.com/users/diegoserranoa/repos","events_url":"https://api.github.com/users/diegoserranoa/events{/privacy}","received_events_url":"https://api.github.com/users/diegoserranoa/received_events","type":"User","site_admin":false},"body":"Adds notifications for events:\r\n- surveyWillAppearNotification\r\n- surveyWillDisappearNotification\r\n- surveyDidAppearNotification\r\n- surveyDidDisappearNotification\r\n\r\n## Changes:\r\n- Add observers for notifications\r\n\r\n## How to test\r\n\r\n- Add this line the `viewDidLoad` method of `ViewController`, or anywhere you prefer to test\r\n```\r\n[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveTestNotification:) name:[Wootric surveyDidDisappearNotification] object:nil];\r\n```\r\nNote that here we're using `surveyDidDisappearNotification`. Make sure to test all 4 notifications.\r\n\r\n- We also need to add the selector method. Something like this should work\r\n```\r\n- (void) receiveTestNotification:(NSNotification *) notification\r\n{\r\n  if ([[notification name] isEqualToString:[Wootric surveyWillAppearNotification]]){\r\n    NSLog (@\"Survey will be presented!\");\r\n  } else if ([[notification name] isEqualToString:[Wootric surveyWillDisappearNotification]]){\r\n    NSLog (@\"Survey will disappear!\");\r\n  } else if ([[notification name] isEqualToString:[Wootric surveyDidAppearNotification]]){\r\n    NSLog (@\"Survey was presented!\");\r\n  } else if ([[notification name] isEqualToString:[Wootric surveyDidDisappearNotification]]){\r\n    NSLog (@\"Survey disappeared!\");\r\n  }\r\n}\r\n```\r\n\r\n## Trello\r\nThere's no Trello card for this. It was added and requested by a customer\r\n\r\n### Note\r\nThis PR completes the implementation proposed in PR #43 ","created_at":"2018-05-30T22:13:06Z","updated_at":"2018-06-06T15:34:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"44d48f536ef828514a122ca0bca1ccb9d9f99489","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/52/commits","review_comments_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/52/comments","review_comment_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues/52/comments","statuses_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/statuses/63417a9e5ee9c31177541ec86dab1bee3f42cf02","head":{"label":"Wootric:ds-handshake-master","ref":"ds-handshake-master","sha":"63417a9e5ee9c31177541ec86dab1bee3f42cf02","user":{"login":"Wootric","id":5396837,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzOTY4Mzc=","avatar_url":"https://avatars3.githubusercontent.com/u/5396837?v=4","gravatar_id":"","url":"https://api.github.com/users/Wootric","html_url":"https://github.com/Wootric","followers_url":"https://api.github.com/users/Wootric/followers","following_url":"https://api.github.com/users/Wootric/following{/other_user}","gists_url":"https://api.github.com/users/Wootric/gists{/gist_id}","starred_url":"https://api.github.com/users/Wootric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wootric/subscriptions","organizations_url":"https://api.github.com/users/Wootric/orgs","repos_url":"https://api.github.com/users/Wootric/repos","events_url":"https://api.github.com/users/Wootric/events{/privacy}","received_events_url":"https://api.github.com/users/Wootric/received_events","type":"Organization","site_admin":false},"repo":{"id":32400982,"node_id":"MDEwOlJlcG9zaXRvcnkzMjQwMDk4Mg==","name":"WootricSDK-iOS","full_name":"Wootric/WootricSDK-iOS","owner":{"login":"Wootric","id":5396837,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzOTY4Mzc=","avatar_url":"https://avatars3.githubusercontent.com/u/5396837?v=4","gravatar_id":"","url":"https://api.github.com/users/Wootric","html_url":"https://github.com/Wootric","followers_url":"https://api.github.com/users/Wootric/followers","following_url":"https://api.github.com/users/Wootric/following{/other_user}","gists_url":"https://api.github.com/users/Wootric/gists{/gist_id}","starred_url":"https://api.github.com/users/Wootric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wootric/subscriptions","organizations_url":"https://api.github.com/users/Wootric/orgs","repos_url":"https://api.github.com/users/Wootric/repos","events_url":"https://api.github.com/users/Wootric/events{/privacy}","received_events_url":"https://api.github.com/users/Wootric/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wootric/WootricSDK-iOS","description":"iOS SDK survey","fork":false,"url":"https://api.github.com/repos/Wootric/WootricSDK-iOS","forks_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/forks","keys_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/teams","hooks_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/hooks","issue_events_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/events","assignees_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/tags","blobs_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/languages","stargazers_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/stargazers","contributors_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/contributors","subscribers_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/subscribers","subscription_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/subscription","commits_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/merges","archive_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/downloads","issues_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/labels{/name}","releases_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/deployments","created_at":"2015-03-17T15:12:30Z","updated_at":"2018-05-21T14:52:43Z","pushed_at":"2018-05-30T22:13:06Z","git_url":"git://github.com/Wootric/WootricSDK-iOS.git","ssh_url":"git@github.com:Wootric/WootricSDK-iOS.git","clone_url":"https://github.com/Wootric/WootricSDK-iOS.git","svn_url":"https://github.com/Wootric/WootricSDK-iOS","homepage":null,"size":1273,"stargazers_count":7,"watchers_count":7,"language":"Objective-C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":8,"open_issues":4,"watchers":7,"default_branch":"master"}},"base":{"label":"Wootric:master","ref":"master","sha":"a2d86f60d6b4d61a77f6a03ca7f3a2cfb8d9dab9","user":{"login":"Wootric","id":5396837,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzOTY4Mzc=","avatar_url":"https://avatars3.githubusercontent.com/u/5396837?v=4","gravatar_id":"","url":"https://api.github.com/users/Wootric","html_url":"https://github.com/Wootric","followers_url":"https://api.github.com/users/Wootric/followers","following_url":"https://api.github.com/users/Wootric/following{/other_user}","gists_url":"https://api.github.com/users/Wootric/gists{/gist_id}","starred_url":"https://api.github.com/users/Wootric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wootric/subscriptions","organizations_url":"https://api.github.com/users/Wootric/orgs","repos_url":"https://api.github.com/users/Wootric/repos","events_url":"https://api.github.com/users/Wootric/events{/privacy}","received_events_url":"https://api.github.com/users/Wootric/received_events","type":"Organization","site_admin":false},"repo":{"id":32400982,"node_id":"MDEwOlJlcG9zaXRvcnkzMjQwMDk4Mg==","name":"WootricSDK-iOS","full_name":"Wootric/WootricSDK-iOS","owner":{"login":"Wootric","id":5396837,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzOTY4Mzc=","avatar_url":"https://avatars3.githubusercontent.com/u/5396837?v=4","gravatar_id":"","url":"https://api.github.com/users/Wootric","html_url":"https://github.com/Wootric","followers_url":"https://api.github.com/users/Wootric/followers","following_url":"https://api.github.com/users/Wootric/following{/other_user}","gists_url":"https://api.github.com/users/Wootric/gists{/gist_id}","starred_url":"https://api.github.com/users/Wootric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wootric/subscriptions","organizations_url":"https://api.github.com/users/Wootric/orgs","repos_url":"https://api.github.com/users/Wootric/repos","events_url":"https://api.github.com/users/Wootric/events{/privacy}","received_events_url":"https://api.github.com/users/Wootric/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wootric/WootricSDK-iOS","description":"iOS SDK survey","fork":false,"url":"https://api.github.com/repos/Wootric/WootricSDK-iOS","forks_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/forks","keys_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/teams","hooks_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/hooks","issue_events_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues/events{/number}","events_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/events","assignees_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/assignees{/user}","branches_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/branches{/branch}","tags_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/tags","blobs_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/statuses/{sha}","languages_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/languages","stargazers_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/stargazers","contributors_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/contributors","subscribers_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/subscribers","subscription_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/subscription","commits_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/contents/{+path}","compare_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/merges","archive_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/downloads","issues_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues{/number}","pulls_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls{/number}","milestones_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/milestones{/number}","notifications_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/labels{/name}","releases_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/releases{/id}","deployments_url":"https://api.github.com/repos/Wootric/WootricSDK-iOS/deployments","created_at":"2015-03-17T15:12:30Z","updated_at":"2018-05-21T14:52:43Z","pushed_at":"2018-05-30T22:13:06Z","git_url":"git://github.com/Wootric/WootricSDK-iOS.git","ssh_url":"git@github.com:Wootric/WootricSDK-iOS.git","clone_url":"https://github.com/Wootric/WootricSDK-iOS.git","svn_url":"https://github.com/Wootric/WootricSDK-iOS","homepage":null,"size":1273,"stargazers_count":7,"watchers_count":7,"language":"Objective-C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8,"mirror_url":null,"archived":false,"open_issues_count":4,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":8,"open_issues":4,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/52"},"html":{"href":"https://github.com/Wootric/WootricSDK-iOS/pull/52"},"issue":{"href":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues/52"},"comments":{"href":"https://api.github.com/repos/Wootric/WootricSDK-iOS/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Wootric/WootricSDK-iOS/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/Wootric/WootricSDK-iOS/statuses/63417a9e5ee9c31177541ec86dab1bee3f42cf02"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"hachibu"}}