Xcode: on deploy to device, Packager re-packages even when no changes
See original GitHub issueDescription
Sometimes I use Xcode to deploy my RN app to a physical device using the Xcode toolbar, e.g.
As expected, during the ‘Bundle React Native code and images’ build phase…
…the RN Packager bundles the app. It’s a substantially lengthy process, in my case ~6-8 minutes.
If I don’t change any code and simply deploy the app again using Xcode, the entire packager build restarts.
Is there a way I can persist Packager builds across Xcode deploys?
Feels like the whole point of HMR/Live Reload is to avoid this – how can I bring it to device deploys? Given how clever HMR is, this just seems so unnecessary.
Reproduction
- Open an RN project’s
ios/app.xcodeproj
- Plug in physical iOS device
- Deploy RN app to device
- Don’t change any code
- Deploy again
Additional Information
- React Native version: 0.33
- Xcode version: 8.1
- Platform: iOS
- Operating System: MacOS El Capitan 10.11.6
Did an Issues search for ‘Xcode’ & ‘Xcode Packager’ – didn’t find anything pertinent, apologies if this is a dupe.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Xcode 11, deploying to device doesn't reflect code changes
Deploying the app via Xcode to my iPad running the latest beta of iPadOS will most of the time not reflect any code...
Read more >Deploying Xcode and CLI tools: what's new in Xcode 5
If you deploy Xcode and the command-line tools, a few things have changed ... The app still includes two device development-related packages ......
Read more >Wrap iOS apps with the Intune App Wrapping Tool
Learn how to wrap your iOS apps without changing the code of the app itself. Prepare the apps so you can apply mobile...
Read more >Deploying a Third-Party macOS App: Workspace ONE UEM ...
Xcode ; Slack; Microsoft Office for macOS; Microsoft Remote Desktop ... Any device where Workspace ONE UEM triggers an application install from Monday ......
Read more >Tampering and Reverse Engineering on iOS - OWASP MASTG
Apple will issue a free development provisioning profile even if you're not a paying developer. You can obtain the profile via Xcode and...
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
@frantic I appreciate the tip. If I didn’t need anything built I could also just tap the app on the device’s springboard.
What about the case where you’re developing a native plugin which requires constant rebuilding of native code but not of the JS bundle?
It’s possible to work around this (to a degree) by creating a new RN project containing only the component under development, but this involves a fair bit of overhead, including maintenance of an additional project.
To me it’d make sense to have some intelligent way around this built into the tooling, without the overhead. For example, would it be reasonable to at least do the JS build in parallel to the native build instead of in series? I don’t fully understand the bundler yet but from what I gather it shouldn’t matter - in debug / development - whether the app starts before the bundling is complete
yea this should change. i propose we change the
react-native-xcode.sh
code, to skip building if its the scheme isDebug
. currently it skips if the scheme isDebug
AND its running on a simulator. Debugging should be quick and not build the bundle, even on a device.