Xcode 7.0 XCTest dyld: could not load inserted library IDEBundleInjection

亡梦爱人 提交于 2019-11-29 05:31:59

In General Panel , not leave the Team to "None"

At Same time : select the code sign in Build Setting->Code Signing-> Code Signing Identity

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

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

I fixed this by selecting the correct target and then selecting the correct Code Signing Identity from Settings. It was set to a non default - changed to 'IOS Developer' for the Debug setting entry.

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

I had this same issue and had to reboot my device. I was using iOS 10 with Xcode 8.0 (developing in swift 3.0)

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

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.

I fixed this issue by rebooting my iOS Device.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!