{"action":"created","comment":{"url":"https://api.github.com/repos/realm/realm-js/pulls/comments/70803123","id":70803123,"diff_hunk":"@@ -55,20 +56,21 @@ - (JSGlobalContextRef)ctx;\n     id rctJSContext = object_getIvar(executor, contextIvar);\n     if (!rctJSContext && create) {\n         Class RCTJavaScriptContext = NSClassFromString(@\"RCTJavaScriptContext\");\n-        NSMethodSignature *signature = [RCTJavaScriptContext instanceMethodSignatureForSelector:@selector(initWithJSContext:)];\n-        assert(signature);\n \n-        // React Native 0.14+ expects a JSContext here, but we also support 0.13.x, which takes a JSGlobalContextRef.\n-        if (!strcmp([signature getArgumentTypeAtIndex:2], \"@\")) {\n-            JSContext *context = [[JSContext alloc] init];\n-            rctJSContext = [[RCTJavaScriptContext alloc] initWithJSContext:(void *)context];\n+        NSMethodSignature *signature = [RCTJavaScriptContext instanceMethodSignatureForSelector:@selector(initWithJSContext:onThread:)];\n+        if (signature) {\n+            // for RN 0.28.0+\n+            rctJSContext = [executor context];","path":"react-native/ios/RealmReact/RealmReact.mm","position":null,"original_position":24,"commit_id":"e3e3355650008178b4a670ee3c61ff0ed965b762","original_commit_id":"414c1e3a1ec5c613995c6f20649b03c99f2c29ed","user":{"login":"alazier","id":250144,"avatar_url":"https://avatars.githubusercontent.com/u/250144?v=3","gravatar_id":"","url":"https://api.github.com/users/alazier","html_url":"https://github.com/alazier","followers_url":"https://api.github.com/users/alazier/followers","following_url":"https://api.github.com/users/alazier/following{/other_user}","gists_url":"https://api.github.com/users/alazier/gists{/gist_id}","starred_url":"https://api.github.com/users/alazier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alazier/subscriptions","organizations_url":"https://api.github.com/users/alazier/orgs","repos_url":"https://api.github.com/users/alazier/repos","events_url":"https://api.github.com/users/alazier/events{/privacy}","received_events_url":"https://api.github.com/users/alazier/received_events","type":"User","site_admin":false},"body":"@appden - last time I tried it `RCTJavaScriptContextCreatedNotification` is posted async and in some cases would arrive after RN tried to call our apis which obviously wouldn't work. Probably worth trying this out again since the RN code base has changed significantly since. The `JSContext` hack sounds terrible but I think your right about its reliability. Only issue is it might be too reliable - ie how do we prevent other `JSContext`s outside of RN from being initialized with our apis?","created_at":"2016-07-14T13:21:00Z","updated_at":"2016-07-14T13:21:00Z","html_url":"https://github.com/realm/realm-js/pull/523#discussion_r70803123","pull_request_url":"https://api.github.com/repos/realm/realm-js/pulls/523","_links":{"self":{"href":"https://api.github.com/repos/realm/realm-js/pulls/comments/70803123"},"html":{"href":"https://github.com/realm/realm-js/pull/523#discussion_r70803123"},"pull_request":{"href":"https://api.github.com/repos/realm/realm-js/pulls/523"}}},"pull_request":{"url":"https://api.github.com/repos/realm/realm-js/pulls/523","id":76826061,"html_url":"https://github.com/realm/realm-js/pull/523","diff_url":"https://github.com/realm/realm-js/pull/523.diff","patch_url":"https://github.com/realm/realm-js/pull/523.patch","issue_url":"https://api.github.com/repos/realm/realm-js/issues/523","number":523,"state":"open","locked":false,"title":"Support latest react-native version","user":{"login":"alazier","id":250144,"avatar_url":"https://avatars.githubusercontent.com/u/250144?v=3","gravatar_id":"","url":"https://api.github.com/users/alazier","html_url":"https://github.com/alazier","followers_url":"https://api.github.com/users/alazier/followers","following_url":"https://api.github.com/users/alazier/following{/other_user}","gists_url":"https://api.github.com/users/alazier/gists{/gist_id}","starred_url":"https://api.github.com/users/alazier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alazier/subscriptions","organizations_url":"https://api.github.com/users/alazier/orgs","repos_url":"https://api.github.com/users/alazier/repos","events_url":"https://api.github.com/users/alazier/events{/privacy}","received_events_url":"https://api.github.com/users/alazier/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-08T23:01:02Z","updated_at":"2016-07-14T13:21:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"554baef411911227496718776435c211bfa81aff","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/realm/realm-js/pulls/523/commits","review_comments_url":"https://api.github.com/repos/realm/realm-js/pulls/523/comments","review_comment_url":"https://api.github.com/repos/realm/realm-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/realm/realm-js/issues/523/comments","statuses_url":"https://api.github.com/repos/realm/realm-js/statuses/e3e3355650008178b4a670ee3c61ff0ed965b762","head":{"label":"realm:al-rn-29","ref":"al-rn-29","sha":"e3e3355650008178b4a670ee3c61ff0ed965b762","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":40667593,"name":"realm-js","full_name":"realm/realm-js","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/realm-js","description":" Realm is a mobile database: an alternative to SQLite & key-value stores","fork":false,"url":"https://api.github.com/repos/realm/realm-js","forks_url":"https://api.github.com/repos/realm/realm-js/forks","keys_url":"https://api.github.com/repos/realm/realm-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/realm-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/realm-js/teams","hooks_url":"https://api.github.com/repos/realm/realm-js/hooks","issue_events_url":"https://api.github.com/repos/realm/realm-js/issues/events{/number}","events_url":"https://api.github.com/repos/realm/realm-js/events","assignees_url":"https://api.github.com/repos/realm/realm-js/assignees{/user}","branches_url":"https://api.github.com/repos/realm/realm-js/branches{/branch}","tags_url":"https://api.github.com/repos/realm/realm-js/tags","blobs_url":"https://api.github.com/repos/realm/realm-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/realm-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/realm-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/realm-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/realm-js/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/realm-js/languages","stargazers_url":"https://api.github.com/repos/realm/realm-js/stargazers","contributors_url":"https://api.github.com/repos/realm/realm-js/contributors","subscribers_url":"https://api.github.com/repos/realm/realm-js/subscribers","subscription_url":"https://api.github.com/repos/realm/realm-js/subscription","commits_url":"https://api.github.com/repos/realm/realm-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/realm-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/realm-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/realm-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/realm-js/contents/{+path}","compare_url":"https://api.github.com/repos/realm/realm-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/realm-js/merges","archive_url":"https://api.github.com/repos/realm/realm-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/realm-js/downloads","issues_url":"https://api.github.com/repos/realm/realm-js/issues{/number}","pulls_url":"https://api.github.com/repos/realm/realm-js/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/realm-js/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/realm-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/realm-js/labels{/name}","releases_url":"https://api.github.com/repos/realm/realm-js/releases{/id}","deployments_url":"https://api.github.com/repos/realm/realm-js/deployments","created_at":"2015-08-13T15:51:36Z","updated_at":"2016-07-14T10:51:19Z","pushed_at":"2016-07-14T02:16:05Z","git_url":"git://github.com/realm/realm-js.git","ssh_url":"git@github.com:realm/realm-js.git","clone_url":"https://github.com/realm/realm-js.git","svn_url":"https://github.com/realm/realm-js","homepage":"https://realm.io","size":87192,"stargazers_count":1003,"watchers_count":1003,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"open_issues_count":100,"forks":54,"open_issues":100,"watchers":1003,"default_branch":"master"}},"base":{"label":"realm:master","ref":"master","sha":"b06ee441bd7c2fced07e8e496f265a7578a06d07","user":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"repo":{"id":40667593,"name":"realm-js","full_name":"realm/realm-js","owner":{"login":"realm","id":7575099,"avatar_url":"https://avatars.githubusercontent.com/u/7575099?v=3","gravatar_id":"","url":"https://api.github.com/users/realm","html_url":"https://github.com/realm","followers_url":"https://api.github.com/users/realm/followers","following_url":"https://api.github.com/users/realm/following{/other_user}","gists_url":"https://api.github.com/users/realm/gists{/gist_id}","starred_url":"https://api.github.com/users/realm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/realm/subscriptions","organizations_url":"https://api.github.com/users/realm/orgs","repos_url":"https://api.github.com/users/realm/repos","events_url":"https://api.github.com/users/realm/events{/privacy}","received_events_url":"https://api.github.com/users/realm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/realm/realm-js","description":" Realm is a mobile database: an alternative to SQLite & key-value stores","fork":false,"url":"https://api.github.com/repos/realm/realm-js","forks_url":"https://api.github.com/repos/realm/realm-js/forks","keys_url":"https://api.github.com/repos/realm/realm-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/realm/realm-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/realm/realm-js/teams","hooks_url":"https://api.github.com/repos/realm/realm-js/hooks","issue_events_url":"https://api.github.com/repos/realm/realm-js/issues/events{/number}","events_url":"https://api.github.com/repos/realm/realm-js/events","assignees_url":"https://api.github.com/repos/realm/realm-js/assignees{/user}","branches_url":"https://api.github.com/repos/realm/realm-js/branches{/branch}","tags_url":"https://api.github.com/repos/realm/realm-js/tags","blobs_url":"https://api.github.com/repos/realm/realm-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/realm/realm-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/realm/realm-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/realm/realm-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/realm/realm-js/statuses/{sha}","languages_url":"https://api.github.com/repos/realm/realm-js/languages","stargazers_url":"https://api.github.com/repos/realm/realm-js/stargazers","contributors_url":"https://api.github.com/repos/realm/realm-js/contributors","subscribers_url":"https://api.github.com/repos/realm/realm-js/subscribers","subscription_url":"https://api.github.com/repos/realm/realm-js/subscription","commits_url":"https://api.github.com/repos/realm/realm-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/realm/realm-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/realm/realm-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/realm/realm-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/realm/realm-js/contents/{+path}","compare_url":"https://api.github.com/repos/realm/realm-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/realm/realm-js/merges","archive_url":"https://api.github.com/repos/realm/realm-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/realm/realm-js/downloads","issues_url":"https://api.github.com/repos/realm/realm-js/issues{/number}","pulls_url":"https://api.github.com/repos/realm/realm-js/pulls{/number}","milestones_url":"https://api.github.com/repos/realm/realm-js/milestones{/number}","notifications_url":"https://api.github.com/repos/realm/realm-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/realm/realm-js/labels{/name}","releases_url":"https://api.github.com/repos/realm/realm-js/releases{/id}","deployments_url":"https://api.github.com/repos/realm/realm-js/deployments","created_at":"2015-08-13T15:51:36Z","updated_at":"2016-07-14T10:51:19Z","pushed_at":"2016-07-14T02:16:05Z","git_url":"git://github.com/realm/realm-js.git","ssh_url":"git@github.com:realm/realm-js.git","clone_url":"https://github.com/realm/realm-js.git","svn_url":"https://github.com/realm/realm-js","homepage":"https://realm.io","size":87192,"stargazers_count":1003,"watchers_count":1003,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"open_issues_count":100,"forks":54,"open_issues":100,"watchers":1003,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/realm/realm-js/pulls/523"},"html":{"href":"https://github.com/realm/realm-js/pull/523"},"issue":{"href":"https://api.github.com/repos/realm/realm-js/issues/523"},"comments":{"href":"https://api.github.com/repos/realm/realm-js/issues/523/comments"},"review_comments":{"href":"https://api.github.com/repos/realm/realm-js/pulls/523/comments"},"review_comment":{"href":"https://api.github.com/repos/realm/realm-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/realm/realm-js/pulls/523/commits"},"statuses":{"href":"https://api.github.com/repos/realm/realm-js/statuses/e3e3355650008178b4a670ee3c61ff0ed965b762"}}}}
{"actor":{"display_login":"alazier"}}