Search code examples
iosswiftxcodeframeworkscarthage

Carthage Xcode 9 Error


I try to install Carthage in my project but it always crash on launch.

Nothing works from what I've tried..

Error:

dyld: Library not loaded: @rpath/StarscreamSocketIO.framework/StarscreamSocketIO
Referenced from: /private/var/containers/Bundle/Application/69ADA4FD-59A0-4840-9A64-XXXXX/XXXX.app/Frameworks/SocketIO.framework/SocketIO
Reason: image not found

Carthage folder:

enter image description here

Linked Frameworks and Libraries: enter image description here

Run Script: enter image description here

Copy Files: enter image description here

I also tried to set the framework in Embedded Binaries.

Thank you.

Edit: Cartfile file: enter image description here


Solution

  • Swift 3

    If you can't port your code to Swift 4, the following is a possible workaround:

    1.inside your main project, drag and drop the file Starscream.xcodeproj which is inside:

    Carthage/Checkouts/socket.io-client-swift/Source/Starscream
    

    2.add the framework StarscreamSocketIO.framework inside the section "Linked Frameworks and Libraries"

    3.compile and run

    Swift 4

    socket.io v11 had a bug with Carthage: github.com/socketio/socket.io-client-swift/issues/787 although it's possible to fix it with some manual workarounds, I recommend you to upgrade to the latest socket.io v13