Xcode 7.0 XCTest dyld: could not load inserted library IDEBundleInjection

后端 未结 9 2464
天涯浪人
天涯浪人 2020-12-17 10:01

I\'m running unit tests on my iOS project and when it\'s running, it crashes and spits this out:

dyld: could not load inserted library \'/private/var/mobile/         


        
相关标签:
9条回答
  • 2020-12-17 10:12

    I needed to set the team under Project->App Target->General. It was set to "None", instead of a valid team.

    0 讨论(0)
  • 2020-12-17 10:14

    I had my base SDK in XCode Build Settings set to a more recent version of iOS than the phone had, so I had to upgrade the OS on the phone.

    0 讨论(0)
  • 2020-12-17 10:14

    I fixed this issue by rebooting my iOS Device.

    0 讨论(0)
  • 2020-12-17 10:17

    I fixed this by just creating a new UnitTest target, copying everything over, and removing the old one.

    0 讨论(0)
  • 2020-12-17 10:18

    I managed to fix this by specifying my developer certificate in build settings->code signing identity.

    0 讨论(0)
  • 2020-12-17 10:18

    In my case there was nothing wrong with the provisioning profiles, it was down to the Architectures in the project excluding arm64. Once arm64 was added to both the test target and the host app target the tests ran fine (On Xcode 7.2). The error was:

    dyld: could not load inserted library '/private/var/mobile/Containers/Data/Application/A94F5AD3-2A5F-415D-B127-0F45DEC7A659/tmp/IDEBundleInjection.framework/IDEBundleInjection' because no suitable image found.  Did find:
    /private/var/mobile/Containers/Data/Application/A94F5AD3-2A5F-415D-B127-0F45DEC7A659/tmp/IDEBundleInjection.framework/IDEBundleInjection: mmap() error 22 at address=0x00501000, size=0x00005960 segment=__LINKEDIT in Segment::map() mapping /private/var/mobile/Containers/Data/Application/A94F5AD3-2A5F-415D-B127-0F45DEC7A659/tmp/IDEBundleInjection.framework/IDEBundleInjection
    
    0 讨论(0)
提交回复
热议问题