Cordova builds iOS but will not run

I have been using cordova& Android for a while, everything is normal,

The problem is that I want to add IOS and run the project, so I can check the preparations ,

The thing is, it builds well (log), but when running, I get:

Running command: /Users/toniweb/Proyectos/ cordova/funcook/platforms/ios/cordova/run --emulator
Building project: /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/funcook.xcodeproj
Configuration: Debug
Platform: emulator
Build settings from command line:
ARCHS = i386
CONFIGURATION_BUILD_DIR = /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/build/emulator
SDKROOT = iphonesimulator9.1
SHARED_PRECOMPS_DIR = /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/build/sharedpch
VALID_ARCHS = i386

Build settings from configuration file'/Users /toniweb/Proyectos/cordova/funcook/platforms/ios/cordova/build-debug.xcconfig':
CODE_SIGN_IDENTITY = iPhone Developer
ENABLE_BITCODE = NO

=== BUILD TARGET CordovaLib OF PROJECT CordovaLib WITH CONFIGURATION Debug ===

Check dependencies

=== BUILD TARGET funcook OF PROJECT funcook WITH CONFIGURATION Debug ===

Check dependencies

PhaseScriptExecution Copy\ www\ directory build/funcook.build/Debug-iphonesimulator/funcook.build/Script-304B58A110DAC018002A0835.sh
cd /Users/toniweb/Proyectos/cordova/funcook /platforms/ios
/bin/sh -c /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/build/funcook.build/Debug-iphonesimulator/funcook.build/Script-304B58A110DAC018002A0835.sh

ProcessInfoPlistFile build/emulator/funcook.app/Info.plist funcook/funcook-Info.plist
cd /Users/toniweb/Proyectos/cordova/funcook/platforms/ios
export PATH ="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/opt/local/bin:/opt/ local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/ usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
builtin-infoPlistUtility /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/funcook/funcook-Info. plist -genpkginfo /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/build/emulator/funcook.app/PkgInfo -expandbuildsettings -format binary -platform iphonesimulator -additionalcontentfile /Users/toniweb/Proyectos/cordova/funcook/platforms/ ios/build/funcook.build/Debug-iphonesimulator/funcook.build/MainViewController-PartialInfo.plist -o /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/build/emulator/funcook.app/Info.plist< br />
GenerateDSYMFile build/emulator/funcook.app.dSYM build/emulator/funcook.app/funcook
cd /Users/toniweb/Proyectos/cordova/funcook/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/opt/local/bin:/opt /local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin: /opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /usr/bin/dsymutil /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/build/emulator/funcook.app/funcook -o /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/build/emulator /funcook.app.dSYM

Touch build/emulator/funcook.app
cd /Users/toniweb/Proyectos/cordova/funcook/platforms/ios
export PATH="/ Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/opt/local/bin:/opt/local/sbin :/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/ bin"
/usr/bin/touch -c /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/build/emulator/funcook.app

** BUILD SUCCEEDED **

No target specified for emulator. Deploying to iPhone-6 simulator
An error w as encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Invalid device state
ENOENT, no such file or directory'/var/root/Library/Logs/CoreSimulator /759B7226-A331-436D-8189-310317E9BD87/system.log'
Error code 1 for command: ios-sim with args: launch,/Users/toniweb/Proyectos/cordova/funcook/platforms/ios/build/ emulator/funcook.app,--devicetypeid,com.apple.CoreSimulator.SimDeviceType.iPhone-6,--stderr,/Users/toniweb/Proyectos/cordova/funcook/platforms/ios/cordova/console.log,--stdout ,/Users/toniweb/Proyectos/cordova/funcook/platforms/ios/cordova/console.log,--exit
Error: /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/cordova/run: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
at ChildProcess .EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:753:16)
at Process.ChildProc ess._handle.onexit (child_process.js:820:5)

I am using the latest version of El Capitan, cordova and xcode,

What am I missing here?

PS: Build and run Android in the same project…

-Edit-

If I open from xcode, I get:

enter image description here

-Edit-

Now it runs the emulator from xcode, but still does not run ios –emulator from the terminal cordova

Try to use chmod and chown to change file permissions… It works in my situation

I have been using cordova& Android for a while, everything is normal,

problem I want to add IOS and run the project, so I can check the preparation,

The thing is, it builds well (log), but when it runs, I get:

p>

