ignite: Xcode Simulator not found when running ios from a new Ignite project


What’s going on?

A default macOS Simulator doesn’t open when running ios project if the project is created with Ignite CLI.

If i generate the same base project with react-native then it does open the default iPhone X simulator.


Steps to reproduce

I created a project with react-native init awesome and then ran it with react-native run-ios and the Simulator opened and showed the app.

I created a project with ignite n awesomeIgnite and then ran it with react-native run-ios and no Simulator opens. An error instead:


Could not find iPhone X simulator

Error: Could not find iPhone X simulator
    at resolve (/Users/mikec/Documents/code/mobile/awesomeIgnite/node_modules/react-native/local-cli/runIOS/runIOS.js:149:13)
    at new Promise (<anonymous>)
    at runOnSimulator (/Users/mikec/Documents/code/mobile/awesomeIgnite/node_modules/react-native/local-cli/runIOS/runIOS.js:134:10)
    at Object.runIOS [as func] (/Users/mikec/Documents/code/mobile/awesomeIgnite/node_modules/react-native/local-cli/runIOS/runIOS.js:106:12)
    at Promise.resolve.then (/Users/mikec/Documents/code/mobile/awesomeIgnite/node_modules/react-native/local-cli/cliEntry.js:117:22)

ignite doctor results:

  platform           darwin
  arch               x64
  cpu                8 cores                                            Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
  directory          /Users/mikec/Documents/code/mobile/awesomeIgnite
vvv -----[ DEBUG ]----- vvv
{ Error: not found: yarn
    at getNotFoundError (/usr/local/lib/node_modules/ignite-cli/node_modules/gluegun/node_modules/which/which.js:13:12)
    at Function.whichSync [as sync] (/usr/local/lib/node_modules/ignite-cli/node_modules/gluegun/node_modules/which/which.js:131:9)
    at which (/usr/local/lib/node_modules/ignite-cli/node_modules/gluegun/src/core-extensions/system-extension.js:113:22)
    at Command.module.exports [as run] (/usr/local/lib/node_modules/ignite-cli/src/commands/doctor.js:45:20)
    at processTicksAndRejections (internal/process/task_queues.js:86:5) code: 'ENOENT' }
^^^ -----[ DEBUG ]----- ^^^

I don’t have Yarn installed 😃

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 24 (18 by maintainers)

Most upvoted comments

If you run rm -rf node_modules then npm install and npm audit fix it will open the iPhone X emulator but will give another error:

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 Cestouapp.xcodeproj

** BUILD FAILED **

With bowser it worked fine but with andross it still having the issue, should I open a new issue?

On react-native run-ios:

info       facebook::jsc::JSCRuntime::createObject(std::__1::shared_ptr<facebook::jsi::HostObject>)::$_0::operator()() const in libReact.a(JSCRuntime.o)
      facebook::jsc::JSCRuntime::createFunctionFromHostFunction(facebook::jsi::PropNameID const&, unsigned int, std::__1::function<facebook::jsi::Value (facebook::jsi::Runtime&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long)>)::$_1::operator()() const in libReact.a(JSCRuntime.o)

info ld: symbol(s) not found for architecture x86_64

info clang: error:

info linker command failed with exit code 1 (use -v to see invocation)

info

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 Cestouapp.xcodeproj

** BUILD FAILED **


The following build commands failed:
        Ld /Users/cassiano/CISS/Cestouapp/ios/build/Cestouapp/Build/Products/Debug-iphonesimulator/Cestouapp.app/Cestouapp normal x86_64
(1 failure)

debug 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 Cestouapp.xcodeproj

** BUILD FAILED **


The following build commands failed:
        Ld /Users/cassiano/CISS/Cestouapp/ios/build/Cestouapp/Build/Products/Debug-iphonesimulator/Cestouapp.app/Cestouapp normal x86_64
(1 failure)

    at ChildProcess.buildProcess.on.code (/Users/cassiano/CISS/Cestouapp/node_modules/@react-native-community/cli/build/commands/runIOS/runIOS.js:231:16)
    at ChildProcess.emit (events.js:193:13)
    at maybeClose (internal/child_process.js:1001:16)
    at Socket.stream.socket.on (internal/child_process.js:405:11)
    at Socket.emit (events.js:193:13)
    at Pipe._handle.close (net.js:614:12)

If I run on Xcode it gets 52 errors on the issues panel:

