{"action":"created","comment":{"url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/comments/76432085","id":76432085,"diff_hunk":"@@ -44,8 +44,15 @@ -(id)userAgent\n \n -(void)setUserAgent:(id)value\n {\n-    ENSURE_TYPE(value, NSString);\n-    [[TiApp app] setUserAgent:[TiUtils stringValue:value]];\n+    ENSURE_TYPE_OR_NIL(value, NSString);\n+    NSString *userAgent = [TiUtils stringValue:value];\n+    \n+    if (!userAgent) {\n+        [[TiApp app] setUserAgent:[[TiApp app] systemUserAgent]];\n+        return;\n+    }\n+    \n+    [[TiApp app] setUserAgent:userAgent];","path":"iphone/Classes/TopTiModule.m","position":14,"original_position":14,"commit_id":"0dab4cceef8882738358f5d80cbf7ce1c64de84a","original_commit_id":"0dab4cceef8882738358f5d80cbf7ce1c64de84a","user":{"login":"hansemannn","id":10667698,"avatar_url":"https://avatars.githubusercontent.com/u/10667698?v=3","gravatar_id":"","url":"https://api.github.com/users/hansemannn","html_url":"https://github.com/hansemannn","followers_url":"https://api.github.com/users/hansemannn/followers","following_url":"https://api.github.com/users/hansemannn/following{/other_user}","gists_url":"https://api.github.com/users/hansemannn/gists{/gist_id}","starred_url":"https://api.github.com/users/hansemannn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hansemannn/subscriptions","organizations_url":"https://api.github.com/users/hansemannn/orgs","repos_url":"https://api.github.com/users/hansemannn/repos","events_url":"https://api.github.com/users/hansemannn/events{/privacy}","received_events_url":"https://api.github.com/users/hansemannn/received_events","type":"User","site_admin":false},"body":"Replace line 50-55 with:\r\n```objc\r\n[[TiApp app] setUserAgent:(userAgent ?: [[TiApp app] systemUserAgent])];\r\n```\r\nThat should do the same.","created_at":"2016-08-26T14:53:42Z","updated_at":"2016-08-26T14:53:42Z","html_url":"https://github.com/appcelerator/titanium_mobile/pull/8251#discussion_r76432085","pull_request_url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/8251","_links":{"self":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/comments/76432085"},"html":{"href":"https://github.com/appcelerator/titanium_mobile/pull/8251#discussion_r76432085"},"pull_request":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/8251"}}},"pull_request":{"url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/8251","id":82282692,"html_url":"https://github.com/appcelerator/titanium_mobile/pull/8251","diff_url":"https://github.com/appcelerator/titanium_mobile/pull/8251.diff","patch_url":"https://github.com/appcelerator/titanium_mobile/pull/8251.patch","issue_url":"https://api.github.com/repos/appcelerator/titanium_mobile/issues/8251","number":8251,"state":"open","locked":false,"title":"[TIMOB-7406] iOS: Introduce userAgent setter for webView","user":{"login":"AngelkPetkov","id":14097072,"avatar_url":"https://avatars.githubusercontent.com/u/14097072?v=3","gravatar_id":"","url":"https://api.github.com/users/AngelkPetkov","html_url":"https://github.com/AngelkPetkov","followers_url":"https://api.github.com/users/AngelkPetkov/followers","following_url":"https://api.github.com/users/AngelkPetkov/following{/other_user}","gists_url":"https://api.github.com/users/AngelkPetkov/gists{/gist_id}","starred_url":"https://api.github.com/users/AngelkPetkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AngelkPetkov/subscriptions","organizations_url":"https://api.github.com/users/AngelkPetkov/orgs","repos_url":"https://api.github.com/users/AngelkPetkov/repos","events_url":"https://api.github.com/users/AngelkPetkov/events{/privacy}","received_events_url":"https://api.github.com/users/AngelkPetkov/received_events","type":"User","site_admin":false},"body":"[JIRA](https://jira.appcelerator.org/browse/TIMOB-7406?filter=-1)\r\n\r\n**Note:** If testing through xcode you wont get the sdk version in the logs, it will work through studio. ","created_at":"2016-08-22T23:51:39Z","updated_at":"2016-08-26T14:53:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"042cf86a88fca4c083614702f21c73228efb7ce9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/8251/commits","review_comments_url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/8251/comments","review_comment_url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/comments{/number}","comments_url":"https://api.github.com/repos/appcelerator/titanium_mobile/issues/8251/comments","statuses_url":"https://api.github.com/repos/appcelerator/titanium_mobile/statuses/0dab4cceef8882738358f5d80cbf7ce1c64de84a","head":{"label":"AngelkPetkov:TIMOB-7406","ref":"TIMOB-7406","sha":"0dab4cceef8882738358f5d80cbf7ce1c64de84a","user":{"login":"AngelkPetkov","id":14097072,"avatar_url":"https://avatars.githubusercontent.com/u/14097072?v=3","gravatar_id":"","url":"https://api.github.com/users/AngelkPetkov","html_url":"https://github.com/AngelkPetkov","followers_url":"https://api.github.com/users/AngelkPetkov/followers","following_url":"https://api.github.com/users/AngelkPetkov/following{/other_user}","gists_url":"https://api.github.com/users/AngelkPetkov/gists{/gist_id}","starred_url":"https://api.github.com/users/AngelkPetkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AngelkPetkov/subscriptions","organizations_url":"https://api.github.com/users/AngelkPetkov/orgs","repos_url":"https://api.github.com/users/AngelkPetkov/repos","events_url":"https://api.github.com/users/AngelkPetkov/events{/privacy}","received_events_url":"https://api.github.com/users/AngelkPetkov/received_events","type":"User","site_admin":false},"repo":{"id":42147776,"name":"titanium_mobile","full_name":"AngelkPetkov/titanium_mobile","owner":{"login":"AngelkPetkov","id":14097072,"avatar_url":"https://avatars.githubusercontent.com/u/14097072?v=3","gravatar_id":"","url":"https://api.github.com/users/AngelkPetkov","html_url":"https://github.com/AngelkPetkov","followers_url":"https://api.github.com/users/AngelkPetkov/followers","following_url":"https://api.github.com/users/AngelkPetkov/following{/other_user}","gists_url":"https://api.github.com/users/AngelkPetkov/gists{/gist_id}","starred_url":"https://api.github.com/users/AngelkPetkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AngelkPetkov/subscriptions","organizations_url":"https://api.github.com/users/AngelkPetkov/orgs","repos_url":"https://api.github.com/users/AngelkPetkov/repos","events_url":"https://api.github.com/users/AngelkPetkov/events{/privacy}","received_events_url":"https://api.github.com/users/AngelkPetkov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AngelkPetkov/titanium_mobile","description":"Appcelerator Titanium Mobile","fork":true,"url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile","forks_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/forks","keys_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/teams","hooks_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/hooks","issue_events_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/issues/events{/number}","events_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/events","assignees_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/assignees{/user}","branches_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/branches{/branch}","tags_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/tags","blobs_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/languages","stargazers_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/stargazers","contributors_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/contributors","subscribers_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/subscribers","subscription_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/subscription","commits_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/contents/{+path}","compare_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/merges","archive_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/downloads","issues_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/issues{/number}","pulls_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/labels{/name}","releases_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/releases{/id}","deployments_url":"https://api.github.com/repos/AngelkPetkov/titanium_mobile/deployments","created_at":"2015-09-09T01:05:07Z","updated_at":"2016-02-17T17:47:46Z","pushed_at":"2016-08-25T02:36:18Z","git_url":"git://github.com/AngelkPetkov/titanium_mobile.git","ssh_url":"git@github.com:AngelkPetkov/titanium_mobile.git","clone_url":"https://github.com/AngelkPetkov/titanium_mobile.git","svn_url":"https://github.com/AngelkPetkov/titanium_mobile","homepage":"http://www.appcelerator.com","size":1127271,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"appcelerator:master","ref":"master","sha":"936c2413dc7b31b29e8eb18970f801c3e4827087","user":{"login":"appcelerator","id":82188,"avatar_url":"https://avatars.githubusercontent.com/u/82188?v=3","gravatar_id":"","url":"https://api.github.com/users/appcelerator","html_url":"https://github.com/appcelerator","followers_url":"https://api.github.com/users/appcelerator/followers","following_url":"https://api.github.com/users/appcelerator/following{/other_user}","gists_url":"https://api.github.com/users/appcelerator/gists{/gist_id}","starred_url":"https://api.github.com/users/appcelerator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appcelerator/subscriptions","organizations_url":"https://api.github.com/users/appcelerator/orgs","repos_url":"https://api.github.com/users/appcelerator/repos","events_url":"https://api.github.com/users/appcelerator/events{/privacy}","received_events_url":"https://api.github.com/users/appcelerator/received_events","type":"Organization","site_admin":false},"repo":{"id":228094,"name":"titanium_mobile","full_name":"appcelerator/titanium_mobile","owner":{"login":"appcelerator","id":82188,"avatar_url":"https://avatars.githubusercontent.com/u/82188?v=3","gravatar_id":"","url":"https://api.github.com/users/appcelerator","html_url":"https://github.com/appcelerator","followers_url":"https://api.github.com/users/appcelerator/followers","following_url":"https://api.github.com/users/appcelerator/following{/other_user}","gists_url":"https://api.github.com/users/appcelerator/gists{/gist_id}","starred_url":"https://api.github.com/users/appcelerator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appcelerator/subscriptions","organizations_url":"https://api.github.com/users/appcelerator/orgs","repos_url":"https://api.github.com/users/appcelerator/repos","events_url":"https://api.github.com/users/appcelerator/events{/privacy}","received_events_url":"https://api.github.com/users/appcelerator/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/appcelerator/titanium_mobile","description":"Appcelerator Titanium Mobile","fork":false,"url":"https://api.github.com/repos/appcelerator/titanium_mobile","forks_url":"https://api.github.com/repos/appcelerator/titanium_mobile/forks","keys_url":"https://api.github.com/repos/appcelerator/titanium_mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appcelerator/titanium_mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appcelerator/titanium_mobile/teams","hooks_url":"https://api.github.com/repos/appcelerator/titanium_mobile/hooks","issue_events_url":"https://api.github.com/repos/appcelerator/titanium_mobile/issues/events{/number}","events_url":"https://api.github.com/repos/appcelerator/titanium_mobile/events","assignees_url":"https://api.github.com/repos/appcelerator/titanium_mobile/assignees{/user}","branches_url":"https://api.github.com/repos/appcelerator/titanium_mobile/branches{/branch}","tags_url":"https://api.github.com/repos/appcelerator/titanium_mobile/tags","blobs_url":"https://api.github.com/repos/appcelerator/titanium_mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appcelerator/titanium_mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appcelerator/titanium_mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/appcelerator/titanium_mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appcelerator/titanium_mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/appcelerator/titanium_mobile/languages","stargazers_url":"https://api.github.com/repos/appcelerator/titanium_mobile/stargazers","contributors_url":"https://api.github.com/repos/appcelerator/titanium_mobile/contributors","subscribers_url":"https://api.github.com/repos/appcelerator/titanium_mobile/subscribers","subscription_url":"https://api.github.com/repos/appcelerator/titanium_mobile/subscription","commits_url":"https://api.github.com/repos/appcelerator/titanium_mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/appcelerator/titanium_mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/appcelerator/titanium_mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/appcelerator/titanium_mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/appcelerator/titanium_mobile/contents/{+path}","compare_url":"https://api.github.com/repos/appcelerator/titanium_mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appcelerator/titanium_mobile/merges","archive_url":"https://api.github.com/repos/appcelerator/titanium_mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appcelerator/titanium_mobile/downloads","issues_url":"https://api.github.com/repos/appcelerator/titanium_mobile/issues{/number}","pulls_url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/appcelerator/titanium_mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/appcelerator/titanium_mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appcelerator/titanium_mobile/labels{/name}","releases_url":"https://api.github.com/repos/appcelerator/titanium_mobile/releases{/id}","deployments_url":"https://api.github.com/repos/appcelerator/titanium_mobile/deployments","created_at":"2009-06-15T22:54:37Z","updated_at":"2016-08-24T13:09:37Z","pushed_at":"2016-08-26T05:14:21Z","git_url":"git://github.com/appcelerator/titanium_mobile.git","ssh_url":"git@github.com:appcelerator/titanium_mobile.git","clone_url":"https://github.com/appcelerator/titanium_mobile.git","svn_url":"https://github.com/appcelerator/titanium_mobile","homepage":"http://www.appcelerator.com","size":1235279,"stargazers_count":2116,"watchers_count":2116,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1126,"mirror_url":null,"open_issues_count":37,"forks":1126,"open_issues":37,"watchers":2116,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/8251"},"html":{"href":"https://github.com/appcelerator/titanium_mobile/pull/8251"},"issue":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/issues/8251"},"comments":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/issues/8251/comments"},"review_comments":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/8251/comments"},"review_comment":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/8251/commits"},"statuses":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/statuses/0dab4cceef8882738358f5d80cbf7ce1c64de84a"}}}}
{"actor":{"display_login":"hansemannn"}}