Running command: /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/cordova/run --emulator
Building project: /Users/toniweb/Proyectos/cordova/funcook/platforms/ios /funcook.xcodeproj
Configuration: Debug
Platform: emulator
Build settings from command line:
ARCHS = i386
CONFIGURATION_BUILD_DIR = /Users/toniweb/Proyectos/cordova/ funcook/platforms/ios/build/emulator
SDKROOT = iphonesimulator9.1
SHARED_PRECOMPS_DIR = /Users/toniweb /Proyectos/cordova/funcook/platforms/ios/build/sharedpch
VALID_ARCHS = i386

Build settings from configuration file'/Users/toniweb/Proyectos/cordova/funcook/platforms/ios/ cordova/build-debug.xcconfig':
CODE_SIGN_IDENTITY = iPhone Developer
ENABLE_BITCODE = NO

=== BUILD TARGET CordovaLib OF PROJECT CordovaLib WITH CONFIGURATION Debug ===

Check dependencies

=== BUILD TARGET funcook OF PROJECT funcook WITH CONFIGURATION Debug ===

Check dependencies

PhaseScriptExecution Copy \ www\ directory build/funcook.build/Debug-iphonesimulator/funcook.build/Script-304B58A110DAC018002A0835.sh
cd /Users/toniweb/Proyectos/cordova/funcook/platforms/ios
/bin/sh -c /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/build/funcook.build/Debug-iphonesimulator/funcook.build/Script-304B58A110DAC018002A0835.sh

ProcessInfoPlistFile build/emulator/funcook .app/Info.plist funcook/funcook-Info. plist
cd /Users/toniweb/Proyectos/cordova/funcook/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin :/Applications/Xcode.app/Contents/Developer/usr/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/opt/local/bin :/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
builtin-infoPlistUtility /Users/toniweb/Proyectos/cordova/funcook/platforms /ios/funcook/funcook-Info.plist -genpkginfo /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/build/emulator/funcook.app/PkgInfo -expandbuildsettings -format binary -platform iphonesimulator -additionalcontentfile /Users/toniweb /Proyectos/cordova/funcook/platforms/ios/build/funcook.build/Debug-iphonesimulator/funcook.build/MainViewController-PartialInfo.plist -o /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/build/emulator /funcook.app/Info.plist

GenerateDSYMFile build/emulator/funcook.app.dSYM build/emulat or/funcook.app/funcook
cd /Users/toniweb/Proyectos/cordova/funcook/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform /Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin: /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
/Applications/Xcode.app/Contents/ Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/build/emulator/funcook.app/funcook -o /Users/toniweb/Proyectos/cordova/funcook/ platforms/ios/build/emulator/funcook.app.dSYM

Touch build/emulator/funcook.app
cd /Users/toniweb/Proyectos/cordova/funcook/platforms/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/opt/local/bin :/opt/local/sbin:/opt/l ocal/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
/usr/bin/touch -c /Users/toniweb/Proyectos/cordova/funcook/platforms/ios/build/emulator/funcook.app

** BUILD SUCCEEDED **

No target specified for emulator. Deploying to iPhone-6 simulator
An error was encountered processing the command (domain=com.apple.CoreSimulator.SimError, code=159):
Invalid device state
ENOENT, no such file or directory'/var/root/Library/Logs/CoreSimulator/759B7226-A331-436D-8189-310317E9BD87/system.log'
Error code 1 for command: ios-sim with args: launch,/Users/toniweb/Proyectos/cordova/funcook/platforms/ios/build/emulator/funcook.app,--devicetypeid,com.apple.CoreSimulator.SimDeviceType.iPhone-6,--stderr,/Users /toniweb/Proyectos/cordova/funcook/platforms/ios/cordova/console.log,--stdout,/Users/toniweb/Proyectos/cordova/funcook/platforms/ios/cordova/console.log,--exit
Error: /Users/toniweb/Proyectos/cordova/ funcook/platforms/ios/cordova/run: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js: 139:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:753:16)
at Process.ChildProcess._handle.onexit (child_process.js:820:5)

I am using the latest version of El Capitan, cordova and xcode,

What am I missing here?

PS: Build and run Android in the same project…

-Edit-

If I open from xcode, I get:

enter image description here

-Edit-

Now it runs the emulator from xcode, but still does not run ios from the terminal cordova –emulator

Try to use chmod and chown to change the file permissions… It works My situation

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3767 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.