Exception: Failed AOT cross compiling Mono.Security.dll

Hello,

I am trying to add into my project the System.Data.SqlClient; to manipulate a data base. Everything works perfect on the editor (I disabled the DB access on the sample attached) but when I try to generate a XCode project (Build Run) it gets me the following error:

The XCode project never gets created.
I attached a sample project that crashes 100%.
So please could someone from Unity have a look at this? I am using Unity Advanced 1.7.0f1 for iPhone.

I hope there is a solution :open_mouth:

441984–15358–$DBTest.zip (694 KB)

The editor does not have the iOS restrictions, especially not on unity iphone 1.x and is totally useless to test stuff thats in the System.* realm. Thats only testable in the build on the device.

As for the problem itself: failed to aot crosscompile errors like these normally indicate that you use stripping which strips something thats used.

Also in this case Unity iPhone 1.x might be related partially to what you use cause its mono 1.2.5 thats used there not mono 2.x

So what solution do you offer me? I cannot believe there is not a way to have SQL access into my code? I also tried with the Mono.Data.Sqlite; but I get the same error when generating the XCode project. Can this be related to the XCode version. I installed the last one that comes with iOS 4.2.1… I am lost :frowning:

The stripping level is set in the player settings (menu: Edit > Project Settings > Player). Check to see if stripping is disabled.