dyld: library not loaded: @ rpath / libswiftCore.dylib only in Xcode 9

I recently upgraded to Xcode 9 with 8.3.3.

Our project is written in Objective-C, like all other frameworks that we use. I added a framework that is written in Swift (version 3.0). In Xcode 8, I can easily build and run a project in the simulator and on the device. In Xcode 9, I cannot run the project on a simulator or device due to an error:

dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: .../libraryname Reason: image not found 

After downgrading, I was able to start the project again.

My configuration has:

 ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; STRIP_SWIFT_SYMBOLS = NO; SWIFT_VERSION = 3.0; 
+12
ios objective-c swift3 xcode9
source share
8 answers

Just clean and build to solve this problem. Tested in Xcode 9.2 and Swift 4

+1
source share

The Swift structure must be built with the same version of Swift as your project (in this case, Swift 4 is inherited from the moment of update and runs through Xcode 9).

Restore and re-add / replace the framework with the new version, and it should work.

0
source share

Do you use Carthage and have several Xcode_s on your machine? I recently had a problem when I ran carthage update --use-ssh --platform iOS while xcode8.3.3 was selected on the command line. Then included the built-in frameworks in the assembly.

To work in Xcode9 you need to run the switch sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer for your Xcode.app and run cassage again.

Hope this helps.

0
source share

There was the same problem. I am using Xcode 9.2, Swift 4, and my device works in iOS 11.1.

Decision:

I removed the Apple Worldwide Certificate Authority Certificate Authority in Keychain Access and replaced it with a new one (you can download

0
source share

Try restarting Xcode. I tried everything else, and this is what stopped the problem.

0
source share

This mainly happens if the certificate trust settings are set to Always Trust. Change it to "System Defaults" and recreate the assembly. This should solve the problem: https://egeek.me/2017/10/21/code-signing-blocked-mmap-on-ios-device/

0
source share

I ran into the same problem (in Xcode 9.4.1) but couldn't solve it with any help. I ran into a problem when Xcode kept asking me to use my keychain but could not complete the request - although I gave my password. The application was successfully built and installed. However, it crashed on startup on the device right away.

Here is what solved my problem.

  • Removed my certificate and public / private key pair
  • Created a new certificate (via CSR) and installed it on my computer
  • Associated a new certificate with a provisioning profile and installed the profile on Xcode
  • Cleared the assembly and deleted the existing assembly on the device
  • Hooray!!!

Hope this helps someone who is searching the planet!

0
source share

After hours of struggling with this error and trying various solutions, my solution turned out to be different than the others, so I add it for those who can benefit.

I tried: - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES - LD_RUNPATH_SEARCH_PATHS = $ (inherited) @ executetable_path / Frameworks

Unsuccessfully. It turned out the problem was simpler. My project has several build goals, and somehow the settings for the Host Application were reset. enter image description here

0
source share

All Articles