Andadurias / Instant-Notes

Micro journaling app to reduce the effort of taking notes, managing memories and connecting ideas
The Unlicense
2 stars 1 forks source link

Problem executing IOS #21

Closed BlancaCC closed 1 year ago

BlancaCC commented 1 year ago

Since I executed in my local machine the command sudo xcode-select -switch /Library/Developer/CommandLineTools (in order to have git functions) I have the following error

~/r/M/f/mobile_app_react_native (local-storage)> npx react-native run-ios
warn Package react-native-sqlite-storage contains invalid configuration: "dependency.platforms.ios.project" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.
info Found Xcode workspace "mobile_app_react_native_android.xcworkspace"
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH
error Could not get the simulator list from Xcode. Please open Xcode and try running project directly from there to resolve the remaining issues.
Error: Command failed: xcrun simctl list --json devices
xcrun: error: unable to find utility "simctl", not a developer tool or in PATH

    at checkExecSyncError (node:child_process:851:11)
    at Object.execFileSync (node:child_process:887:15)
    at runOnSimulator (/Users/blancacanocamarero/repositorios/Memories/frontend/mobile_app_react_native/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:152:54)
    at Object.runIOS [as func] (/Users/blancacanocamarero/repositorios/Memories/frontend/mobile_app_react_native/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:106:12)
    at Command.handleAction (/Users/blancacanocamarero/repositorios/Memories/frontend/mobile_app_react_native/node_modules/@react-native-community/cli/build/index.js:192:23)
    at Command.listener (/Users/blancacanocamarero/repositorios/Memories/frontend/mobile_app_react_native/node_modules/commander/index.js:315:8)
    at Command.emit (node:events:513:28)
    at Command.parseArgs (/Users/blancacanocamarero/repositorios/Memories/frontend/mobile_app_react_native/node_modules/commander/index.js:651:12)
    at Command.parse (/Users/blancacanocamarero/repositorios/Memories/frontend/mobile_app_react_native/node_modules/commander/index.js:474:21)
info Run CLI with --verbose flag for more details.
BlancaCC commented 1 year ago

After typing sudo xcode-select -s /Applications/Xcode.app/Contents/Developer on terminal the error is now (sources:

 ~/r/M/f/mobile_app_react_native (execution-problem)> npx react-native run-ios
warn Package react-native-sqlite-storage contains invalid configuration: "dependency.platforms.ios.project" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.
info Found Xcode workspace "mobile_app_react_native_android.xcworkspace"
error No simulator available with name "iPhone 13".
info Run CLI with --verbose flag for more details.
BlancaCC commented 1 year ago

Fixing selecting the device npx react-native run-ios --simulator="iPhone 13"

In order to see the simulator open Xcode > windows (options) > device an simulators ) or even better write xcrun simctl list devices

Source stack overflow comment