Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
535 views
in Technique[技术] by (71.8m points)

ios8 - Running tests on Xcode 6 and device

I am trying to run unit tests on Xcode 6 if I run them on the simulator (and 7.1 at that) they run fine

other conditions yield this message:

2014-10-10 01:39:56.190 MyApp[493:173988] Error loading    
/private/var/mobile/Containers/Data/Application/A6C42E86-0147-4447-A605- 
FF864C5BD0F7/tmp/MyAppTests.xctest/MyAppTests:  
dlopen(/private/var/mobile/Containers/Data/Application/A6C42E86-0147-4447-A605-
FF864C5BD0F7/tmp/MyAppTests.xctest/MyAppTests, 262): no suitable image found.  
    Did find:

/private/var/mobile/Containers/Data/Application/A6C42E86-0147-4447-A605-
FF864C5BD0F7/tmp/MyAppTests.xctest/MyAppTests: mmap() error 1 at address=0x006D0000, 
size=0x0001E000 segment=__TEXT in Segment::map() mapping
/private/var/mobile/Containers/Data/Application/A6C42E86-0147-4447-A605-
FF864C5BD0F7/tmp/MyAppTests.xctest/MyAppTests

how do i fix it ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I followed the steps of Lena Bru, but it didn't fixed my problem. Then I found this question about code-signing issues. I checked the general tab in my project settings and found out that "Team" was set to "None". After selecting a team, my tests run without problems.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...