iosiphoneswiftxcode7ios9.2

dyld: Library not loaded: @rpath/libswiftCore.dylib


I am getting this issue in my existing project and i tried to create new project then i run in device getting same issue

    dyld: Library not loaded: @rpath/libswiftCore.dylib
      Referenced from: /var/mobile/Containers/Bundle/Application/D14EA274-0C2B-457B-8E8F-494197978F34/Pro.app/Pro
Reason: no suitable image found.  Did find:
    /private/var/mobile/Containers/Bundle/Application/D14EA274-0C2B-457B-8E8F-494197978F34/Pro.app/Frameworks/libswiftCore.dylib: mmap() errno=1 validating first page of '/private/var/mobile/Containers/Bundle/Application/D14EA274-0C2B-457B-8E8F-494197978F34/Pro.app/Frameworks/libswiftCore.dylib'

some of the answer i tired but still getting same issue enter image description here

dyld: Library not loaded: @rpath/libswiftCore.dylib


Solution

  • I found this issue some months back. It was cause by Apple's default certificate being expired.

    This resolved my issue.

    1. Go to keychain access
    2. Select "System" in "Kechains" and "All Items" in "Category"
    3. There will be a certificate with name "Apple Worldwide Developer Relations Certification Authority". Check if it's valid
    4. In my case, it had been expired. Delete that certificate if it's expired or is showing as signed by unauthorized identifier
    5. Goto https://www.apple.com/certificateauthority/ and download "Worldwide Developer Relations - G2 Certificate" under "Apple Intermediate Certificates"
    6. Install the certicate
    7. Clean, Build and run.