:-1: Undefined symbol: _JSClassCreate
:-1: Undefined symbol: _JSContextGetGlobalObject
:-1: Undefined symbol: _JSEvaluateScript
:-1: Undefined symbol: _JSGlobalContextCreateInGroup
:-1: Undefined symbol: _JSGlobalContextRelease
:-1: Undefined symbol: _JSGlobalContextRetain
:-1: Undefined symbol: _JSObjectCallAsConstructor
:-1: Undefined symbol: _JSObjectCallAsFunction
:-1: Undefined symbol: _JSObjectCopyPropertyNames
:-1: Undefined symbol: _JSObjectGetPrivate
:-1: Undefined symbol: _JSObjectGetProperty
:-1: Undefined symbol: _JSObjectGetPropertyAtIndex
:-1: Undefined symbol: _JSObjectGetPrototype
:-1: Undefined symbol: _JSObjectHasProperty
:-1: Undefined symbol: _JSObjectIsFunction
:-1: Undefined symbol: _JSObjectMake
:-1: Undefined symbol: _JSObjectMakeArray
:-1: Undefined symbol: _JSObjectSetPrivate
:-1: Undefined symbol: _JSObjectSetProperty
:-1: Undefined symbol: _JSObjectSetPropertyAtIndex
:-1: Undefined symbol: _JSObjectSetPrototype
:-1: Undefined symbol: _JSPropertyNameAccumulatorAddName
:-1: Undefined symbol: _JSPropertyNameArrayGetCount
:-1: Undefined symbol: _JSPropertyNameArrayGetNameAtIndex
:-1: Undefined symbol: _JSPropertyNameArrayRelease
:-1: Undefined symbol: _JSStringCreateWithUTF8CString
:-1: Undefined symbol: _JSStringGetMaximumUTF8CStringSize
:-1: Undefined symbol: _JSStringGetUTF8CString
:-1: Undefined symbol: _JSStringIsEqual
:-1: Undefined symbol: _JSStringRelease
:-1: Undefined symbol: _JSStringRetain
:-1: Undefined symbol: _JSValueIsArray
:-1: Undefined symbol: _JSValueIsBoolean
:-1: Undefined symbol: _JSValueIsInstanceOfConstructor
:-1: Undefined symbol: _JSValueIsNull
:-1: Undefined symbol: _JSValueIsNumber
:-1: Undefined symbol: _JSValueIsObject
:-1: Undefined symbol: _JSValueIsObjectOfClass
:-1: Undefined symbol: _JSValueIsString
:-1: Undefined symbol: _JSValueIsUndefined
:-1: Undefined symbol: _JSValueMakeBoolean
:-1: Undefined symbol: _JSValueMakeNull
:-1: Undefined symbol: _JSValueMakeNumber
:-1: Undefined symbol: _JSValueMakeString
:-1: Undefined symbol: _JSValueMakeUndefined
:-1: Undefined symbol: _JSValueProtect
:-1: Undefined symbol: _JSValueToBoolean
:-1: Undefined symbol: _JSValueToNumber
:-1: Undefined symbol: _JSValueToObject
:-1: Undefined symbol: _JSValueToStringCopy
:-1: Undefined symbol: _JSValueUnprotect
:-1: Undefined symbol: _kJSClassDefinitionEmpty

I mentioned in comment 2 the simulator names work fine from the non Ignite project folder.

I also get the same build error as @cassianomon above.

@budda FYI the Detox issue should be fixed on the latest Ignite CLI, 4.0.0-beta.3. Since that’s tagged latest for dist-tags, it’s easy to upgrade to:

yarn global add ignite-cli

I believe all outstanding major issues are fixed for Bowser. Andross still has an issue with its plugins and I’ll work on that when I have time.

Assume you mean ignite-cli@3.0.0-beta.3 which i got via npm. Is yarn still faster these days?

@jamonholmgren just upgrading the RN version doesn’t resolve the build fail that @cassianomon mentions earlier in comment https://github.com/infinitered/ignite/issues/1401#issuecomment-480997544

With bowser it worked fine but with andross it still having the issue, should I open a new issue?

New issue opened on the boilerplate project - https://github.com/infinitered/ignite-andross/issues/263

The latest version of Bowser (3.2.0) seems to fix this issue. Please re-try:

yarn global add ignite-cli
ignite new MyApp -b bowser --no-detox

Note that the feature generating Detox tests is currently broken; that’s next on my list to work on.

The problem with ignite doctor when yarn is not installed is fixed in #1404, which has been deployed as 2.2.4. Upgrade with npm upgrade -g ignite-cli.

I’m working on this (as well as the other errors reported). Thanks everyone for helping out!

Okay, can you either check the output for the actual error (it’s usually 20-50 lines up) or open the project in XCode and try building it to see what error it returns?