{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/240","labels_url":"https://api.github.com/repos/facebook/react-native/issues/240/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/240/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/240/events","html_url":"https://github.com/facebook/react-native/issues/240","id":64617937,"number":240,"title":"Documentation missing instructions for running on device via static bundle","user":{"login":"brentvatne","id":90494,"avatar_url":"https://avatars.githubusercontent.com/u/90494?v=3","gravatar_id":"","url":"https://api.github.com/users/brentvatne","html_url":"https://github.com/brentvatne","followers_url":"https://api.github.com/users/brentvatne/followers","following_url":"https://api.github.com/users/brentvatne/following{/other_user}","gists_url":"https://api.github.com/users/brentvatne/gists{/gist_id}","starred_url":"https://api.github.com/users/brentvatne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brentvatne/subscriptions","organizations_url":"https://api.github.com/users/brentvatne/orgs","repos_url":"https://api.github.com/users/brentvatne/repos","events_url":"https://api.github.com/users/brentvatne/events{/privacy}","received_events_url":"https://api.github.com/users/brentvatne/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"frantic","id":192222,"avatar_url":"https://avatars.githubusercontent.com/u/192222?v=3","gravatar_id":"","url":"https://api.github.com/users/frantic","html_url":"https://github.com/frantic","followers_url":"https://api.github.com/users/frantic/followers","following_url":"https://api.github.com/users/frantic/following{/other_user}","gists_url":"https://api.github.com/users/frantic/gists{/gist_id}","starred_url":"https://api.github.com/users/frantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frantic/subscriptions","organizations_url":"https://api.github.com/users/frantic/orgs","repos_url":"https://api.github.com/users/frantic/repos","events_url":"https://api.github.com/users/frantic/events{/privacy}","received_events_url":"https://api.github.com/users/frantic/received_events","type":"User","site_admin":false},"milestone":null,"comments":18,"created_at":"2015-03-26T19:48:30Z","updated_at":"2015-12-09T20:54:51Z","closed_at":"2015-04-02T17:56:00Z","body":"If anyone wants to improve on these instructions and add them to the docs, feel free, I can do it later if nobody else jumps on it - I just wanted to document it somewhere for now.\r\n\r\n- Open `iOS/AppDelegate.m`\r\n- Comment out `jsCodeLocation = [NSURL URLWithString:@\"http://localhost:8081/index.ios.bundle\"];`\r\n- Uncomment `jsCodeLocation = [[NSBundle mainBundle] URLForResource:@\"main\" withExtension:@\"jsbundle\"];`\r\n- Start up the packager with `npm start` and then run `curl http://localhost:8081/index.ios.bundle -o main.jsbundle` - if this fails (as it did on my machine) add the `--ipv4` flag to the end of it.\r\n- In XCode, right click on your project directory and click `Add Files to \"Project Name Here\"` - choose the `main.jsbundle` file that you generated.\r\n\r\nYou can now run the app on a device (either via usb or TestFlight) without needing to have a server running."},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/163389059","html_url":"https://github.com/facebook/react-native/issues/240#issuecomment-163389059","issue_url":"https://api.github.com/repos/facebook/react-native/issues/240","id":163389059,"user":{"login":"BenjaminConant","id":7742063,"avatar_url":"https://avatars.githubusercontent.com/u/7742063?v=3","gravatar_id":"","url":"https://api.github.com/users/BenjaminConant","html_url":"https://github.com/BenjaminConant","followers_url":"https://api.github.com/users/BenjaminConant/followers","following_url":"https://api.github.com/users/BenjaminConant/following{/other_user}","gists_url":"https://api.github.com/users/BenjaminConant/gists{/gist_id}","starred_url":"https://api.github.com/users/BenjaminConant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenjaminConant/subscriptions","organizations_url":"https://api.github.com/users/BenjaminConant/orgs","repos_url":"https://api.github.com/users/BenjaminConant/repos","events_url":"https://api.github.com/users/BenjaminConant/events{/privacy}","received_events_url":"https://api.github.com/users/BenjaminConant/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T20:54:51Z","updated_at":"2015-12-09T20:54:51Z","body":"@brentvatne thanks for the issue ... followed the instructions and seems that the curl requests needs to be `curl \"http://localhost:8081/index.ios.bundle?platform=ios\" -o main.jsbundle` now as a there needs to be a platform specified .... These instructions are almost working for me but when I try to build the app I am getting an error from the dev console \r\n\r\n```\r\nUncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'file:///Users/benconant/Library/Developer/CoreSimulator/Devices/3054F999-82…2766-011B-4294-AB40-4043145DD443/Eastern%20Car%20Service.app/main.jsbundle' failed to load.messageHandlers.executeApplicationScript @ debuggerWorker.js:18onmessage @ debuggerWorker.js:42\r\n``` \r\n\r\nhave you seen this before ... can't figure out what might be causing it"}}