I am having problem with my current Xcode environment I think.
I have a project I am using pod for 3rd party frameworks, recently I cleaned up the ~/Library/Cache and revoked all my certificates/identifiers/provisioned profiles and created new ones.
When I run the project on device I get the dyld
dyld_fatal_error` error, I've spent whole day yesterday trying to fix it with no luck.
Today I tried to create a new project, swift language, the default one, tried to run it in my device (iPhone 6s, iOS 9.3.1) and I got same error (screenshot):
https://www.dropbox.com/s/s610kjb91t03hfz/Screenshot%202016-04-25%2017.43.09.png?dl=0
No idea what exactly is causing the problem or how to fix it. Help is appreciated.
Environment: Xcode 7.3, Apple Swift version 2.2 (swiftlang-703.0.18.1 clang-703.0.29), Target: x86_64-apple-macosx10.9
[edit] Clicking on continue on debugger I get this in log
dyld: Library not loaded: @rpath/libswiftCore.dylib
Referenced from: /var/containers/Bundle/Application/6FB44AE2-1475-4EC0-8620-38E210C27315/test.app/test
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/6FB44AE2-1475-4EC0-8620-38E210C27315/test.app/Frameworks/libswiftCore.dylib: mmap() errno=1 validating first page of '/private/var/containers/Bundle/Application/6FB44AE2-1475-4EC0-8620-38E210C27315/test.app/Frameworks/libswiftCore.dylib'
(lldb)
The problem was in my certificates. When I opened the keychain I found certificates I generated recently had the error the certificate has an invalid issuer
.
Then I deleted all my certificates I added from Apple Developer Center. I requested new Certificate from Certificate Authority, and used it to create new certificate in Apple Developer Center. Then downloaded it, and installed it.
I also installed WWDR Certificate from https://www.apple.com/certificateauthority/.
It worked!