Failed to build IOS version in Unity 4.6.7f1

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
sunny
Posts: 19
Joined: 04 Aug 2014, 04:22

Failed to build IOS version in Unity 4.6.7f1

Post by sunny »

Hi,

We have error in building IOS version in Unity 4.6.7f1.
The smartfox client that we are using is Version 1.6.0 C# API (in Unity folder).

Some of the unity building settings:
Scripting Backend: IL2CPP
Architecture: Universal
Api Compatibility Level: .Net 2.0 Subset

The error message in unity console is:
Failed running /Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe -out
"/Users/xxx/Documents/unity/xxx/Temp/StagingArea/Data/Managed" -l none -c link -x
"/Applications/Unity/Unity.app/Contents/Frameworks/Tools/UnusedByteCodeStripper/native_link.xml" -f
"/Applications/Unity/Unity.app/Contents/Frameworks/il2cpp/LinkerDescriptors" -x
"/Users/xxx/Documents/unity/xxx/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x
"/Users/xxx/Documents/unity/xxx/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x
"/Users/xxx/Documents/unity/xxx/Assets/link.xml" -d
"/Users/xxx/Documents/unity/xxx/Temp/StagingArea/Data/Managed" -a
"/Users/xxx/Documents/unity/xxx/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a
"/Users/xxx/Documents/unity/xxx/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a
"/Users/xxx/Documents/unity/xxx/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" -a
...
"/Users/xxx/Documents/unity/xxx/Temp/StagingArea/Data/Managed/SmartFox2X.dll"

stdout;
Fatal error in Mono CIL Linker
System.Exception: Error processing method: 'System.Void WebSocketSharp.Net.HttpListenerAsyncResult::complete(WebSocketSharp.Net.HttpListenerAsyncResult)' in assembly:
'SmartFox2X.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Boolean System.Threading.ThreadPool::UnsafeQueueUserWorkItem(System.Threading.WaitCallback,System.Object)

at Mono.Linker.Steps.MarkStep.MarkMethod (Mono.Cecil.MethodReference reference) [0x00000] in <filename unknown>:0
at Mono.Linker.Steps.MarkStep.MarkInstruction (Mono.Cecil.Cil.Instruction instruction) [0x00000] in <filename unknown>:0
at Mono.Linker.Steps.MarkStep.MarkMethodBody (Mono.Cecil.Cil.MethodBody body) [0x00000] in <filename unknown>:0
at Mono.Linker.Steps.MarkStep.ProcessMethod (Mono.Cecil.MethodDefinition method) [0x00000] in <filename unknown>:0
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue () [0x00000] in <filename unknown>:0
at Mono.Linker.Steps.MarkStep.Process () [0x00000] in <filename unknown>:0
at Mono.Linker.Steps.MarkStep.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00000] in <filename unknown>:0
at Mono.Linker.Driver.Run () [0x00000] in <filename unknown>:0
at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver) [0x00000] in <filename unknown>:0
stderr:

UnityEngine.Debug:LogError(Object)
UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase)
UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String)
UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String, String, String&, String&, String, String, IEnumerable`1)
UnityEditorInternal.AssemblyStripper:Strip(String, String, String&, String&, String, String, IEnumerable`1)
UnityEditorInternal.AssemblyStripper:Strip(String[], String[], String, String, String&, String&, String, String, IEnumerable`1)
UnityEditorInternal.IL2CPPBuilder:RunAssemblyStripper(IEnumerable, String, String[], String[], String)
UnityEditorInternal.IL2CPPBuilder:StripAssemblies(String[], String)
UnityEditorInternal.IL2CPPBuilder:Run()
UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry)
UnityEditor.HostView:OnGUI()

Is this the problem related to Unity or SmartFox.dll?
Could you help us to solve it? Thanks.
Last edited by sunny on 04 Jul 2015, 04:26, edited 1 time in total.
User avatar
marsoups
Posts: 167
Joined: 14 Apr 2008, 03:30

Re: Failed to build IOS version in Unity 4.6.7f1

Post by marsoups »

I can advise that we're not having any issues with exporting the Smartfox.dll to iOS.in Unity with that same version.

I'd look at your other 3'rd party packages and perhaps turn them off until you find the culprit.
sunny
Posts: 19
Joined: 04 Aug 2014, 04:22

Re: Failed to build IOS version in Unity 4.6.7f1

Post by sunny »

but the error message points to "SmartFox2X.dll".

We can now only build it when setting Api Compatibility Level to ".Net 2.0", instead of ".Net 2.0 Subset".
However, this will make the game size a bit bigger.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Failed to build IOS version in Unity 4.6.7f1

Post by Lapo »

Hi,
yes that is the way to go. Other people have solved the same issue by switching the .Net Compatibility level.
Lapo
--
gotoAndPlay()
...addicted to flash games
sunny
Posts: 19
Joined: 04 Aug 2014, 04:22

Re: Failed to build IOS version in Unity 4.6.7f1

Post by sunny »

ic, changing the Compatibility level is the right way. Thanks.
Post Reply