title: React Native - iOS and App Center Deployment build failed from main.jsbundle
body: <p>Firstly thank you for taking the time to help me find a result. Just a bit of background on what I've done so you know what angles I've taken.</p>
  <p>React - <code>&quot;react-native&quot;: &quot;0.62.2&quot;</code></p>
  <ol>
  <li>I'm using App center to deploy my iOS app (this is where the issue lies),</li>
  <li>I have three schemes for iOS Dev, Beta, Prod (each building fine in xCode),</li>
  <li>I'm using Code push as well,</li>
  <li>App has been on Test flight working fine for a week</li>
  </ol>
  <p>I encountered a build issue &quot;no URL bundle present&quot; when running locally both in debug and in release. However I found a solution for that here: <a href="https://www.youtube.com/watch?v=eCs2GsWNkoo" rel="nofollow noreferrer">https://www.youtube.com/watch?v=eCs2GsWNkoo</a> which works great. I added the <code>main.jsbundle</code> into <code>build phases</code> &gt;&gt;  <code>Copy bundle resources</code> as well which fixed the issue occurring during release. Archiving tests now all works.</p>
  <p>However <strong>My issue is</strong> when I build the app on App Center with the <code>main.jsbundle</code> in <code>Copy Bundle resources</code> the build fails and I believe this is because App Center creates that file itself? The error I face is:</p>
  <pre><code>The following build commands failed:
      CpResource /Users/runner/work/1/s/ios/main.jsbundle /Users/runner/Library/Developer/Xcode/DerivedData/aLifeLived-hjrawomvzxvvvdeuplegfjyupvhr/Build/Intermediates.noindex/ArchiveIntermediates/aLifeLived/InstallationBuildProductsLocation/Applications/A\ Life\ Lived.app/main.jsbundle
  (1 failure)
  </code></pre>
  <p>Knowing this I then went back into xCode and <strong>removed</strong> <code>main.jsbundle</code> from <code>Copy bundle resources</code>, re ran the build in App Center and it builds successfully...However when it appears on test flight it crashes on startup.</p>
  <p>I believe the cause of the crash on Test Flight is due to no <code>main.jsbundle</code> or the one that is produced through App Center if they produce one - The reason I say this is 1. I can't run the app in release locally 2. I did a manual deploy to test flight (archived in xCode, download ipa file, uploaded to App Center, deployed).</p>
  <p>I'm stuck on what to do, can someone please help?</p>
  <p>Thanks!</p>
  <p>Update:</p>
  <p>I also attempted to build with <code>legacy build system</code> however this then resulted in the below error with App Center:</p>
  <pre><code>The following build commands failed:
      Ld /Users/runner/Library/Developer/Xcode/DerivedData/aLifeLived-hjrawomvzxvvvdeuplegfjyupvhr/Build/Intermediates.noindex/ArchiveIntermediates/aLifeLived/IntermediateBuildFilesPath/aLifeLived.build/Release-iphoneos/aLifeLived.build/Objects-normal/armv7/A\ Life\ Lived normal armv7
      Ld /Users/runner/Library/Developer/Xcode/DerivedData/aLifeLived-hjrawomvzxvvvdeuplegfjyupvhr/Build/Intermediates.noindex/ArchiveIntermediates/aLifeLived/IntermediateBuildFilesPath/aLifeLived.build/Release-iphoneos/aLifeLived.build/Objects-normal/arm64/A\ Life\ Lived normal arm64
  (2 failures)
  </code></pre>