I have not fixed it yes but I speculated that I cannot build C# .dlls into an iPhone build. So I stripped out everything that I needed from the EMGU wrapper and now I get this error:
Error building Player: UnityException: Failed AOT cross compiler: /Applications/Unity/Unity.app/Contents/BuildTargetTools/iPhonePlayer/mono-xcompiler --aot=full,asmonly,nodebug,ficall,static,outfile=“Mono.WebBrowser.dll.s” “Mono.WebBrowser.dll” current dir : /Users/charlieprouse/Desktop/Test Projects/iPhone Input Backup/Temp/StagingArea/Data/Managed std=
output:
result file exists: False
UnityEditor.HostView:OnGUI()
Exception: Error building Player: UnityException: Failed AOT cross compiler: /Applications/Unity/Unity.app/Contents/BuildTargetTools/iPhonePlayer/mono-xcompiler --aot=full,asmonly,nodebug,ficall,static,outfile=“Mono.WebBrowser.dll.s” “Mono.WebBrowser.dll” current dir : /Users/charlieprouse/Desktop/Test Projects/iPhone Input Backup/Temp/StagingArea/Data/Managed std=
output:
result file exists: False
UnityEditor.BuildPlayerWindow.BuildPlayerWithDefaultSettings (Boolean askForBuildLocation, BuildOptions forceOptions)
UnityEditor.BuildPlayerWindow.GUIBuildButtons (Boolean enableBuildButton, Boolean enableBuildAndRunButton, Boolean canInstallInBuildFolder)
UnityEditor.BuildPlayerWindow.ShowBuildTargetSettings ()
UnityEditor.BuildPlayerWindow.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[ ] parameters, System.Globalization.CultureInfo culture)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[ ] parameters)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj)
UnityEditor.HostView.Invoke (System.String methodName)
UnityEditor.HostView.OnGUI ()
I have moved on temporarily, when I return to it I will update this thread with my findings.
But you can not crosscompile Desktop OS library bound stuff (Mono.xxx more or less is with native code to os bridges) on iOS where it logically is not present.
generally any assembly that uses native code bridges has a good chance to fail as the native code is then either expected to be windows unmanaged dll or an osx bundle / so file, nothing that exists on iOS at all
Also had the AOT Cross Compiler error (when building for iOS).
Turned out that the error wasn’t about the generics, but about the obsolete stuff contained within the DLL. To be more concrete, the DLL was made with Unity 3.x and it referenced the WWW.audioClip property - and this property doesn’t exist in Unity 4.x anymore.
So, you should always check for which Unity version (3.5.x, 4.x etc.) the DLL was being built!