1

I have a project that was created with Xcode 10, Objective-C, and Swift 4.0 and now upgraded to Xcode 10.2.1.

Error reporting for each run.

  1. I have set Always Embed Swift Standard Libraries to YES
  2. Add @executable_path/Frameworks to "Runpath Search Paths"

These methods don't resolve the issue.

dyld: Library not loaded: @rpath/libswiftCore.dylib
  Referenced from: /private/var/containers/Bundle/Application/48371FB5-6A90-4D14-9D65-C7AB5DCAC1A1/one mini.app/Frameworks/Framework152x.framework/Framework152x
  Reason: image not found
rmaddy
  • 314,917
  • 42
  • 532
  • 579
Jackie
  • 13
  • 2
  • Please [search on the error](https://stackoverflow.com/search?tab=newest&q=Library%20not%20loaded%3a%20%40rpath%2flibswiftCore.dylib). This has been covered many times. – rmaddy May 16 '19 at 03:20
  • this is the latest Xcode problem,different with before – Jackie May 16 '19 at 07:24

2 Answers2

2

Actually, the problem is the Framework152x.framework is developed in Swift with Xcode version below 10.2. If your project is built with Xcode 10 with Framework152x.framework means Framework152x.framework runtime is swift 4.2. But if you build your project in Xcode 10.2.1 this issue will occur. Because the XCode 10.2.1 has swift 5 Runtime but Framework152x.framework is expecting swift 4.2. You can resolve this problem only by using Framework152x.framework which needs to be built either in Xcode 10.2 or 10.2.1

vishnu J
  • 21
  • 2
1

I had the same or very similar issue with UI tests failing due to their deployment target being set to iOS 12 and the app under test being set to iOS 10. When I set them both to iOS 10 the UI tests would successfully launch (the app always launched fine). Not sure if that's the problem you're having as you've not mentioned UI tests but perhaps you neglected to mention that :)

CMash
  • 1,987
  • 22
  • 35
  • That was the issue for me. If you add a new TestTarget to an existing XCode Project built with a previous Swift Version and for a previous iOS Build target, XCode nevertheless assigns Swift 5 and iOS 12.+ to the new target, resulting in those errors. – Sebastian Jun 25 '19 at 14:34