Xcode 6 works on a physical iOS device does not work

I had a problem launching the target testing module on a physical device (iPhone 6 with iOS 8.1 in my case). To do this, I created a completely new iOS Xcode project, opened it and ran tests with Cmd + U (Product -> Test). The application compiles successfully and asks me about my credentials for signing the code. The application even opened on the device. Everything is good for this part.

But tests never run, and Xcode got stuck in "Testing" for several minutes, and then exits with:

*** Canceling tests due to timeout in Waiting for test process to check in... 

The console displays some code signing errors or such:

 2014-10-30 08:54:12.585 Test[4721:1298810] Error loading /private/var/mobile/Containers/Data/Application/B727E18E-48BC-4A7E-BDBA-19157ED5A4AC/tmp/TestTests.xctest/TestTests: dlopen(/private/var/mobile/Containers/Data/Application/B727E18E-48BC-4A7E-BDBA-19157ED5A4AC/tmp/TestTests.xctest/TestTests, 262): no suitable image found. Did find: /private/var/mobile/Containers/Data/Application/B727E18E-48BC-4A7E-BDBA-19157ED5A4AC/tmp/TestTests.xctest/TestTests: code signature invalid for '/private/var/mobile/Containers/Data/Application/B727E18E-48BC-4A7E-BDBA-19157ED5A4AC/tmp/TestTests.xctest/TestTests' DevToolsBundleInjection: Error loading bundle '/private/var/mobile/Containers/Data/Application/B727E18E-48BC-4A7E-BDBA-19157ED5A4AC/tmp/TestTests.xctest' 

I really don't understand, the application is signed correctly, but I assume that the nested test library is not.

Anyone have an idea how to fix this? Or does this mean that we are limited to testing in Simulator?

The project I tested is available on my GitHub: https://github.com/Legoless/StackOverflow/tree/master/Objective-C/TestTargetFailure

Thanks.

+6
source share
1 answer

This is a problem with fake code.

Solution: go to setting up the assembly of the test target and make sure that it is appropriate (i.e. corresponding to the Bundle ID of your test target). The profile profile and code signature identifier are defined. To do this, you can create a wildcard profile.

+2
source

Source: https://habr.com/ru/post/977462/


All Articles