I’m trying to build my code for the iPad for the first time. When I select Build and Run, I get the following error:
Exception: Error building Player: SystemException: System.Net.Sockets are supported only on Unity iPhone Advanced. Referenced from assembly ‘Mono.Data.Tds’. UnityEditor.BuildPlayerWindow.BuildPlayerWithDefaultSettings (Boolean askForBuildLocation, BuildOptions forceOptions) UnityEditor.BuildPlayerWindow.BuildPlayerAndRun ()
However, I am not using System.Net.Sockets. I am using a .NET 2.0 build of http://JSON.NET and some System.Linq.Xml code, but nothing related to sockets at all. This code runs fine on Windows, Android and Mac, but fails to build for iOS. What is going wrong here?
You are not explicitely using sockets, thats correct.
But unhappily that does not imply that the assemblies you are using don’t use them as most of them were written for MS.NET where all these things are granted to be present and avaialble.
the interesting thing is that it works on android … are you owning Android Pro?
Beecause if not it might potentially be indirectly related to something totally different thats just not possible (json.net uses a lot of system.runtime.reflection which has impacting limitations on AOT)
Thanks for those recommendations. I’ll investigate and see if I can get the error resolved. Do you personally have a preference between those two libraries? or any positive/negative experiences with one or the other.
Not really but I also did never use automagic reflection with either of the two I should say, so if thats a requirement for you, you might want to test if they fullfill that needs
It is quite strange. I get this same error but the exactly same build runs on my Basic Android License. Can someone try to clarify the reason why. My Unity3D is 3.4.2f3 by the way (running on Mac OSX 10.7.3)