thecodingmachine / react-native-boilerplate

A React Native template for building solid applications 🐙, using JavaScript 💛 or Typescript 💙 (you choose).
https://thecodingmachine.github.io/react-native-boilerplate/
MIT License
4.84k stars 871 forks source link

[BUG]: App not coming up with `npm run ios` #435

Closed anandchakru closed 3 weeks ago

anandchakru commented 3 months ago

react-native environment setup

Description

$ npm run ios

info Found booted iPhone SE (3rd generation)
info Building (using "xcodebuild -workspace rn2.xcworkspace -configuration Debug -scheme rn2 -destination id=4FE8D137-AB5B-467F-A859-558306AAA828")

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 

error Failed to build ios project. "xcodebuild" exited with error code '70'. To debug build logs further, consider building your app with Xcode.app, by opening 'rn2.xcworkspace'.
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace rn2.xcworkspace -configuration Debug -scheme rn2 -destination id=4FE8D137-AB5B-467F-A859-558306AAA828

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

2024-07-21 22:12:24.476 xcodebuild[89104:7311041] Writing error result bundle to /var/folders/h3/8fbvbpvj6lj9pd0hwmyrypfw0000gn/T/ResultBundle_2024-21-07_22-12-0024.xcresult
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
                { id:4FE8D137-AB5B-467F-A859-558306AAA828 }

        Ineligible destinations for the "rn2" scheme:
                { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 17.5 is not installed. To use with Xcode, first download and install the platform }

Version

4.2.0

Do you use TypeScript?

On which OS this issue appear on?

Desktop OS

Sonoma 14.1

siratl commented 3 months ago

I have the exact same issue, I also tried installing cocoapods alongside the installation to see if i get a different output to no avail.

npx react-native run-ios
info A dev server is already running for this project on port 8081.
info Found Xcode workspace "MyApp.xcworkspace"
info Found booted iPhone 15 Pro
info Building (using "xcodebuild -workspace MyApp.xcworkspace -configuration Debug -scheme MyApp -destination id=BC969C0F-6455-42FC-9B32-4226FF2EA57F")

info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 

error Failed to build ios project. "xcodebuild" exited with error code '65'. To debug build logs further, consider building your app with Xcode.app, by opening 'MyApp.xcworkspace'.
Command line invocation:
    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace MyApp.xcworkspace -configuration Debug -scheme MyApp -destination id=BC969C0F-6455-42FC-9B32-4226FF2EA57F

User defaults from command line:
    IDEPackageSupportUseBuiltinSCM = YES

Prepare packages

ComputeTargetDependencyGraph
note: Building targets in dependency order
note: Target dependency graph (1 target)
    Target 'MyApp' in project 'MyApp' (no dependencies)

GatherProvisioningInputs

CreateBuildDescription

ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.5.sdk -x c -c /dev/null

ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool --version --output-format xml1

ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.5.sdk -x c -c /dev/null

ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.5.sdk -x objective-c++ -c /dev/null

ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.5.sdk -x objective-c -c /dev/null

ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/usr/bin/actool --print-asset-tag-combinations --output-format xml1 /Users/elisha_verse/Documents/pp/MyApp/ios/MyApp/Images.xcassets

ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/usr/bin/actool --version --output-format xml1

ExecuteExternalTool /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld -version_details

Build description signature: fd238ab0a6173297e7a0d68c579c4e78
Build description path: /Users/elisha_verse/Library/Developer/Xcode/DerivedData/MyApp-hitiddzrfrkgsbbzqwustxrygctz/Build/Intermediates.noindex/XCBuildData/fd238ab0a6173297e7a0d68c579c4e78.xcbuilddata
/Users/elisha_verse/Documents/pp/MyApp/ios/MyApp.xcodeproj:1:1: error: Unable to open base configuration reference file '/Users/elisha_verse/Documents/pp/MyApp/ios/Pods/Target Support Files/Pods-MyApp/Pods-MyApp.debug.xcconfig'. (in target 'MyApp' from project 'MyApp')
warning: Unable to read contents of XCFileList '/Target Support Files/Pods-MyApp/Pods-MyApp-resources-Debug-output-files.xcfilelist' (in target 'MyApp' from project 'MyApp')
warning: Unable to read contents of XCFileList '/Target Support Files/Pods-MyApp/Pods-MyApp-frameworks-Debug-output-files.xcfilelist' (in target 'MyApp' from project 'MyApp')
warning: Run script build phase 'Start Packager' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'MyApp' from project 'MyApp')
warning: Run script build phase 'Bundle React Native code and images' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'MyApp' from project 'MyApp')
error: Unable to load contents of file list: '/Target Support Files/Pods-MyApp/Pods-MyApp-resources-Debug-input-files.xcfilelist' (in target 'MyApp' from project 'MyApp')
error: Unable to load contents of file list: '/Target Support Files/Pods-MyApp/Pods-MyApp-resources-Debug-output-files.xcfilelist' (in target 'MyApp' from project 'MyApp')
error: Unable to load contents of file list: '/Target Support Files/Pods-MyApp/Pods-MyApp-frameworks-Debug-input-files.xcfilelist' (in target 'MyApp' from project 'MyApp')
error: Unable to load contents of file list: '/Target Support Files/Pods-MyApp/Pods-MyApp-frameworks-Debug-output-files.xcfilelist' (in target 'MyApp' from project 'MyApp')
warning: Run script build phase '[CP] Copy Pods Resources' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'MyApp' from project 'MyApp')
warning: Run script build phase '[CP] Embed Pods Frameworks' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'MyApp' from project 'MyApp')

--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:iOS Simulator, id:BC969C0F-6455-42FC-9B32-4226FF2EA57F, OS:17.5, name:iPhone 15 Pro }
{ platform:iOS Simulator, id:BC969C0F-6455-42FC-9B32-4226FF2EA57F, OS:17.5, name:iPhone 15 Pro }
** BUILD FAILED **
PaisWillie commented 2 months ago

+1

esmailbenmoussa commented 1 month ago

same, any workarounds so far?

JeremyDolle commented 1 month ago

Sorry for the delay, Did you try to verify the path to the node library? In the project folder type

which node

And copy paste it into ios/xcode.env.local in the NODE_BINARY already present

Let me know

coneman commented 1 month ago

$ npm run ios


info Found booted iPhone SE (3rd generation)
info Building (using "xcodebuild -workspace rn2.xcworkspace -configuration Debug -scheme rn2 -destination id=4FE8D137-AB5B-467F-A859-558306AAA828")

Did you intentionally run the project using your device, which is the "iPhone SE"? If that was the case, you need to make sure the development team and bundle identifier is correct by setting them up in Xcode.

If you want to run the project on a simulator, you need to specify the simulator by adding parameter to the command:

npm run ios -- --simulator="iPhone 15 Pro"

You can find the simulator name list using this command:

xcodebuild -scheme rn2 -showdestinations

Change the scheme name to any scheme you have.

JeremyDolle commented 3 weeks ago

Close due to inactivity