Unable to run "ionic emulate ios" command

Hi,

I have installed the ionic framework following the get started guide. When I run the "ionic emualte ios " command I get the following error:

** BUILD FAILED **


The following build commands failed:
	CompileC build/StarterApp.build/Debug-iphonesimulator/StarterApp.build/Objects-normal/i386/CDVStatusBar.o StarterApp/Plugins/org.apache.cordova.statusbar/CDVStatusBar.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
	Ld build/emulator/StarterApp.app/StarterApp normal i386
	GenerateDSYMFile build/emulator/StarterApp.app.dSYM build/emulator/StarterApp.app/StarterApp
(3 failures)

    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/cordova/src/emulate.js:67:22)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:735:16)
    at Socket.<anonymous> (child_process.js:948:11)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Pipe.close (net.js:466:12)
Unable to emulate app on platform ios. Please see console for more info.

What does it mean and how can I fix it ?

Thanks in advance

Do you have the ios-sim command line utility installed?

@wecleanyourdorm You can also take a look at this issue: Getting Started Guide - ionic run ios not working (and please let me know if you have solved the problem! :wink: )

Have exactly the same problem, and yes, i do have ios-sim installed…

$ ios-sim --version
1.8.2

have installed ios-deploy, and then run

MyApp$ ./platforms/ios/cordova/run --emulator

-------------------- OUTPUT ERROR -------------------------------
CompileC build/StarterApp.build/Debug-iphonesimulator/StarterApp.build/Objects-normal/i386/CDVStatusBar.o StarterApp/Plugins/org.apache.cordova.statusbar/CDVStatusBar.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/tj/t/MyApp/platforms/ios
setenv LANG en_US.US-ASCII
setenv PATH “/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/tj/.rvm/gems/ruby-2.0.0-p353@test/bin:/Users/tj/.rvm/gems/ruby-2.0.0-p353@global/bin:/Users/tj/.rvm/rubies/ruby-2.0.0-p353/bin:/Users/tj/.rvm/bin:/opt/local/bin:/opt/local/sbin:/usr/local/heroku/bin:/usr/local/bin:/usr/local/sbin:/usr/local/Cellar/android-sdk/sdk/tools:/usr/local/share/npm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/local/git/bin”
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -std=c99 -fobjc-arc -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wduplicate-method-match -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wenum-conversion -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk -fexceptions -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -g -fvisibility=hidden -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch -mios-simulator-version-min=5.0 -iquote /Users/tj/t/MyApp/platforms/ios/build/StarterApp.build/Debug-iphonesimulator/StarterApp.build/StarterApp-generated-files.hmap -I/Users/tj/t/MyApp/platforms/ios/build/StarterApp.build/Debug-iphonesimulator/StarterApp.build/StarterApp-own-target-headers.hmap -I/Users/tj/t/MyApp/platforms/ios/build/StarterApp.build/Debug-iphonesimulator/StarterApp.build/StarterApp-all-target-headers.hmap -iquote /Users/tj/t/MyApp/platforms/ios/build/StarterApp.build/Debug-iphonesimulator/StarterApp.build/StarterApp-project-headers.hmap -I/Users/tj/t/MyApp/platforms/ios/build/emulator/include -I/Users/tj/t/MyApp/platforms/ios/build/emulator/usr/local/lib/include -I/Users/tj/t/MyApp/platforms/ios/build/UninstalledProducts/include -I/Users/tj/t/MyApp/platforms/ios/build/emulator -I/Users/tj/t/MyApp/platforms/ios/build/StarterApp.build/Debug-iphonesimulator/StarterApp.build/DerivedSources/i386 -I/Users/tj/t/MyApp/platforms/ios/build/StarterApp.build/Debug-iphonesimulator/StarterApp.build/DerivedSources -F/Users/tj/t/MyApp/platforms/ios/build/emulator -include /var/folders/ht/flpb3ttd7g9dfr5kh5400m1w0000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders/StarterApp-Prefix-hesfxrjshlbainbjfrhhxwkbgzoh/StarterApp-Prefix.pch -MMD -MT dependencies -MF /Users/tj/t/MyApp/platforms/ios/build/StarterApp.build/Debug-iphonesimulator/StarterApp.build/Objects-normal/i386/CDVStatusBar.d --serialize-diagnostics /Users/tj/t/MyApp/platforms/ios/build/StarterApp.build/Debug-iphonesimulator/StarterApp.build/Objects-normal/i386/CDVStatusBar.dia -c /Users/tj/t/MyApp/platforms/ios/StarterApp/Plugins/org.apache.cordova.statusbar/CDVStatusBar.m -o /Users/tj/t/MyApp/platforms/ios/build/StarterApp.build/Debug-iphonesimulator/StarterApp.build/Objects-normal/i386/CDVStatusBar.o
/Users/tj/t/MyApp/platforms/ios/StarterApp/Plugins/org.apache.cordova.statusbar/CDVStatusBar.m:239:32: error: use of undeclared identifier ‘UIStatusBarStyleLightContent’
[self setStyleForStatusBar:UIStatusBarStyleLightContent];
^
1 error generated.

Have just manage to run ios simulator. Some hack solution but it worked :smile:

edit myApp/platforms/ios/StarterApp/Plugins/org.apache.cordova.statusbar/CDVStatusBar.h and add the following:

#ifndef UIStatusBarStyleLightContent
#define UIStatusBarStyleLightContent 1
#endif

Great, work for me too. Thanks.