iOS Bundle Release
See original GitHub issueI am experiencing an issue with threads in production/release.
2018-01-31 16:27:03.209993+0000 TestApp[72678:38924584] starting Thread (null)
2018-01-31 16:27:03.217 [fatal][tid:main] No bundle URL present.
Make sure you're running a packager server or have included a .jsbundle file in your application bundle.
My Threads don’t live in the root of the project, they live in ./App/Workers/*.thread.js
. I have also followed the documentation for building .jsbundle
files and adding them to ./ios
.
In development, everything works as expected:
2018-01-31 17:14:34.192937+0000 TestApp[75866:39010763] starting Thread http://localhost:8081/./App/Workers/Test.Generate.thread.bundle?platform=ios&dev=true&minify=false
2018-01-31 17:14:34.193 [info][tid:com.facebook.react.ThreadManagerQueue][RCTCxxBridge.mm:187] Initializing <RCTCxxBridge: 0x6080001b42e0> (parent: <RCTBridge: 0x60c0002a57c0>, executor: (null))
2018-01-31 17:14:34.193265+0000 TestApp[75866:39010763] Initializing <RCTCxxBridge: 0x6080001b42e0> (parent: <RCTBridge: 0x60c0002a57c0>, executor: (null))
Am I experiencing this issue because my thread files don’t live in the root of the project?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
How to get offline bundling of iOS in React Native?
Then open up the project inside ios/ in Xcode and Select the target -> General Tab Under signing choose the signing team and...
Read more >iOS main.jsbundle will not create automatically or update ...
React native is not creating a main.jsbundle for ios automatically. One must manually be created, even though the scheme set as release.
Read more >CFBundleVersion | Apple Developer Documentation
CFBundleVersion. The version of the build that identifies an iteration of the bundle. iOS 2.0+ iPadOS 2.0+ macOS 10.0+ tvOS 9.0+ watchOS 2.0+ ......
Read more >Generating the static bundle in iOS - Packt Subscription
Before we create releases for iOS and Android, we need to generate the static JS bundle that our application will load. We will...
Read more >Publishing to Apple App Store - React Native
To configure your app to be built using the Release scheme, go to Product → Scheme → Edit Scheme. Select the Run tab...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, I’ve merged your update to the docs! Let me know if you run into any more issues
Hi @craigcoles, sorry you ran into this issue!
My understanding is that if your
thread.js
file lives in a different folder likeApp/Workers/MyWorker.thread.js
, then you will need to re-create that same file structure in theios
folder. The path that you pass to thenew Thread('some/path')
is actually the native code filepath, relative to theios
folder in the root of your project. So in this case I believe you would need to open your project in xcode, right click on your root folder and select the “New Group” option to add an “App” folder, then select the “App” folder, right click, select the “New Group” option and create a “Workers” folder, then finally right click on the “Workers” folder and select the “add files to <your project>” option to add your worker js file to the native project.For android you would create the matching folder structure in the
android/app/src/main/assets/threads
folder of your project.Let me know if that makes sense or if it still doesn’t work for you. Keeping thread files at the root level definitely keeps things simpler so that you don’t need to add too many extra folders in your native
ios
andandroid
directories. I’ll make some time to add a bit more explanation of this to the README as well