{"action":"opened","number":208,"pull_request":{"url":"https://api.github.com/repos/lwansbrough/react-native-camera/pulls/208","id":60117524,"html_url":"https://github.com/lwansbrough/react-native-camera/pull/208","diff_url":"https://github.com/lwansbrough/react-native-camera/pull/208.diff","patch_url":"https://github.com/lwansbrough/react-native-camera/pull/208.patch","issue_url":"https://api.github.com/repos/lwansbrough/react-native-camera/issues/208","number":208,"state":"open","locked":false,"title":"Fixes infinite loop in layoutSubviews","user":{"login":"FrankSalad","id":2359644,"avatar_url":"https://avatars.githubusercontent.com/u/2359644?v=3","gravatar_id":"","url":"https://api.github.com/users/FrankSalad","html_url":"https://github.com/FrankSalad","followers_url":"https://api.github.com/users/FrankSalad/followers","following_url":"https://api.github.com/users/FrankSalad/following{/other_user}","gists_url":"https://api.github.com/users/FrankSalad/gists{/gist_id}","starred_url":"https://api.github.com/users/FrankSalad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrankSalad/subscriptions","organizations_url":"https://api.github.com/users/FrankSalad/orgs","repos_url":"https://api.github.com/users/FrankSalad/repos","events_url":"https://api.github.com/users/FrankSalad/events{/privacy}","received_events_url":"https://api.github.com/users/FrankSalad/received_events","type":"User","site_admin":false},"body":"When someone activates multiple `<Camera>` components, for example, if they double tap a navigator button that opens a View with a `<Camera>` component, RCTCamera.m will call `[super layoutSubviews];` in an infinite loop. I believe it has to do with the shared `self.manager.previewLayer`. When one RCTCamera instance sets the `frame` on the same shared previewLayer, the other RCTCamera instance has its `layoutSubviews` called, it sets the frame, and the first one has `layoutSubviews` and they just keep handing off to each other infinitely. \r\n\r\nThis patch has each RCTCamera instance allocate and manage its own preview layer. The disadvantage is that this previewLayer wont respond to `RCTCameraManger.changeAspect` and `RCTCameraManager.changeOrientation`. Open to other solutions.","created_at":"2016-02-22T02:30:52Z","updated_at":"2016-02-22T02:30:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lwansbrough/react-native-camera/pulls/208/commits","review_comments_url":"https://api.github.com/repos/lwansbrough/react-native-camera/pulls/208/comments","review_comment_url":"https://api.github.com/repos/lwansbrough/react-native-camera/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lwansbrough/react-native-camera/issues/208/comments","statuses_url":"https://api.github.com/repos/lwansbrough/react-native-camera/statuses/9f83f86b3549b766dd0f375a1ac04994b3e0b441","head":{"label":"FrankSalad:fix-reentrant-sessions","ref":"fix-reentrant-sessions","sha":"9f83f86b3549b766dd0f375a1ac04994b3e0b441","user":{"login":"FrankSalad","id":2359644,"avatar_url":"https://avatars.githubusercontent.com/u/2359644?v=3","gravatar_id":"","url":"https://api.github.com/users/FrankSalad","html_url":"https://github.com/FrankSalad","followers_url":"https://api.github.com/users/FrankSalad/followers","following_url":"https://api.github.com/users/FrankSalad/following{/other_user}","gists_url":"https://api.github.com/users/FrankSalad/gists{/gist_id}","starred_url":"https://api.github.com/users/FrankSalad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrankSalad/subscriptions","organizations_url":"https://api.github.com/users/FrankSalad/orgs","repos_url":"https://api.github.com/users/FrankSalad/repos","events_url":"https://api.github.com/users/FrankSalad/events{/privacy}","received_events_url":"https://api.github.com/users/FrankSalad/received_events","type":"User","site_admin":false},"repo":{"id":52240505,"name":"react-native-camera","full_name":"FrankSalad/react-native-camera","owner":{"login":"FrankSalad","id":2359644,"avatar_url":"https://avatars.githubusercontent.com/u/2359644?v=3","gravatar_id":"","url":"https://api.github.com/users/FrankSalad","html_url":"https://github.com/FrankSalad","followers_url":"https://api.github.com/users/FrankSalad/followers","following_url":"https://api.github.com/users/FrankSalad/following{/other_user}","gists_url":"https://api.github.com/users/FrankSalad/gists{/gist_id}","starred_url":"https://api.github.com/users/FrankSalad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FrankSalad/subscriptions","organizations_url":"https://api.github.com/users/FrankSalad/orgs","repos_url":"https://api.github.com/users/FrankSalad/repos","events_url":"https://api.github.com/users/FrankSalad/events{/privacy}","received_events_url":"https://api.github.com/users/FrankSalad/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/FrankSalad/react-native-camera","description":"A Camera component for React Native. Also supports barcode scanning!","fork":true,"url":"https://api.github.com/repos/FrankSalad/react-native-camera","forks_url":"https://api.github.com/repos/FrankSalad/react-native-camera/forks","keys_url":"https://api.github.com/repos/FrankSalad/react-native-camera/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FrankSalad/react-native-camera/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FrankSalad/react-native-camera/teams","hooks_url":"https://api.github.com/repos/FrankSalad/react-native-camera/hooks","issue_events_url":"https://api.github.com/repos/FrankSalad/react-native-camera/issues/events{/number}","events_url":"https://api.github.com/repos/FrankSalad/react-native-camera/events","assignees_url":"https://api.github.com/repos/FrankSalad/react-native-camera/assignees{/user}","branches_url":"https://api.github.com/repos/FrankSalad/react-native-camera/branches{/branch}","tags_url":"https://api.github.com/repos/FrankSalad/react-native-camera/tags","blobs_url":"https://api.github.com/repos/FrankSalad/react-native-camera/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FrankSalad/react-native-camera/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FrankSalad/react-native-camera/git/refs{/sha}","trees_url":"https://api.github.com/repos/FrankSalad/react-native-camera/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FrankSalad/react-native-camera/statuses/{sha}","languages_url":"https://api.github.com/repos/FrankSalad/react-native-camera/languages","stargazers_url":"https://api.github.com/repos/FrankSalad/react-native-camera/stargazers","contributors_url":"https://api.github.com/repos/FrankSalad/react-native-camera/contributors","subscribers_url":"https://api.github.com/repos/FrankSalad/react-native-camera/subscribers","subscription_url":"https://api.github.com/repos/FrankSalad/react-native-camera/subscription","commits_url":"https://api.github.com/repos/FrankSalad/react-native-camera/commits{/sha}","git_commits_url":"https://api.github.com/repos/FrankSalad/react-native-camera/git/commits{/sha}","comments_url":"https://api.github.com/repos/FrankSalad/react-native-camera/comments{/number}","issue_comment_url":"https://api.github.com/repos/FrankSalad/react-native-camera/issues/comments{/number}","contents_url":"https://api.github.com/repos/FrankSalad/react-native-camera/contents/{+path}","compare_url":"https://api.github.com/repos/FrankSalad/react-native-camera/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FrankSalad/react-native-camera/merges","archive_url":"https://api.github.com/repos/FrankSalad/react-native-camera/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FrankSalad/react-native-camera/downloads","issues_url":"https://api.github.com/repos/FrankSalad/react-native-camera/issues{/number}","pulls_url":"https://api.github.com/repos/FrankSalad/react-native-camera/pulls{/number}","milestones_url":"https://api.github.com/repos/FrankSalad/react-native-camera/milestones{/number}","notifications_url":"https://api.github.com/repos/FrankSalad/react-native-camera/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FrankSalad/react-native-camera/labels{/name}","releases_url":"https://api.github.com/repos/FrankSalad/react-native-camera/releases{/id}","deployments_url":"https://api.github.com/repos/FrankSalad/react-native-camera/deployments","created_at":"2016-02-22T02:15:44Z","updated_at":"2016-02-22T02:15:44Z","pushed_at":"2016-02-22T02:21:51Z","git_url":"git://github.com/FrankSalad/react-native-camera.git","ssh_url":"git@github.com:FrankSalad/react-native-camera.git","clone_url":"https://github.com/FrankSalad/react-native-camera.git","svn_url":"https://github.com/FrankSalad/react-native-camera","homepage":"","size":215,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"lwansbrough:master","ref":"master","sha":"80d9ed6f256dc7f47f281a39f72902caf3d87f7f","user":{"login":"lwansbrough","id":186674,"avatar_url":"https://avatars.githubusercontent.com/u/186674?v=3","gravatar_id":"","url":"https://api.github.com/users/lwansbrough","html_url":"https://github.com/lwansbrough","followers_url":"https://api.github.com/users/lwansbrough/followers","following_url":"https://api.github.com/users/lwansbrough/following{/other_user}","gists_url":"https://api.github.com/users/lwansbrough/gists{/gist_id}","starred_url":"https://api.github.com/users/lwansbrough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwansbrough/subscriptions","organizations_url":"https://api.github.com/users/lwansbrough/orgs","repos_url":"https://api.github.com/users/lwansbrough/repos","events_url":"https://api.github.com/users/lwansbrough/events{/privacy}","received_events_url":"https://api.github.com/users/lwansbrough/received_events","type":"User","site_admin":false},"repo":{"id":33218414,"name":"react-native-camera","full_name":"lwansbrough/react-native-camera","owner":{"login":"lwansbrough","id":186674,"avatar_url":"https://avatars.githubusercontent.com/u/186674?v=3","gravatar_id":"","url":"https://api.github.com/users/lwansbrough","html_url":"https://github.com/lwansbrough","followers_url":"https://api.github.com/users/lwansbrough/followers","following_url":"https://api.github.com/users/lwansbrough/following{/other_user}","gists_url":"https://api.github.com/users/lwansbrough/gists{/gist_id}","starred_url":"https://api.github.com/users/lwansbrough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwansbrough/subscriptions","organizations_url":"https://api.github.com/users/lwansbrough/orgs","repos_url":"https://api.github.com/users/lwansbrough/repos","events_url":"https://api.github.com/users/lwansbrough/events{/privacy}","received_events_url":"https://api.github.com/users/lwansbrough/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lwansbrough/react-native-camera","description":"A Camera component for React Native. Also supports barcode scanning!","fork":false,"url":"https://api.github.com/repos/lwansbrough/react-native-camera","forks_url":"https://api.github.com/repos/lwansbrough/react-native-camera/forks","keys_url":"https://api.github.com/repos/lwansbrough/react-native-camera/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lwansbrough/react-native-camera/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lwansbrough/react-native-camera/teams","hooks_url":"https://api.github.com/repos/lwansbrough/react-native-camera/hooks","issue_events_url":"https://api.github.com/repos/lwansbrough/react-native-camera/issues/events{/number}","events_url":"https://api.github.com/repos/lwansbrough/react-native-camera/events","assignees_url":"https://api.github.com/repos/lwansbrough/react-native-camera/assignees{/user}","branches_url":"https://api.github.com/repos/lwansbrough/react-native-camera/branches{/branch}","tags_url":"https://api.github.com/repos/lwansbrough/react-native-camera/tags","blobs_url":"https://api.github.com/repos/lwansbrough/react-native-camera/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lwansbrough/react-native-camera/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lwansbrough/react-native-camera/git/refs{/sha}","trees_url":"https://api.github.com/repos/lwansbrough/react-native-camera/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lwansbrough/react-native-camera/statuses/{sha}","languages_url":"https://api.github.com/repos/lwansbrough/react-native-camera/languages","stargazers_url":"https://api.github.com/repos/lwansbrough/react-native-camera/stargazers","contributors_url":"https://api.github.com/repos/lwansbrough/react-native-camera/contributors","subscribers_url":"https://api.github.com/repos/lwansbrough/react-native-camera/subscribers","subscription_url":"https://api.github.com/repos/lwansbrough/react-native-camera/subscription","commits_url":"https://api.github.com/repos/lwansbrough/react-native-camera/commits{/sha}","git_commits_url":"https://api.github.com/repos/lwansbrough/react-native-camera/git/commits{/sha}","comments_url":"https://api.github.com/repos/lwansbrough/react-native-camera/comments{/number}","issue_comment_url":"https://api.github.com/repos/lwansbrough/react-native-camera/issues/comments{/number}","contents_url":"https://api.github.com/repos/lwansbrough/react-native-camera/contents/{+path}","compare_url":"https://api.github.com/repos/lwansbrough/react-native-camera/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lwansbrough/react-native-camera/merges","archive_url":"https://api.github.com/repos/lwansbrough/react-native-camera/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lwansbrough/react-native-camera/downloads","issues_url":"https://api.github.com/repos/lwansbrough/react-native-camera/issues{/number}","pulls_url":"https://api.github.com/repos/lwansbrough/react-native-camera/pulls{/number}","milestones_url":"https://api.github.com/repos/lwansbrough/react-native-camera/milestones{/number}","notifications_url":"https://api.github.com/repos/lwansbrough/react-native-camera/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lwansbrough/react-native-camera/labels{/name}","releases_url":"https://api.github.com/repos/lwansbrough/react-native-camera/releases{/id}","deployments_url":"https://api.github.com/repos/lwansbrough/react-native-camera/deployments","created_at":"2015-04-01T00:54:40Z","updated_at":"2016-02-20T18:21:17Z","pushed_at":"2016-02-19T22:21:33Z","git_url":"git://github.com/lwansbrough/react-native-camera.git","ssh_url":"git@github.com:lwansbrough/react-native-camera.git","clone_url":"https://github.com/lwansbrough/react-native-camera.git","svn_url":"https://github.com/lwansbrough/react-native-camera","homepage":"","size":248,"stargazers_count":756,"watchers_count":756,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":148,"mirror_url":null,"open_issues_count":59,"forks":148,"open_issues":59,"watchers":756,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lwansbrough/react-native-camera/pulls/208"},"html":{"href":"https://github.com/lwansbrough/react-native-camera/pull/208"},"issue":{"href":"https://api.github.com/repos/lwansbrough/react-native-camera/issues/208"},"comments":{"href":"https://api.github.com/repos/lwansbrough/react-native-camera/issues/208/comments"},"review_comments":{"href":"https://api.github.com/repos/lwansbrough/react-native-camera/pulls/208/comments"},"review_comment":{"href":"https://api.github.com/repos/lwansbrough/react-native-camera/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lwansbrough/react-native-camera/pulls/208/commits"},"statuses":{"href":"https://api.github.com/repos/lwansbrough/react-native-camera/statuses/9f83f86b3549b766dd0f375a1ac04994b3e0b441"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":4,"deletions":2,"changed_files":2}}