Unity ios Build XCode error: Undefined symbol _WebSocket

Hi, I’m trying to build the Moralis Unity boilerplate to ios app. The unity build was fine, but when I tried to do the build in Xcode, I got these errors (image attached): Undefined symbol: _WebSocketFree, _WebSocketSetOnMessage etc.

When I search “websocket” in unity I got a lot of hits in Moralis.Networkd and Wallet connect.

Do you know what could be the issue? And how I can solve this?
Thank you!

1 Like

Sorry for the late response, just found this question today. I had not seen this error until this morning. I did an update to XCODE and suddenly started getting it myself.

So far solutions I have found via search (add GameKit.framework, etc.) have proved ineffective. I am searching for a solution. Will post once I find one.

Please post back if you find a solution.

Regards,

David

Hi David,

The only solution I found was to delete the folder with the websocket scripts - I believe it was the Moralis.Network folder. This worked for me, but of course its not a great solution if someone needs those scripts. I am outputting to IOS, so far that hasn’t broken anything. Also, I am using Moralis Unity Boilerplate v1.0.2 so I’m not sure how things have changed with the updated Moralis boilerplate.

Gleb

1 Like

You are on the right track. The Network objects are there for WebGL only but are always built. I am entering a Critical defect to wrap the WebGL code so that it is not built except when WebGL is the target. I tried this on my Mac and it solved the issue. The updated code should be deployed later this evening or early tomorrow.

Regards,

David

I’m not sure, but if you need to save both WebSockets, then this should be fine.