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

2020-03-04 07:21发布

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

7条回答
相关推荐>>
2楼-- · 2020-03-04 07:52

I deleted the "Derivered Data" and that fixed the issue.

For people who have xcode 8.3 the path is :

in "File" or in "Workspace Settings" --> "Project Settings" --> click the gray arrow under the "Derived Data" --> Select your project folder and delete it.

Hope this helps!

查看更多
Evening l夕情丶
3楼-- · 2020-03-04 07:56

My solution is as below:

  1. go to "TARGET" > "Build Settings";
  2. search for "Runpath Search Paths", check if value contains "$(inherited)" & "@executable_path/Frameworks", add them if doesn't;
  3. clean and rebuild project.

That's all. enter image description here

查看更多
相关推荐>>
4楼-- · 2020-03-04 07:59

Now (2017 June) at Xcode 8.3.2, Swift 3 and iOs 10.3, my solution - after trying many possible solution who did't work for me - for this issue was at Keychain Access. I have deleted Apple Worldwide Developer Relations Certificate Authority and then I have downloaded and installed a new one. After that, I have changed "trust"(double-click the certificate) from "always" to "system default". Now everything is fine.

查看更多
别忘想泡老子
5楼-- · 2020-03-04 08:01

In Xcode, you can go to Window -> Projects, and find your project name and delete "Derived Data". This should resolve your issue. enter image description here

查看更多
Animai°情兽
6楼-- · 2020-03-04 08:04

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.
查看更多
乱世女痞
7楼-- · 2020-03-04 08:07

Ok. i solve this a little bit different way. As you know, grater than Xcode 7, you can run your iOS project(only one iphone) on your iphone without purchase Apple Developer Program(registration is enough).

  • if you have a Apple ID and not purchased yet.
  • And you was build on the different iPhone(Divece A)
  • Now, you want to build different iPhone(Divece B)

for this scenario, you can get an error which is detailed below

dyld: Library not loaded: @rpath/libswiftCore.dylib uzun hali de dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /private/var/mobile/Containers/Bundle/Application/LONGSERIALNUMBER/AppName.app/AppName Reason: no suitable image found. Did find: /private/var/mobile/Containers/Bundle/Application/LONGSERIALNUMBER/AppName.app/Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x008A1000, size=0x001A4000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/LONGSERIALNUMBER/APPLICATION_NAME/Frameworks/libswiftCore.dylib

You must delete Provision Profile or you should get new Apple Developer account for new iPhone.

查看更多
登录 后发表回答