Xcode9: code signing blocked by mmap () while running on device

After upgrading to XCode9, I ran into a problem (well, I could not completely isolate the reason because I recreated the certificate right after the upgrade to enable the Push service):

dyld: Library not loaded: @rpath/apowo.framework/apowo Referenced from: /var/containers/Bundle/Application/2CD5CA32-1DAF-423B-B921-024DCBEE2AF0/picatown.app/picatown Reason: no suitable image found. Did find: /private/var/containers/Bundle/Application/2CD5CA32-1DAF-423B-B921-024DCBEE2AF0/XXXX.app/Frameworks/apowo.framework/apowo: code signing blocked mmap() of '/private/var/containers/Bundle/Application/2CD5CA32-1DAF-423B-B921-024DCBEE2AF0/XXXX.app/Frameworks/apowo.framework/apowo' 

There are several similar posts on SO, but I believe this might be caused by something new. Actually, the original problem was not in XXX.framework, but in libswiftcore, and after I made all the suggestions for SO, the error came from my own libraries. And here is what I tried:

  • clean
  • delete derived data
  • restart Xcode, Mac and my phone.
  • delete all certificates and recreate again
  • remove structure references (and binaries) from the project and re-add

None of them work.

Some additional data: I use jenkins and fastlane to control the assembly. An Xcode project is recreated each time a task runs. The same task is performed on another machine, which is located on Xcode 8, and nothing breaks (it starts after the certificate is recreated, so this is with the new certificates).

I thought this was about libraries, and I rebuilt them on Xcode 9. The newly created libraries were also in Xcode 8, built and worked well, but not on Xcode 9.

Any help would be appreciated.

+5
source share
2 answers

I decided this in my project, and now it works!

 * Clear All Derived Data. * Clear All Build Caches. * Remove all certificates from your keychain. * Remove all accounts from your xcode preferences. * Restart your system. * Login your apple account on Xcode. * Revoke and Recreate your certificates. And it will work i hope :) 
0
source

I tried the next step and it works:
In XCode -> Build Phase -> Linked frameworks and libraries : select your specific framework status from optional.

And it should work;)

0
source

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


All Articles