{"action":"created","comment":{"url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/comments/79496279","id":79496279,"diff_hunk":"@@ -0,0 +1,72 @@\n+/**\n+ * Appcelerator Titanium Mobile\n+ * Copyright (c) 2009-2015 by Appcelerator, Inc. All Rights Reserved.\n+ * Licensed under the terms of the Apache Public License\n+ * Please see the LICENSE included with this distribution for details.\n+ */\n+#import \"TiMediaAlertProxy.h\"\n+ \n+@implementation TiMediaAlertProxy\n+ \n+#pragma mark Proxy Lifecycle\n+ \n+-(id)init\n+{\n+    return [super init];\n+}\n+ \n+-(void)_destroy\n+{\n+    if (sound) {\n+        AudioServicesDisposeSystemSoundID(sound);\n+    }\n+    RELEASE_TO_NIL(url);\n+    [super _destroy];\n+}\n+ \n+#pragma mark System Sound\n+ \n+-(NSURL*)url\n+{\n+    return url;\n+}\n+\n+-(void)setUrl:(id)url_\n+{\n+    RELEASE_TO_NIL(url);\n+    \n+    if ([url_ isKindOfClass:[NSString class]]) {\n+        url = [[TiUtils toURL:url_ proxy:self] retain];\n+        \n+        if ([url isFileURL] == NO) {\n+            // we need to download it and save it off into temp file\n+            NSData *data = [NSData dataWithContentsOfURL:url];\n+            NSString *ext = [[[url path] lastPathComponent] pathExtension];\n+            TiFile* tempFile = [[TiFile createTempFile:ext] retain]; // file auto-deleted on release\n+            [data writeToFile:[tempFile path] atomically:YES];\n+            RELEASE_TO_NIL(url);\n+            url = [[NSURL fileURLWithPath:[tempFile path]] retain];\n+        }\n+    } else if ([url_ isKindOfClass:[TiBlob class]]) {\n+        TiBlob *blob = (TiBlob*)url_;\n+        if ([blob type]==TiBlobTypeFile){","path":"iphone/Classes/TiMediaAlertProxy.m","position":52,"original_position":52,"commit_id":"6df2e42ef1942cee34fde873bea69bb802626f1f","original_commit_id":"6df2e42ef1942cee34fde873bea69bb802626f1f","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":"Format: `if ([blob type] == TiBlobTypeFile) {`","created_at":"2016-09-19T21:44:18Z","updated_at":"2016-09-19T21:46:32Z","html_url":"https://github.com/appcelerator/titanium_mobile/pull/8396#discussion_r79496279","pull_request_url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/8396","_links":{"self":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/comments/79496279"},"html":{"href":"https://github.com/appcelerator/titanium_mobile/pull/8396#discussion_r79496279"},"pull_request":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/8396"}}},"pull_request":{"url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/8396","id":85754882,"html_url":"https://github.com/appcelerator/titanium_mobile/pull/8396","diff_url":"https://github.com/appcelerator/titanium_mobile/pull/8396.diff","patch_url":"https://github.com/appcelerator/titanium_mobile/pull/8396.patch","issue_url":"https://api.github.com/repos/appcelerator/titanium_mobile/issues/8396","number":8396,"state":"open","locked":false,"title":"[TIMOB-5436] Expose iOS System Sound Services","user":{"login":"kopiro","id":839700,"avatar_url":"https://avatars.githubusercontent.com/u/839700?v=3","gravatar_id":"","url":"https://api.github.com/users/kopiro","html_url":"https://github.com/kopiro","followers_url":"https://api.github.com/users/kopiro/followers","following_url":"https://api.github.com/users/kopiro/following{/other_user}","gists_url":"https://api.github.com/users/kopiro/gists{/gist_id}","starred_url":"https://api.github.com/users/kopiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kopiro/subscriptions","organizations_url":"https://api.github.com/users/kopiro/orgs","repos_url":"https://api.github.com/users/kopiro/repos","events_url":"https://api.github.com/users/kopiro/events{/privacy}","received_events_url":"https://api.github.com/users/kopiro/received_events","type":"User","site_admin":false},"body":"**JIRA:** https://jira.appcelerator.org/browse/TIMOB-5436\r\n\r\nYou can use this module to provide audible alerts. \r\n\r\nThis module differs from the Sound module because it honors the ringtone volume, not the Music volume.\r\n\r\nKnow more about [System Sound Services](https://developer.apple.com/reference/audiotoolbox/1657326-system_sound_services).\r\n\r\nExample:\r\n\r\n```\r\nTi.Media.createAlert({url: '/sounds/test.wav' }).play();\r\n```\r\n","created_at":"2016-09-19T08:38:26Z","updated_at":"2016-09-19T21:46:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3e942210033611651c6f4ce28ccfb0677d991d58","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/8396/commits","review_comments_url":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/8396/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/8396/comments","statuses_url":"https://api.github.com/repos/appcelerator/titanium_mobile/statuses/6df2e42ef1942cee34fde873bea69bb802626f1f","head":{"label":"caffeinalab:PR-TIMOB-5436","ref":"PR-TIMOB-5436","sha":"6df2e42ef1942cee34fde873bea69bb802626f1f","user":{"login":"caffeinalab","id":1598748,"avatar_url":"https://avatars.githubusercontent.com/u/1598748?v=3","gravatar_id":"","url":"https://api.github.com/users/caffeinalab","html_url":"https://github.com/caffeinalab","followers_url":"https://api.github.com/users/caffeinalab/followers","following_url":"https://api.github.com/users/caffeinalab/following{/other_user}","gists_url":"https://api.github.com/users/caffeinalab/gists{/gist_id}","starred_url":"https://api.github.com/users/caffeinalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caffeinalab/subscriptions","organizations_url":"https://api.github.com/users/caffeinalab/orgs","repos_url":"https://api.github.com/users/caffeinalab/repos","events_url":"https://api.github.com/users/caffeinalab/events{/privacy}","received_events_url":"https://api.github.com/users/caffeinalab/received_events","type":"Organization","site_admin":false},"repo":{"id":36289760,"name":"titanium_mobile","full_name":"caffeinalab/titanium_mobile","owner":{"login":"caffeinalab","id":1598748,"avatar_url":"https://avatars.githubusercontent.com/u/1598748?v=3","gravatar_id":"","url":"https://api.github.com/users/caffeinalab","html_url":"https://github.com/caffeinalab","followers_url":"https://api.github.com/users/caffeinalab/followers","following_url":"https://api.github.com/users/caffeinalab/following{/other_user}","gists_url":"https://api.github.com/users/caffeinalab/gists{/gist_id}","starred_url":"https://api.github.com/users/caffeinalab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caffeinalab/subscriptions","organizations_url":"https://api.github.com/users/caffeinalab/orgs","repos_url":"https://api.github.com/users/caffeinalab/repos","events_url":"https://api.github.com/users/caffeinalab/events{/privacy}","received_events_url":"https://api.github.com/users/caffeinalab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caffeinalab/titanium_mobile","description":"Appcelerator Titanium Mobile","fork":true,"url":"https://api.github.com/repos/caffeinalab/titanium_mobile","forks_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/forks","keys_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/teams","hooks_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/hooks","issue_events_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/issues/events{/number}","events_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/events","assignees_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/assignees{/user}","branches_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/branches{/branch}","tags_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/tags","blobs_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/git/refs{/sha}","trees_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/statuses/{sha}","languages_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/languages","stargazers_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/stargazers","contributors_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/contributors","subscribers_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/subscribers","subscription_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/subscription","commits_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/commits{/sha}","git_commits_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/git/commits{/sha}","comments_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/comments{/number}","issue_comment_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/issues/comments{/number}","contents_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/contents/{+path}","compare_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/merges","archive_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/downloads","issues_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/issues{/number}","pulls_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/pulls{/number}","milestones_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/milestones{/number}","notifications_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/labels{/name}","releases_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/releases{/id}","deployments_url":"https://api.github.com/repos/caffeinalab/titanium_mobile/deployments","created_at":"2015-05-26T10:49:33Z","updated_at":"2016-08-20T16:02:11Z","pushed_at":"2016-09-19T08:36:15Z","git_url":"git://github.com/caffeinalab/titanium_mobile.git","ssh_url":"git@github.com:caffeinalab/titanium_mobile.git","clone_url":"https://github.com/caffeinalab/titanium_mobile.git","svn_url":"https://github.com/caffeinalab/titanium_mobile","homepage":"http://www.appcelerator.com","size":1182075,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"appcelerator:master","ref":"master","sha":"ed5fc798acda6ae63135bd4840b697af8254494f","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-09-19T16:20:43Z","pushed_at":"2016-09-19T21:16:33Z","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":1336179,"stargazers_count":2123,"watchers_count":2123,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1132,"mirror_url":null,"open_issues_count":40,"forks":1132,"open_issues":40,"watchers":2123,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/8396"},"html":{"href":"https://github.com/appcelerator/titanium_mobile/pull/8396"},"issue":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/issues/8396"},"comments":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/issues/8396/comments"},"review_comments":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/pulls/8396/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/8396/commits"},"statuses":{"href":"https://api.github.com/repos/appcelerator/titanium_mobile/statuses/6df2e42ef1942cee34fde873bea69bb802626f1f"}}}}
{"actor":{"display_login":"hansemannn"}}