{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/4717","labels_url":"https://api.github.com/repos/facebook/react-native/issues/4717/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/4717/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/4717/events","html_url":"https://github.com/facebook/react-native/issues/4717","id":121555781,"number":4717,"title":"Problems with iOS \"Integrating with Existing Apps\" documentation","user":{"login":"DougBanksPersonal","id":7455525,"avatar_url":"https://avatars.githubusercontent.com/u/7455525?v=3","gravatar_id":"","url":"https://api.github.com/users/DougBanksPersonal","html_url":"https://github.com/DougBanksPersonal","followers_url":"https://api.github.com/users/DougBanksPersonal/followers","following_url":"https://api.github.com/users/DougBanksPersonal/following{/other_user}","gists_url":"https://api.github.com/users/DougBanksPersonal/gists{/gist_id}","starred_url":"https://api.github.com/users/DougBanksPersonal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DougBanksPersonal/subscriptions","organizations_url":"https://api.github.com/users/DougBanksPersonal/orgs","repos_url":"https://api.github.com/users/DougBanksPersonal/repos","events_url":"https://api.github.com/users/DougBanksPersonal/events{/privacy}","received_events_url":"https://api.github.com/users/DougBanksPersonal/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/react-native/labels/Documentation","name":"Documentation","color":"fef2c0"},{"url":"https://api.github.com/repos/facebook/react-native/labels/iOS","name":"iOS","color":"c7def8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-12-10T19:08:11Z","updated_at":"2016-01-15T08:31:14Z","closed_at":"2016-01-03T05:45:00Z","body":"Working through:\r\n\r\nhttps://facebook.github.io/react-native/docs/embedded-app-ios.html#content\r\n\r\nhitting a few issues.\r\n\r\nSome background on me: not familiar with node, nvm, etc.  Some experience with iOS/Cocoapods.  No experience with React.\r\n\r\n1. The instruction \"Install your copy of React Native under your node_modules directory where your JS resides.\" is confusing.\r\n\r\nIt isn't explained anywhere how to do this.  \r\n\r\nIn \"Getting started\", the react-native package is installed as a side effect of running:\r\n```\r\nreact-native init AwesomeProject\r\n```\r\nbut there's no instructions, that I could find, about how to install just the package in an existing project.\r\n\r\nThis is made more confusing by the overloading of 'react-native'.  It is both a command-line tool and a package name.  You do provide directions on installing the command-line-tool, but nothing for installing the package.\r\n\r\nFinally figured this out with some help: \r\n```\r\nnpm install react-native\r\n```\r\nI still am not clear where I should run this command: If my directory structure is \r\n```\r\nproject_parent_dir\r\n    project_dir\r\n        myproject.xcworkspace\r\n        myproject.xcodeproj\r\n        directory_with_my_custom_react_js\r\n        other_directories_which_may_contain_js\r\n        Podfile\r\n        Pods\r\n```\r\nshould I be running this command in project_parent_dir, parent_dir, directory_with_my_custom_react_js, somewhere else?\r\n\r\n2. \"Pods/React\" is never created.\r\nWhen following instructions to start the server:\r\n```\r\n(JS_DIR=`pwd`/ReactComponent; cd Pods/React; npm run start -- --root $JS_DIR)\r\n```\r\nthe 'cd Pods/React' command always fails because Pods/React is not created.  The 'pod install' command succeeds, with output indicating React was installed:\r\n```\r\n$ pod install\r\nUpdating local specs repositories\r\nAnalyzing dependencies\r\nFetching podspec for `React` from `./node_modules/react-native`\r\nDownloading dependencies\r\nUsing AFNetworking (2.6.0)\r\nUsing Alamofire (3.0.1)\r\nUsing EGOCache (2.1.3)\r\nUsing FPPicker (5.0.1)\r\nUsing FSImageViewer (3.4)\r\nUsing Fabric (1.6.1)\r\nUsing Kanna (1.0.3)\r\nUsing Kingfisher (1.6.1)\r\nUsing MBProgressHUD (0.9.1)\r\nUsing PSPDFTextView (1.2.0)\r\nInstalling React 0.14.2 (was 0.14.2)\r\nUsing SVWebViewController (1.0)\r\nUsing SwiftValidator (3.0.0)\r\nUsing SwiftyJSON (2.3.2)\r\nUsing UAProgressView (0.1.2)\r\nGenerating Pods project\r\nIntegrating client project\r\nSending stats\r\nlsPod installation complete! There are 23 dependencies from the Podfile and 15 total pods installed.\r\n```\r\n\r\n3. The server is always trying to find js from more than one root directory.\r\nThe command\r\n```\r\n(JS_DIR=`pwd`/ReactComponents; cd Pods/React; npm run start -- --root $JS_DIR)\r\n```\r\nwould suggest that I am telling the server to look for js under 'ReactComponents'.\r\n\r\nInstead, as part of the server starting, I see the following spew:\r\n```\r\nLooking for JS files in\r\n   /Users/douglasbanks/zeemeesrc/zeemee-ios/ZeeMeeApp\r\n   /Users/douglasbanks/zeemeesrc/zeemee-ios/ZeeMeeApp/ReactComponents \r\n```\r\n\r\nI can't seem to get rid of that first line no matter what I do.  It seems to always include the parent of 'node_modules/react-native'.\r\n\r\nI suppose I could make sure that I install node_modules/react-native in my ReactComponents directory, or off to the side somewhere so that it's not picking up duplicate/unintended js files.  If that really is the case (like it's always going to include that parent directory), the documentation should be very clear that where you install node_modules matters.\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/171900796","html_url":"https://github.com/facebook/react-native/issues/4717#issuecomment-171900796","issue_url":"https://api.github.com/repos/facebook/react-native/issues/4717","id":171900796,"user":{"login":"adamski","id":14980,"avatar_url":"https://avatars.githubusercontent.com/u/14980?v=3","gravatar_id":"","url":"https://api.github.com/users/adamski","html_url":"https://github.com/adamski","followers_url":"https://api.github.com/users/adamski/followers","following_url":"https://api.github.com/users/adamski/following{/other_user}","gists_url":"https://api.github.com/users/adamski/gists{/gist_id}","starred_url":"https://api.github.com/users/adamski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamski/subscriptions","organizations_url":"https://api.github.com/users/adamski/orgs","repos_url":"https://api.github.com/users/adamski/repos","events_url":"https://api.github.com/users/adamski/events{/privacy}","received_events_url":"https://api.github.com/users/adamski/received_events","type":"User","site_admin":false},"created_at":"2016-01-15T08:31:14Z","updated_at":"2016-01-15T08:31:14Z","body":"* create or save iOS build from [Introjucer](http://www.juce.com/learn/introjucer) \r\n* run `npm install react-native` from root of project (alongside the `.jucer` file)\r\n* create Podfile in `Builds/iOS` as per the guide\r\n* run `pod install`\r\n* open workspace in Xcode\r\n* adjust `GCC_PREPROCESSOR_DEFINITIONS` to include `$(inherited)` \r\n* build\r\n\r\nExample project here: https://github.com/adamski/juce-native-navigation/tree/react-native-cocoapods"}}