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

NielsCupNielsCup NLMember ✭✭✭
edited September 2016 in Objective Sharpie

I am creating an Objective-C binding for some 3rd party native framework. I have created my ApiDefinition with sharpie and it seems OK, but whenever I start an app which references my binding, the app crashes with the following output:

dyld: Library not loaded: @rpath/libswiftCore.dylib
Referenced from: /private/var/containers/Bundle/Application/...framework/...
Reason: image not found

Does anyone know how to solve this?

Best Answers

Answers

  • I was having the same problem, however, following the Lucas link hint I solved the above problem, but now I have the following error: dyld: Symbol not found: __TMVs11AnyHashable

    Can you help me?

    Thanks,
    Homero

  • JonahHulselmansJonahHulselmans USMember ✭✭

    I'm having the same issue with xcode 9. I'm trying to create a binding of a swift framework that's compatible with objective-c. I've added the Xamarin.Swift3.Core and Xamarin.Swift4.Core nuget packages, but I still get these error and the app crashes.

    Can anybody help me to fix the problem?

  • RaphRaph DEMember ✭✭

    Hello Jonah,

    similar I had a similar problem with Xcode 8.2.1. Please see on here at https://forums.xamarin.com/discussion/104824/binding-native-framework-to-xamarin-ios-project-causes-app-crash-on-launch-with-no-output.

    I think your problem is that you should not mix Swift NuGet packages targeting different versions of Swift. If your framework is compiled in Swift 4, you just add the Swift4 Nuget packages that are really needed by your framework. Let's say your framework would be compiled in Swift 3.0.2 (like in my case; Swift 3.0.2 = Xcode 8.2.1), just add the Swift3 NuGet exactly in the version 3.0.2. I added the 3.1 versions of Swift3 NuGet packages as well at first and this made my app crash. You should also keep your packages folder clean. Let's say it contains old NuGet packages with invalid Swift versions, latter are also copied into your app and would make your app crash.

    Bests, Raphael

Sign In or Register to comment.