When the Swift application starts on the device, the application crashes: dyld: the library is not loaded: @ rpath / libswiftCore.dylib

I am new to the ios / xcode world and trying to test a simple Swift application on my iphone 5 with iOS v8.0.2. The application works successfully in xcode (version 6.1 (6A1052d)), but when it tries to run it on iphone, it exits with the following error:

dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /private/var/mobile/Containers/Bundle/Application/FBBDB6F3-6B2C-428F-AA9C-E88FE439D5B6/prox.app/prox Reason: no suitable image found. Did find: /private/var/mobile/Containers/Bundle/Application/FBBDB6F3-6B2C-428F-AA9C-E88FE439D5B6/prox.app/Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x001FA000, size=0x001A0000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/FBBDB6F3-6B2C-428F-AA9C-E88FE439D5B6/prox.app/Frameworks/libswiftCore.dylib /private/var/mobile/Containers/Bundle/Application/FBBDB6F3-6B2C-428F-AA9C-E88FE439D5B6/prox.app/Frameworks/libswiftCore.dylib: mmap() error 1 at address=0x004DA000, size=0x001A0000 segment=__TEXT in Segment::map() mapping /private/var/mobile/Containers/Bundle/Application/FBBDB6F3-6B2C-428F-AA9C-E88FE439D5B6/prox.app/Frameworks/libswiftCore.dylib (lldb) 

I tried most of the suggestions that helped others facing this error, but no luck getting around this. The same application works great when building using the build environment of another team member. I compared the build settings and found them the same.

+6
source share
3 answers

Try creating a new distribution certificate and a new provisioning profile. Perhaps this is due to this. I ran into this problem.

https://www.airsignapp.com/ios-apps-using-swift-crash-when-signed-with-inhouse-certificate/

Basically, Apple added a new field to the certificate and did not tell us anything.

+5
source

You will probably need to use a new certificate to sign your application. An excerpt from Apple technical support questions.

To fix this problem, you will need to sign the application using the certificate signing code with the Organizational Unit (OU) set for your team ID. All corporate and standard iOS developer certificates that are created after the release of iOS 8 have a new Team ID field in the right place to launch Swift language applications.

+1
source

I had the same problem after updating Xcode, with the "old" Swift project ...

I solved this by creating a new project with a new Xcode and just copying / pasting my old classes into it ... If you copy / paste each class / storyboard into a new project, it will run

0
source

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


All Articles