Code Monkey home page Code Monkey logo

Comments (11)

timetraveler90 avatar timetraveler90 commented on August 15, 2024
Undefined symbols for architecture arm64:
  "_$s18SwiftPhoenixClient7ChannelCMn", referenced from:
      _symbolic _____Sg 18SwiftPhoenixClient7ChannelC in AuthenticateChannel.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

from swiftphoenixclient.

timetraveler90 avatar timetraveler90 commented on August 15, 2024

@davidstump can you please take a look?

from swiftphoenixclient.

dsrees avatar dsrees commented on August 15, 2024

@timetraveler90 I don't have access to an M1 and am not seeing this behavior in my project using 5.2.1. What version of Xcode are you on?

Also, 5.2.0 changed the signature of socket.onError and depending on how you have it implemented, it may or may not be the cause? Are you calling socket.onError? and if so could you share that snippet?

from swiftphoenixclient.

timetraveler90 avatar timetraveler90 commented on August 15, 2024

It's Xcode Version 14.2 (14C18).

For example:

protocol ConnectionManagerProtocol: AnyObject {
    var connectionManager: ConnectionManager! { get set }
    var channel: Channel? { get set }
    
    var channelName: ChannelName! { get set }
    var state: ChannelState { get set }
    
    init()
}

with this block of code, I am always getting that kind of error, and when I comment this line:
var channel: Channel? { get set }
the error is gone, which puzzles me the most. I do not see the reason why this line makes this error.

from swiftphoenixclient.

dsrees avatar dsrees commented on August 15, 2024

Yeah I'm at a loss here. How are you including the library? pods? package manager? I'm assuming pinning the version to 5.1.0 resolves this? I want to say that somehow search paths got mixed up

from swiftphoenixclient.

timetraveler90 avatar timetraveler90 commented on August 15, 2024

I am importing the lib as a swift package, tried also resolving the cache and changing back the version to 5.1.0 but I am ending up with the same error all over again. Currently kinda clueless why this happens.

from swiftphoenixclient.

dsrees avatar dsrees commented on August 15, 2024

Is it giving you the same error on 5.1.0 as well now?

from swiftphoenixclient.

timetraveler90 avatar timetraveler90 commented on August 15, 2024

It's definitely not version related, I have tried to change the version and the same message occurs.
The reason why I thought it was the version related is that at that time when I had 5.1.0 I had only imported there, without referencing or instantiating anything from the lib, but when I added mode code and updated the lib to 5.2.1 this issue started to happen.

I have just now tried an even older version but it's the same behavior definitely. Also, one of my colleagues tried it on his mac machine, which is not M1, and he has the same issue.

from swiftphoenixclient.

dsrees avatar dsrees commented on August 15, 2024

Resolving this issues can sometimes be like shooting in the dark. I would try removing the library dependency, commenting out any references and then cleaning, resetting caches, and rebuilding and get the project to build successfully without SwiftPhoenixClient. Then after that re-add the dependency, build, uncomment references, build, etc.

from swiftphoenixclient.

timetraveler90 avatar timetraveler90 commented on August 15, 2024

Well, I found the solution, and the issue was on my side absolutely, there was nothing to do with the lib itself.

I realized where was the issue only when I changed the approach from SPM to Pods, and then I realised that the part of the code where I want to use the lib is actually a framework on my project and it wasn't visible even tho it's added in the pods, so I switched back to SPM and added SwiftPhoenixClient to 'Link Binary With Libraries' permission in order to actually have it.

SPM gave me 'fake hope' that I can actually use the lib, which wasn't the case with Pods, when I tried to import the SwiftPhoenixClient. On Pods I was getting not found error.

Sorry for the false alarm guys, please close this ticket. @dsrees

from swiftphoenixclient.

dsrees avatar dsrees commented on August 15, 2024

💯 awesome, glad you got it resolved! Please reach out in the future if you have any other issues.

from swiftphoenixclient.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.