Search Unity

AOT Cross compiler failed: works on Android but not iOS

Discussion in 'Editor & General Support' started by Kaiser, Jan 5, 2012.

  1. Kaiser

    Kaiser

    Joined:
    Nov 30, 2011
    Posts:
    12
    Hello,

    We got alot of native code written in C++ which we build into an .so and then a C#-wrapper .dll ontop of it to use it in Unity. This works fine for Android.

    However when trying it for iOs it fails. The AOT Cross Compiler throws errors on our C# wrapper.

    It says "result file exists: false" I assume it cannot find wrapper_dotnet.dll... but I have placed it inside Plugins/iOS/, just like I placed it in Plugins/Android/ when compiling for android. Why is this?

    Cross compilation job wrapper_dotnet.dll failed.
    UnityEngine.UnityException: Failed AOT cross compiler: /Applications/Unity/Unity.app/Contents/BuildTargetTools/iPhonePlayer/mono-xcompiler --aot=full,asmonly,nodebug,ficall,static,outfile="wrapper_dotnet.dll.s" "wrapper_dotnet.dll" current dir : /Users/johanjons/Desktop/SVN/trunk/TestGame/Temp/StagingArea/Data/Managed
    result file exists: False
    stdout: Mono Ahead of Time compiler - compiling assembly /Users/johanjons/Desktop/SVN/trunk/TestGame/Temp/StagingArea/Data/Managed/wrapper_dotnet.dllThe class System.Configuration.ApplicationSettingsBase could not be loaded, used in System, Version=2.0.0.0, Culture=neutral,
     
  2. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Android does not require full AOT unlike iOS (its a security measure on iOS which Android does not have and does not need as Google does not check apps on the Market Place anyway thats why there are a whole host of malicious data stealing apps there), thats why it works on one side but not the other.

    Its generally a smart idea to first dev for iOS and then go to Android as iOS is more restrictive and apple more picky on whats acceptable and whats illegal usage of information than google which doesn't give a damn about its users security at all (its the 'windows' of mobile OS, the by far least secure one and unlike MS, google does not really give a damn about it otherwise they wouldn't accept that LG etc take 6 months to upgrade to Android 4 on their handsets)
     
  3. Ntero

    Ntero

    Joined:
    Apr 29, 2010
    Posts:
    1,436
    I placed my C# plugins in the Assets root on iOS and it worked, though I also recall just Assets/Plugins working as well.
    It can't find it in "/Users/johanjons/Desktop/SVN/trunk/TestGame/Temp/StagingArea/Data/Managed", which means it could not be copying it there correctly. Try placing the plugin in just Assets/ or Assets/Plugins/ and see if that helps at all.