skip to Main Content

after updating MacOS to Big Sur and since Legacy build is deprecated
react-native run-ios does not work anymore, I’ve tried so many solutions but no progress I’ve been suffering with this for around 3 days.

side note that build on xcode succeeded

versions:

react-native: 0.59.10

xcode: 12

and I’m using iPhone 11 simulator and I also tried a real iPhone 11 device

result of npx react-native run-ios
on simulator:

error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening myapp.xcworkspace

** BUILD FAILED **


The following build commands failed:
    Ld /myapp/ios/build/Build/Products/Debug-iphonesimulator/myapp.app/PlugIns/myapp.xctest/myapp normal
(1 failure)

another one on the simulator:

info ** BUILD SUCCEEDED **


info Installing DerivedData/Build/Products/Debug-iphonesimulator/myapp.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
error Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier DerivedData/Build/Products/Debug-iphonesimulator/myapp.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

on device:

info ** BUILD SUCCEEDED **

info installing and launching your app on Menna’s iPhone...
info ** INSTALLATION SUCCEEDED **

but the application doesn’t appear on the device and I don’t know how is that even possible?!

any help would be appreciated

2

Answers


  1. Chosen as BEST ANSWER

    SOLVED

    1. in xcode, go to Project Settings > change build system to new build system
    2. click on Advanced, then choose Custom (Relative to workspace) and specify locations as following: Products: build/Build/Products Intermediates: build/Build/Intermediates.noindex
    3. in vs code, open node_modules/@react-native-community/cli/build/commands/runIOS/runIOS.js and change DerivedData/Build/Products/${configuration}-${device}/${appName}.app to build/Build/Products/${configuration}-${device}/${appName}.app;
    4. delete ios/build and DerivedData content
    5. run react-native run-ios again

  2. try:

    sudo npm install -g ios-deploy –unsafe-perm

    and next:

    yarn ios –device "YOUR_DEVICE_NAME"

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search