In case anyone else runs into the same, here is the problem and solution.
Problem:
Our game uses our own turn-based framework that sits between the scripts in Unity and Unity+SFS. Its compiled out as separate DLL files, and its in here that we got all SFS code embedded.
So our game scripts -> framework dll -> SFS dll
When deploying the game to iOS and trying to connect we got this weird exception:
Code: Select all
[SFS - ERROR] TCPSocketLayer: General exception on connection: An exception was thrown by the type initializer for System.Net.Sockets.Socket at System.Net.Sockets.TcpClient.Init (AddressFamily family) [0x00000] in <filename unknown>:0
at System.Net.Sockets.TcpClient..ctor () [0x00000] in <filename unknown>:0
at Sfs2X.Core.Sockets.TCPSocketLayer.ConnectThread () [0x00000] in <filename unknown>:0
On Connection callback got: False (error : <General exception on connection: An exception was thrown by the type initializer for System.Net.Sockets.Socket at System.Net.Sockets.TcpClient.Init (AddressFamily family) [0x00000] in <filename unknown>:0
at System.Net.Sockets.TcpClient..ctor () [0x00000] in <filename unknown>:0
at Sfs2X.Core.Sockets.TCPSocketLayer.ConnectThread () [0x00000] in <filename unknown>:0 >)
So in case you ever have this issue, then one solution is to set stripping to none. Alternatively you can start adding things to the link.xml file explained here:
http://unity3d.com/support/documentatio ... ation.html
Hopefully this saves someone half a day of debugging sometime
/Thomas