I launched "launchIphoneSimulator" and I had this error:
What went wrong:
Execution failed for task ':launchIPhoneSimulator'.
org.apache.commons.exec.ExecuteException: Command '/var/folders/9c/9rh9d4cd53bg71673y0q2zxh0000gn/T/ios-sim4818382531238666049 showdevicetypes' failed with output: 2017-01-05 14:55:59.035 ios-sim4818382531238666049[7983:422626] +[SimDeviceSet defaultSet]: unrecognized selector sent to class 0x108f015b8
2017-01-05 14:55:59.036 ios-sim4818382531238666049[7983:422626] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[SimDeviceSet defaultSet]: unrecognized selector sent to class 0x108f015b8'
* First throw call stack:
(
0 CoreFoundation 0x00007fff8d2b3452 exceptionPreprocess + 178
1 libobjc.A.dylib 0x00007fff958bef7e objc_exception_throw + 48
2 CoreFoundation 0x00007fff8d31d00d +[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00007fff8d2234d1 ___forwarding_ + 1009
4 CoreFoundation 0x00007fff8d223058 _CF_forwarding_prep_0 + 120
5 ios-sim4818382531238666049 0x0000000105e5ec21 -[iPhoneSimulator showDeviceTypes] + 75
6 ios-sim4818382531238666049 0x0000000105e60dd1 -[iPhoneSimulator runWithArgc:argv:] + 3111
7 ios-sim4818382531238666049 0x0000000105e60fb9 main + 101
8 ios-sim4818382531238666049 0x0000000105e5e150 start + 52
)
libc++abi.dylib: terminating with uncaught exception of type NSException (Exit value: 134)
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
I need to do screenshots of my app for the app Store? How can I do?
Thank you
Related
I try to update my pod to Xcode 8 and Swift 3 syntax, I did run the following command of my project:
pod spec lint BSTableViewReorder.podspec
and it produces an error:
-> BSTableViewReorder (1.3)
- ERROR | [iOS] unknown: Encountered an unknown error (/Applications/Xcode.app/Contents/Developer/usr/bin/xcrun simctl list devices
2016-08-25 11:58:10.561 simctl[34169:531955] CoreSimulator is attempting to unload a stale CoreSimulatorService job. Detected Xcode.app relocation or CoreSimulatorService version change. Framework path (/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework) and version (209.19) does not match existing job path (/Users/kuna/Downloads/Xcode-beta.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc/Contents/MacOS/com.apple.CoreSimulator.CoreSimulatorService) and version (303.7).
2016-08-25 11:58:10.819 simctl[34169:531955] Failed to locate a valid instance of CoreSimulatorService in the bootstrap. Adding it now.
2016-08-25 11:58:10.839 simctl[34169:531955] *** Assertion failure in -[SimServiceContext reloadServiceIfMovedOrAbortIfWeAreInvalid], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreSimulator/CoreSimulator-209.19/CoreSimulator/SimServiceContext.m:536
2016-08-25 11:58:10.857 simctl[34169:531955] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The loaded com.apple.CoreSimulator.CoreSimulatorService job does not match our expectations: pathOfLoadedJob: /Users/kuna/Downloads/Xcode-beta.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/XPCServices/com.apple.CoreSimulator.CoreSimulatorService.xpc/Contents/MacOS/com.apple.CoreSimulator.CoreSimulatorService, our frameworkPath: /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/CoreSimulator.framework'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff87a934f2 __exceptionPreprocess + 178
1 libobjc.A.dylib 0x00007fff93c8973c objc_exception_throw + 48
2 CoreFoundation 0x00007fff87a981ca +[NSException raise:format:arguments:] + 106
3 Foundation 0x00007fff8aaa8856 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
4 CoreSimulator 0x00000001099953e9 -[SimServiceContext reloadServiceIfMovedOrAbortIfWeAreInvalid] + 1313
5 CoreSimulator 0x0000000109995d01 -[SimServiceContext connect] + 41
6 CoreSimulator 0x00000001099947a6 -[SimServiceContext initWithDeveloperDir:connectionType:] + 1108
7 CoreSimulator 0x0000000109994071 __63+[SimServiceContext sharedServiceContextForDeveloperDir:error:]_block_invoke_2 + 127
8 libdispatch.dylib 0x00007fff923fb40b _dispatch_client_callout + 8
9 libdispatch.dylib 0x00007fff923fc9f2 _dispatch_barrier_sync_f_invoke + 74
10 CoreSimulator 0x0000000109993ea6 +[SimServiceContext sharedServiceContextForDeveloperDir:error:] + 226
11 CoreSimulator 0x00000001099941ee +[SimServiceContext sharedServiceContext] + 51
12 simctl 0x0000000109982a71 simctl + 31345
13 libdyld.dylib 0x00007fff95ba65ad start + 1
14 ??? 0x0000000000000003 0x0 + 3
)
libc++abi.dylib: terminating with uncaught exception of type NSException
) during validation.
UPDATE:
After I chnaged the name of my Xcode from Xcode beta to Xcode, the following error arise:
Encountered an unknown error (Simulator iPhone 4s is not available.) during validation.
How to fix this?
Simply install iOS 9.3 Simulator:
update cocoapods to 1.1.0.beata.2 can fix it.
sudo gem install cocoapods --pre
hope can help you
I'm using Ionic to build a hybrid mobile app. Previously I've had no trouble launching the emulator via "ionic emulate ios" command. But all of a sudden the command started throwing errors.
I've tried removing then adding back the ios platform, uninstalling then re-installing ios-sim, but still get the same error message below. Any help would be much appreciated, thanks
2015-06-13 14:06:20.198 ios-sim[12997:507] -[__NSCFString containsString:]: unrecognized selector sent to instance 0x7f98e06006e0
2015-06-13 14:06:20.200 ios-sim[12997:507] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString containsString:]: unrecognized selector sent to instance 0x7f98e06006e0'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff9303925c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff9058ee75 objc_exception_throw + 43
2 CoreFoundation 0x00007fff9303c12d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00007fff92f97272 ___forwarding___ + 1010
4 CoreFoundation 0x00007fff92f96df8 _CF_forwarding_prep_0 + 120
5 ios-sim 0x0000000107511534 -[iPhoneSimulator runWithArgc:argv:] + 1313
6 ios-sim 0x0000000107511e79 main + 101
7 ios-sim 0x000000010750f0e0 start + 52
8 ??? 0x000000000000000a 0x0 + 10
)
libc++abi.dylib: terminating with uncaught exception of type NSException
What version of ios-sim are you using? (Run ios-sim --version to find out.)
The containsString crash on Mavericks is caused by this bug, which exists in v3.2.0 (see here).
If you downgrade to v3.1.1, or upgrade to v4.1.1, then ios-sim should work fine on Mavericks.
I updated Xcode. Not sure if that's the problem but it is where the problem started.
But long story short:
-"$ cordova emulate android" works
-"$ cordova emulate ios" does not work
It gives me (this is the last part of the output):
** BUILD SUCCEEDED **
2014-10-03 16:35:53.054 ios-sim[74808:507] stderrPath: /Users/doekewartena/Documents/jbc2014/platforms/ios/cordova/console.log
2014-10-03 16:35:53.055 ios-sim[74808:507] stdoutPath: /Users/doekewartena/Documents/jbc2014/platforms/ios/cordova/console.log
2014-10-03 16:35:53.085 ios-sim[74808:507] -[__NSArrayM localizedDescription]: unrecognized selector sent to instance 0x7fea40503090
2014-10-03 16:35:53.086 ios-sim[74808:507] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM localizedDescription]: unrecognized selector sent to instance 0x7fea40503090'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff98e1025c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff8cc4ee75 objc_exception_throw + 43
2 CoreFoundation 0x00007fff98e1312d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00007fff98d6e272 ___forwarding___ + 1010
4 CoreFoundation 0x00007fff98d6ddf8 _CF_forwarding_prep_0 + 120
5 ios-sim 0x00000001014b8e29 -[iPhoneSimulator LoadSimulatorFramework:] + 245
6 ios-sim 0x00000001014ba8e0 -[iPhoneSimulator runWithArgc:argv:] + 2271
7 ios-sim 0x00000001014bacb2 main + 101
8 ios-sim 0x00000001014b8ce4 start + 52
)
libc++abi.dylib: terminating with uncaught exception of type NSException
/Users/doekewartena/Documents/jbc2014/platforms/ios/cordova/run: line 158: 74808 Abort trap: 6 ios-sim launch "$SIMULATOR_APP_PATH" --stderr "$CORDOVA_PATH/console.log" --stdout "$CORDOVA_PATH/console.log" $TARGET_FLAG --exit
Error: /Users/doekewartena/Documents/jbc2014/platforms/ios/cordova/run: Command failed with exit code 134
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:755:16)
at Process.ChildProcess._handle.onexit (child_process.js:822:5)
However, I can run the simulator fine from Xcode itself.
I have no clue what to do, I hope someone can help.
For Xcode 6 you'll need version 3 of ios-sim. Check your version by running ios-sim --version. Upgrade by running sudo npm update ios-sim -g.
I have been unable to get ios-sim to start on a relatively clean isntall of Yosemite, Xcode 6 beta and Developer Tools 10.10.
MacOS $ ios-sim start
2014-06-10 20:34:39.578 ios-sim[4957:836370] -[__NSArrayM localizedDescription]: unrecognized selector sent to instance 0x7fbc18f00380
2014-06-10 20:34:39.579 ios-sim[4957:836370] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM localizedDescription]: unrecognized selector sent to instance 0x7fbc18f00380'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff8e4e914c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff9108257d objc_exception_throw + 43
2 CoreFoundation 0x00007fff8e4ec07d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
3 CoreFoundation 0x00007fff8e435604 ___forwarding___ + 1028
4 CoreFoundation 0x00007fff8e435178 _CF_forwarding_prep_0 + 120
5 ios-sim 0x0000000103e166cd -[iPhoneSimulator LoadSimulatorFramework:] + 245
6 ios-sim 0x0000000103e18233 -[iPhoneSimulator runWithArgc:argv:] + 2317
7 ios-sim 0x0000000103e185f5 main + 101
8 ios-sim 0x0000000103e16588 start + 52
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
Updating ios-sim does the trick. https://github.com/phonegap/ios-sim No need to use the fork from robovm. And now that it is no longer beta, it isn't off topic. :]
ios-sim is currently incompatible with Xcode6-beta. A fix has been posted by "robovm" at https://github.com/robovm/ios-sim
Please help me to fix the following odatagen issue:
Command line: ./odatagen /uri=http://odata.netflix.com/v1/Catalog/ /out=/Users/sontmai/Desktop/ODatagenApp
Exception:
2011-05-20 14:14:14.056 odatagen[3356:903] * Terminating app due to uncaught exception 'NSRangeException', reason: ' -[NSPathStore2 substringToIndex:]: Range or index out of bounds'
** Call stack at first throw:
(
0 CoreFoundation 0x900da6ba __raiseError + 410
1 libobjc.A.dylib 0x99836509 objc_exception_throw + 56
2 CoreFoundation 0x900da3e8 +[NSException raise:format:arguments:] + 136
3 CoreFoundation 0x900da35a +[NSException raise:format:] + 58
4 Foundation 0x99411120 -[NSString substringToIndex:] + 133
5 odatagen 0x00002f39 getFileName + 176
6 odatagen 0x00003742 main + 347
7 odatagen 0x00001d75 start + 53
8 ??? 0x00000003 0x0 + 3
)
Trace/BPT trap
It seems that the odatagen was not written with Mac users in mind.
odatagen relies on files that exist in
.../ProjectFiles/Framework/src/odatagen/
directory. Thus if open .../ProjectFiles/Framework/src/odatagen/odatagen.xcodeproj in XCode and compile, navigate to the new odatagen executable it should work.
However, if you are like me and do not compile to the default location then it still will not work. The odatagen requires the its path include
.../ProjectFiles/Framework/src/odatagen/build/...
You can either revert to build to the default location or set a custom build directory or move the odatagen executable to the necessary location.