{"action":"created","issue":{"url":"https://api.github.com/repos/kiwicom/mobile/issues/610","repository_url":"https://api.github.com/repos/kiwicom/mobile","labels_url":"https://api.github.com/repos/kiwicom/mobile/issues/610/labels{/name}","comments_url":"https://api.github.com/repos/kiwicom/mobile/issues/610/comments","events_url":"https://api.github.com/repos/kiwicom/mobile/issues/610/events","html_url":"https://github.com/kiwicom/mobile/pull/610","id":323997836,"number":610,"title":"Whole new iOS infrastructure for embedding within brownfield apps","user":{"login":"grabbou","id":2464966,"avatar_url":"https://avatars2.githubusercontent.com/u/2464966?v=4","gravatar_id":"","url":"https://api.github.com/users/grabbou","html_url":"https://github.com/grabbou","followers_url":"https://api.github.com/users/grabbou/followers","following_url":"https://api.github.com/users/grabbou/following{/other_user}","gists_url":"https://api.github.com/users/grabbou/gists{/gist_id}","starred_url":"https://api.github.com/users/grabbou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grabbou/subscriptions","organizations_url":"https://api.github.com/users/grabbou/orgs","repos_url":"https://api.github.com/users/grabbou/repos","events_url":"https://api.github.com/users/grabbou/events{/privacy}","received_events_url":"https://api.github.com/users/grabbou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-05-17T12:18:06Z","updated_at":"2018-05-17T12:36:16Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/kiwicom/mobile/pulls/610","html_url":"https://github.com/kiwicom/mobile/pull/610","diff_url":"https://github.com/kiwicom/mobile/pull/610.diff","patch_url":"https://github.com/kiwicom/mobile/pull/610.patch"},"body":"This pull request is a result of our internal brainstorming on how to fix the existing setup that uses RNHotelsBundler to download this repository, wrap it up within the `framework` and use inside the app. \r\n\r\nThis process is cumbersome and slow (around 10 minutes) and makes it really hard for others to contribute to the React Native distribution and the glue code.\r\n\r\nAs opposed to the existing setup, we would like to propose a whole new infrastructure within this PR that embraces existing iOS design patterns and tooling.\r\n\r\nBelow is the list of changes, one by one. Please do not get scared of the number of files and lines touched - it's mainly import of `RNHotelsBundler`.\r\n\r\n- We have removed unnecessary targets (like empty automatically generated unit tests)\r\n- We have removed the need for RNHotelsBundler\r\n- Framework (called RNKiwiMobile) is now a separate target inside the existing `.xcodeproj` making the integration really easy - it all now lives in the single file\r\n- It reuses the existing CocoaPods installation making the dependencies in sync and easy to manage\r\n- There is also RNNativePlayground (as opposed to existing RNPlayground) that uses the native home screen to demonstrate `brownfield` integration points. We will use this file to keep implementing features requested by the native team, like the bridge caching\r\n- There is `RNKiwiOptions` interface that includes `initialParameters` (previously called `RNHotelsInitiaParameters), `moduleName` (use it to set a name of component you want to run - we will need it to run other modules in the native app once they are ready) and `jsCodeLocation` (in case you want to run from localhost and see the changes to the Javascript live. Otherwise, by default, it will use the bundle location.\r\n\r\nThe whole process is now super fast (reuses cache) and encourages to prototype - you can change files and see it live in the playground. \r\n\r\nAs a next step, we can also automate it and make new distribution of the framework to be published automatically along the existing `fastlane` setup.\r\n\r\nTo build the framework, you just need to do it from within the Xcode.\r\n\r\n**Important note to the iOS team**: Check the `RNNativePlayground` files for how to integrate your existing native app with the React Native one. The name of files are slightly different and the configuration object is now different to allow better extension in the future. Once this PR lands, I am happy to do the integration work for you - it's less than 5 minutes."},"comment":{"url":"https://api.github.com/repos/kiwicom/mobile/issues/comments/389851175","html_url":"https://github.com/kiwicom/mobile/pull/610#issuecomment-389851175","issue_url":"https://api.github.com/repos/kiwicom/mobile/issues/610","id":389851175,"user":{"login":"grabbou","id":2464966,"avatar_url":"https://avatars2.githubusercontent.com/u/2464966?v=4","gravatar_id":"","url":"https://api.github.com/users/grabbou","html_url":"https://github.com/grabbou","followers_url":"https://api.github.com/users/grabbou/followers","following_url":"https://api.github.com/users/grabbou/following{/other_user}","gists_url":"https://api.github.com/users/grabbou/gists{/gist_id}","starred_url":"https://api.github.com/users/grabbou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grabbou/subscriptions","organizations_url":"https://api.github.com/users/grabbou/orgs","repos_url":"https://api.github.com/users/grabbou/repos","events_url":"https://api.github.com/users/grabbou/events{/privacy}","received_events_url":"https://api.github.com/users/grabbou/received_events","type":"User","site_admin":false},"created_at":"2018-05-17T12:36:16Z","updated_at":"2018-05-17T12:36:16Z","author_association":"COLLABORATOR","body":"We can attach framework here on Github as a release artifact so that your\nnative to pository can just get it with one line of code, instead of\ndownloading and copying file manually.\n\nBut that's another story.\n\nIOS team let me know how would you see this automated.\n\nOn Thu, May 17, 2018, 2:33 PM Mike Grabowski <grabbou@gmail.com> wrote:\n\n> Open up the xcodeproj, select RNNativePlayground from the top where you\n> choose device to run the app on and see it working.\n>\n> The framework builds behind the scenes for you.\n>\n> To do it yourself, select it from that drop down, it's called RNKiwiMobile.\n>\n> If you have troubles finding that piece, look for the ability to change\n> the iOS target.\n>\n>\n> On Thu, May 17, 2018, 2:26 PM Trond Bergquist <notifications@github.com>\n> wrote:\n>\n>> To build the framework, you just need to do it from within the Xcode\n>>\n>> Any instructions for this? I am not very familiar with Xcode.\n>>\n>> Also, how can I use the framework to see that it works?\n>>\n>> —\n>> You are receiving this because you authored the thread.\n>> Reply to this email directly, view it on GitHub\n>> <https://github.com/kiwicom/mobile/pull/610#issuecomment-389848632>, or mute\n>> the thread\n>> <https://github.com/notifications/unsubscribe-auth/ACWcxkcE3-pAPnXQD8uNVw10yJYOfw_xks5tzWyCgaJpZM4UC9Le>\n>> .\n>>\n>\n"}}
{"actor":{"display_login":"grabbou"}}