mikerochip / unity-websocket

Easy-to-use WebSocket MonoBehaviour for Unity. NativeWebSocket alternative.
Other
54 stars 7 forks source link

Xcode / iOS Undefined symbol: _WebSocketAddSubprotocol #11

Closed epmapps closed 11 months ago

epmapps commented 11 months ago

Hi, I am trying to build my unity app to iOS and receiving these errors when building in xcode:

Screenshot 2023-11-27 at 12 01 09 PM

This is the only package that I am importing / using at the moment. Thanks

epmapps commented 11 months ago

App works fine locally (in unity game tab). The app doesn't build with same errors for other targets as well (ipad, mac)

epmapps commented 11 months ago

I have imported the library correctly as far as I can tell (and it works in unity)

Screenshot 2023-11-27 at 7 06 44 PM Screenshot 2023-11-27 at 7 05 52 PM

Am I missing something wrt deploying a unity project to iOS? I was able to deploy to the phone before adding this library. Any help would be appreciated!

epmapps commented 11 months ago

I made a new project and imported this library and it was able to deploy to iOS. I then commented out everything in my networking file related to websocket and it did not work. I removed this package and it worked. Reinstalled it and only uncommented top line: public WebSocketConnection _Connection; and it does not work... Only solution I see is to remake the project lol..

mikerochip commented 11 months ago

Hi there. Thanks for letting me know about the build errors, I see them as well and will fix them soon.

networking file

What do you mean by networking file? I can't see your project, so I'm not sure.

I removed this package and it worked. Reinstalled it and only uncommented top line: public WebSocketConnection _Connection; and it does not work... Only solution I see is to remake the project lol..

I'm not really sure what's going on with all this, but based on the small code snippet, it looks like you are copy/pasting the sample code from the readme; I would need to see more of the code to help.

mikerochip commented 11 months ago

Try again by updating to the latest: in your Unity project, open the package manager, click the update button on this library, then build and run on your devices. If it still doesn't work, then please open a new issue and post more of the code so I can help.

I've closed this issue due to fixing the build errors from the OP.