Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS could not launch simulator when use jenkins to run test

Tags:

ios

jenkins

I'm going to use jenkins for my iOS app, i followed some blog on the internet and success building using jenkins , but when i want to run the test for my project , i get this error:

2015-12-10 16:58:06.105 xcodebuild[6635:91852]  iPhoneSimulator: Could not launch simulator: -10810
2015-12-10 16:58:06.174 xcodebuild[6635:92068]  iPhoneSimulator: Could not launch simulator: -10810
** TEST FAILED **

i have tried the xcodeplugin and just a simple shell command in the jenkins,they both give me this error. my shell command is as follow :

xcodebuild  -scheme XcodeBulidDemo -destination 'platform=iOS Simulator,name=iPhone 6' -configuration Debug test

and i had tried to run this command in the terminal just under my project,it can get the test result.

i'm really do not understand what does the error "iPhoneSimulator: Could not launch simulator: -10810" mean, could anyone give me some advices..

like image 906
Xingou Avatar asked Dec 10 '15 09:12

Xingou


1 Answers

after my google, i found the result, can not launch the simulator is because jenkins is daemon, running in the background ,and can not render anything in front.

but we want to use jenkins to run our UnitTest and UITest , we must run the simulator, so we should change jenkins to a real user, and login in jenkins user.

i found a great blog which show how to do it step by step : http://www.cimgf.com/2015/05/26/setting-up-jenkins-ci-on-a-mac-2/

after you finish that , then you can run test on simulator using jenkins, wish this can help anyone has the same question.

like image 102
Xingou Avatar answered Oct 15 '22 23:10

Xingou