Search Unity

ios build error

Discussion in 'Unity IAP' started by UDN_19fe4864-257d-4d79-8d81-a15260fd4f73, Dec 21, 2016.

  1. UDN_19fe4864-257d-4d79-8d81-a15260fd4f73

    UDN_19fe4864-257d-4d79-8d81-a15260fd4f73

    Joined:
    Nov 4, 2016
    Posts:
    2
    unity version : 5.5.0p2

    Android in-app payments work well.
    However, when I build the iOS platform after changing it, the following error occurs.


    Failed running /Applications/Unity/Unity.app/Contents/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe --api NET_2_0 -out "/Users/HyunzLife/private/LottoDay/LottoDay/Temp/StagingArea/Data/Managed/tempStrip" -l none -c link -b False -x "/Applications/Unity/PlaybackEngines/iOSSupport/Whitelists/Core.xml" -f "/Applications/Unity/Unity.app/Contents/il2cpp/LinkerDescriptors" -x "/Users/HyunzLife/private/LottoDay/LottoDay/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Users/HyunzLife/private/LottoDay/LottoDay/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/Users/HyunzLife/private/LottoDay/LottoDay/Temp/StagingArea/Data/preserved_derived_types.xml" -x "/Users/HyunzLife/private/LottoDay/LottoDay/Assets/link.xml" -d "/Users/HyunzLife/private/LottoDay/LottoDay/Temp/StagingArea/Data/Managed" -a "/Users/HyunzLife/private/LottoDay/LottoDay/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a "/Users/HyunzLife/private/LottoDay/LottoDay/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a "/Users/HyunzLife/private/LottoDay/LottoDay/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" -a "/Users/HyunzLife/private/LottoDay/LottoDay/Temp/StagingArea/Data/Managed/UnityEngine.Analytics.dll"

    stdout:
    SweepReport:
    Mono.Cecil.MethodDefinition => UnityEngine.Purchasing.AndroidStore get_androidStore()System.Void OnSetupFailed(System.String)System.Void OnProductsRetrieved(System.String)System.Void OnPurchaseSucceeded(System.String,System.String,System.String)System.Void OnPurchaseFailed(System.String)
    System.MonoType => Mono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinition
    Mono.Cecil.FieldDefinition => System.Boolean m_FailRefreshSystem.String NameSystem.Boolean restoreCalledSystem.String screenshotPathSystem.String pricingTemplateID
    Fatal error in Mono CIL Linker
    Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.RenderTexture
    at UnusedBytecodeStripper2.AddUnresolvedStubsStep.Process () <0x1042e15d0 + 0x002fd> in <filename unknown>:0
    at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) <0x1013bce70 + 0x0006b> in <filename unknown>:0
    at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) <0x1013e6080 + 0x000e6> in <filename unknown>:0
    at Mono.Linker.Driver.Run (IEqualityComparer`1 typeComparer, IEqualityComparer`1 methodComparer) <0x101299430 + 0x00be7> in <filename unknown>:0
    at Mono.Linker.Driver.RunDriverWithErrorHandling (Mono.Linker.Driver driver, IEqualityComparer`1 typeComparer, IEqualityComparer`1 methodComparer) <0x1012993e0 + 0x00026> in <filename unknown>:0
    at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver, IEqualityComparer`1 typeComparer, IEqualityComparer`1 methodComparer) <0x1012992f0 + 0x0003b> in <filename unknown>:0
    stderr:

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:96)
    UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:104)
    UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable`1, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:97)
    UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:196)
    UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:128)
    UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:123)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:32)
    UnityEditor.HostView:OnGUI()
     
  2. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    This looks like it might be a bug on the Unity side. Can you submit a bug report with this project? The key error message is:

    Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.RenderTexture

    Certainly the RenderTexture type should exist in the UnityEngine.dll assembly. So something is very wrong, although I'm not sure what it is.
     
  3. UDN_19fe4864-257d-4d79-8d81-a15260fd4f73

    UDN_19fe4864-257d-4d79-8d81-a15260fd4f73

    Joined:
    Nov 4, 2016
    Posts:
    2
    Thank you for your reply.
    I posted it on the Unity bug report.
     
  4. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    Can you let me know the bug report number? I'll make sure that it is routed to the proper team then.
     
  5. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    It looks like we have found the bug report now, thanks!
     
  6. johnryork

    johnryork

    Joined:
    Jan 18, 2015
    Posts:
    5
    I just upgraded my project from Unity 5.4.2 to 5.5 and upgrade the AWS SDK plugin and am now getting this same error:

    Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.RenderTexture

    Any way to work around?
     
  7. johnryork

    johnryork

    Joined:
    Jan 18, 2015
    Posts:
    5
    just tried the latest patch release 5.5.0.p3 which doesn't seem to help. Here's the full error:

    Failed running /Applications/Unity-5.5.0p3/Unity.app/Contents/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe --api NET_2_0_Subset -out "/Users/jyork/Documents/SpellBound-Core-Unity-5.5.0/Temp/StagingArea/Data/Managed/tempStrip" -l none -c link -b False -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/Core.xml" -f "/Applications/Unity-5.5.0p3/Unity.app/Contents/il2cpp/LinkerDescriptors" -x "/Users/jyork/Documents/SpellBound-Core-Unity-5.5.0/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Users/jyork/Documents/SpellBound-Core-Unity-5.5.0/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/Users/jyork/Documents/SpellBound-Core-Unity-5.5.0/Temp/StagingArea/Data/preserved_derived_types.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/AI.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/Animation.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/Audio.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/Cloth.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/Core.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/CrashReporting.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/IMGUI.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/JSONSerialize.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/ParticleSystem.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/ParticlesLegacy.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/Physics.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/Physics2D.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/Terrain.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/TerrainPhysics.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/TextRendering.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/UI.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/UNET.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/UnityAds.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/UnityAnalytics.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/UnityConnect.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/UnityWebRequest.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/VR.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/Vehicles.xml" -x "/Applications/Unity-5.5.0p3/PlaybackEngines/iOSSupport/Whitelists/Web.xml" -x "/Users/jyork/Documents/SpellBound-Core-Unity-5.5.0/Assets/link.xml" -d "/Users/jyork/Documents/SpellBound-Core-Unity-5.5.0/Temp/StagingArea/Data/Managed" -a "/Users/jyork/Documents/SpellBound-Core-Unity-5.5.0/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a "/Users/jyork/Documents/SpellBound-Core-Unity-5.5.0/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a "/Users/jyork/Documents/SpellBound-Core-Unity-5.5.0/Temp/StagingArea/Data/Managed/Assembly-UnityScript-firstpass.dll" -a "/Users/jyork/Documents/SpellBound-Core-Unity-5.5.0/Temp/StagingArea/Data/Managed/Assembly-UnityScript.dll" -a "/Users/jyork/Documents/SpellBound-Core-Unity-5.5.0/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" -a "/Users/jyork/Documents/SpellBound-Core-Unity-5.5.0/Temp/StagingArea/Data/Managed/UnityEngine.Analytics.dll" -a "/Users/jyork/Documents/SpellBound-Core-Unity-5.5.0/Temp/StagingArea/Data/Managed/GAF.dll"

    stdout:
    SweepReport:
    Mono.Cecil.MethodDefinition => System.Collections.Generic.Dictionary`2<System.String,System.String> get_CloneLogins()System.Void Clear()System.String[] get_CurrentLoginProviders()System.Boolean ContainsProvider(System.String)System.Void RemoveLogin(System.String)
    System.MonoType => Mono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinitionMono.Cecil.TypeDefinition
    Mono.Cecil.FieldDefinition => System.Collections.Generic.List`1<System.Object> annotationsSystem.EventHandler`1<System.Xml.Linq.XObjectChangeEventArgs> ChangingSystem.EventHandler`1<System.Xml.Linq.XObjectChangeEventArgs> ChangedSystem.String XmlnsNamespaceSystem.String DataArrayKey
    Fatal error in Mono CIL Linker
    Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.RenderTexture
    at UnusedBytecodeStripper2.AddUnresolvedStubsStep.Process () <0x10e5ef620 + 0x002fd> in <filename unknown>:0
    at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) <0x10d1422b0 + 0x0006b> in <filename unknown>:0
    at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) <0x10d141370 + 0x000e6> in <filename unknown>:0
    at Mono.Linker.Driver.Run (IEqualityComparer`1 typeComparer, IEqualityComparer`1 methodComparer) <0x10a1ac520 + 0x00be7> in <filename unknown>:0
    at Mono.Linker.Driver.RunDriverWithErrorHandling (Mono.Linker.Driver driver, IEqualityComparer`1 typeComparer, IEqualityComparer`1 methodComparer) <0x10a1ac4d0 + 0x00026> in <filename unknown>:0
    at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver, IEqualityComparer`1 typeComparer, IEqualityComparer`1 methodComparer) <0x10a1ac3e0 + 0x0003b> in <filename unknown>:0
    stderr:

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:96)
    UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:104)
    UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable`1, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:97)
    UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:196)
    UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:128)
    UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:123)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:32)
    UnityEditor.HostView:OnGUI()
     
  8. johnryork

    johnryork

    Joined:
    Jan 18, 2015
    Posts:
    5
    I'm set to IL2CPP, .NET 2.0 Subset. Strip Engine Code check or unchecked doesn't seem to matter.

    Why is it referencing the Mono linker if I'm set to IL2CPP? Is that expected?

    And why is it trying to strip byte code if I have that option disabled?
     
  9. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    @johnryork

    This bug has not yet been corrected. If possible, can you submit a bug report as well? Although the error looks the same, this might be slightly different than the issue reported by @UDN_19fe4864-257d-4d79-8d81-a15260fd4f73, so a separate bug report may help us track down the cause.

    Yes, the Mono linker is a general utility used to remove unused IL byte code from assemblies. Although its name can be misleading, it is independent of the script backend used.

    The IL2CPP scripting backend always strips unused byte code. The "Strip Engine Code" option only determine whether or not unused native code in the Unity engine should be removed. That option does not have an impact on the stripping of managed byte code.
     
  10. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    We have tracked down the cause of the issue reported by @UDN_19fe4864-257d-4d79-8d81-a15260fd4f73. It is a bug in the UnusedBytecodeStripper2, and we should have a fix in the 5.5.1p1 patch release if all goes well.

    It might be possible to work around the issue though. Some assembly in the project uses the UnityEngine.RenderTexture::generateMips property, which was renamed to autoGenerateMips in Unity 5.5. The API Updater will correctly make this change to the assembly, but in the bug report, the API Updater did not run on this assembly for an unknown reason. The assembly in this case was Vuforia.UnityExtensions.dll, but any assembly could be impacted.

    So, it is possible to work around this issue by ensuring that the API Updater has been run on all assemblies in the project. You can use ILSpy or ildasm to check the content of an assembly. Make sure an assembly does not reference UnityEngine.RenderTexture::generateMips after the API Updater modified it.
     
  11. kopanz

    kopanz

    Joined:
    Dec 6, 2016
    Posts:
    82
    I'm also experiencing similar error messages. Tried all scripting options Mono2x, IL2CPP, .NET 2.0, .NET 2.0 Subset, different Stripping Levels but none worked for iOS build on Unity 5.5.0f3. My project builds fine on Unity 5.4.3
     
  12. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    @kopanz

    I don't think any of those options will impact this issue. You'll need to wait for 5.5.1p1 to be released or have a look in the assemblies in your project as I mentioned above. Hopefully we should have this release with the fix available soon though.
     
    kopanz likes this.
  13. angelsm85

    angelsm85

    Joined:
    Oct 27, 2015
    Posts:
    63
    @JoshPeterson I have those errors in v5.6.b11 version when I compile in iOS platform. How can I fix it? Thanks in advance.

    Failed running /Applications/Unity56b11/Unity.app/Contents/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe --api NET_2_0_Subset -out "/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/Managed/tempStrip" -l none -c link -b true -x "/Applications/Unity56b11/PlaybackEngines/iOSSupport/Whitelists/Core.xml" -f "/Applications/Unity56b11/Unity.app/Contents/il2cpp/LinkerDescriptors" -x "/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x "/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/methods_pointedto_by_uievents.xml" -x "/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/preserved_derived_types.xml" -x "/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Assets/link.xml" -x "/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Assets/GameSparks/link.xml" -d "/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/Managed" -a "/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/Managed/Assembly-CSharp-firstpass.dll" -a "/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/Managed/Assembly-CSharp.dll" -a "/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/Managed/Assembly-UnityScript.dll" -a "/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/Managed/UnityEngine.UI.dll" -a "/Users/asm/Documents/proyectos/UNITY/GYMKHANA/FF_17_03_2017_ios_5-6/Temp/StagingArea/Data/Managed/ES2.dll"

    stdout:
    SweepReport:
    Mono.Cecil.MethodDefinition (12520) => System.Void .ctor(System.String,System.Object[]), System.Void Call(System.String,System.Object[]), FieldType Get(System.String), System.Void Set(System.String,FieldType), FieldType GetStatic(System.String), ...
    Mono.Cecil.TypeDefinition (2758) => UnityEngine.WeakListenerBindings, UnityEngine.UserAuthorization, UnityEngine.ApplicationInstallMode, UnityEngine.ApplicationSandboxType, UnityEngine.AssetBundleManifest, ...
    Mono.Cecil.FieldDefinition (1505) => AdvertisingIdentifierCallback OnAdvertisingIdentifierCallback, UnityEngine.Application/LogCallback modreq(System.Runtime.CompilerServices.IsVolatile) s_RegisterLogCallbackDeprecated, System.String unsupportedIdentifier, System.Byte kIsVisibleMask, System.Byte kDistanceMask, ...
    Fatal error in Mono CIL Linker
    System.ArgumentException: Member 'UnityEngine.AudioClip' is declared in another module and needs to be imported
    at Mono.Cecil.MetadataBuilder.LookupToken (Mono.Cecil.IMetadataTokenProvider provider) [0x00027] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.SignatureWriter.MakeTypeDefOrRefCodedRID (Mono.Cecil.TypeReference type) [0x00000] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.SignatureWriter.WriteTypeSignature (Mono.Cecil.TypeReference type) [0x00161] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.SignatureWriter.WriteMethodSignature (Mono.Cecil.IMethodSignature method) [0x00085] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.MetadataBuilder.GetMethodSignature (Mono.Cecil.IMethodSignature method) [0x00006] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.MetadataBuilder.AddMethod (Mono.Cecil.MethodDefinition method) [0x0003c] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.MetadataBuilder.AddMethods (Mono.Cecil.TypeDefinition type) [0x00013] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.MetadataBuilder.AddType (Mono.Cecil.TypeDefinition type) [0x000a2] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.MetadataBuilder.AddTypeDefs () [0x00018] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.MetadataBuilder.BuildTypes () [0x00014] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.MetadataBuilder.BuildModule () [0x0007e] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.MetadataBuilder.BuildMetadata () [0x00000] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.ModuleWriter+<>c.<BuildMetadata>b__1_0 (Mono.Cecil.MetadataBuilder builder, Mono.Cecil.MetadataReader _) [0x00000] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.ModuleDefinition.Read[TItem,TRet] (TItem item, System.Func`3[T1,T2,TResult] read) [0x00029] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.ModuleWriter.BuildMetadata (Mono.Cecil.ModuleDefinition module, Mono.Cecil.MetadataBuilder metadata) [0x0000f] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.ModuleWriter.WriteModuleTo (Mono.Cecil.ModuleDefinition module, System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) [0x000b7] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.ModuleDefinition.Write (System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) [0x00022] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.ModuleDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x0000a] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Cecil.AssemblyDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x00000] in <0304696c64424476882bed0a697f98eb>:0
    at Mono.Linker.Steps.OutputStep.OutputAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x0004d] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
    at Mono.Linker.Steps.OutputStep.ProcessAssembly (Mono.Cecil.AssemblyDefinition assembly) [0x00001] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
    at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) [0x00031] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
    at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00019] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
    at Mono.Linker.Driver.Run (System.Collections.Generic.IEqualityComparer`1[T] typeComparer, System.Collections.Generic.IEqualityComparer`1[T] methodComparer) [0x003e2] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
    at Mono.Linker.Driver.RunDriverWithErrorHandling (Mono.Linker.Driver driver, System.Collections.Generic.IEqualityComparer`1[T] typeComparer, System.Collections.Generic.IEqualityComparer`1[T] methodComparer) [0x00001] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
    at Mono.Linker.Driver.RunDriver (Mono.Linker.Driver driver, System.Collections.Generic.IEqualityComparer`1[T] typeComparer, System.Collections.Generic.IEqualityComparer`1[T] methodComparer) [0x00002] in <6b6a6b3d682b49c4a8b0c4f50e76a8a6>:0
    stderr:

    UnityEngine.Debug:LogError(Object)
    UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:96)
    UnityEditorInternal.AssemblyStripper:RunAssemblyLinker(IEnumerable`1, String&, String&, String, String) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:104)
    UnityEditorInternal.AssemblyStripper:StripAssembliesTo(String[], String[], String, String, String&, String&, String, IIl2CppPlatformProvider, IEnumerable`1) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:97)
    UnityEditorInternal.AssemblyStripper:RunAssemblyStripper(String, IEnumerable, String, String[], String[], String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:203)
    UnityEditorInternal.AssemblyStripper:StripAssemblies(String, IIl2CppPlatformProvider, RuntimeClassRegistry) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:128)
    UnityEditorInternal.IL2CPPBuilder:Run() (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:144)
    UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry, Boolean) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
    UnityEditor.HostView:OnGUI()

    And.....

    Exception: /Applications/Unity56b11/Unity.app/Contents/Tools/UnusedByteCodeStripper2/UnusedBytecodeStripper2.exe did not run properly!
    UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1 setupStartInfo) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildUtils.cs:98)
    UnityEditorInternal.AssemblyStripper.RunAssemblyLinker (IEnumerable`1 args, System.String& out, System.String& err, System.String linkerPath, System.String workingDirectory) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:104)
    UnityEditorInternal.AssemblyStripper.StripAssembliesTo (System.String[] assemblies, System.String[] searchDirs, System.String outputFolder, System.String workingDirectory, System.String& output, System.String& error, System.String linkerPath, IIl2CppPlatformProvider platformProvider, IEnumerable`1 additionalBlacklist) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:97)
    UnityEditorInternal.AssemblyStripper.RunAssemblyStripper (System.String stagingAreaData, IEnumerable assemblies, System.String managedAssemblyFolderPath, System.String[] assembliesToStrip, System.String[] searchDirs, System.String monoLinkerPath, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:203)
    UnityEditorInternal.AssemblyStripper.StripAssemblies (System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, UnityEditor.RuntimeClassRegistry rcr) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/AssemblyStripper.cs:128)
    UnityEditorInternal.IL2CPPBuilder.Run () (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:144)
    UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action`1 modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry, Boolean debugBuild) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/Il2Cpp/IL2CPPUtils.cs:34)
    UnityEditor.iOS.PostProcessiPhonePlayer.CrossCompileManagedDlls (BuildSettings bs, UnityEditor.iOS.ProjectPaths paths, UnityEditor.AssemblyReferenceChecker checker, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport buildReport) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:740)
    UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (BuildSettings bs, UnityEditor.iOS.ProjectPaths paths, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport buildReport) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:557)
    UnityEditor.iOS.PostProcessiPhonePlayer.PostProcess (PostProcessorSettings postProcessorSettings, BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/BuildPostProcessor.cs:521)
    UnityEditor.iOS.iOSBuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at /Users/builduser/buildslave/unity/build/PlatformDependent/iPhonePlayer/Extensions/Common/ExtensionModule.cs:34)
    UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:186)
    UnityEditor.HostView:OnGUI()
     
  14. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    @angelsm85

    It looks like this might be a slightly different issue. I've not seen this before that I can recall. You could try to reimport any managed assemblies in the project to ensure that they have been updated via the API Updater. If that does not work, I would recommend submitting a bug report on this issue.

    Does the same project work with Unity 5.5? It might be a new problem in 5.6.
     
  15. angelsm85

    angelsm85

    Joined:
    Oct 27, 2015
    Posts:
    63
    Yes, in v5.5 all was fine
     
  16. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    @angelsm85

    Please submit a bug report with this project if possible. This is definitely something we want to correct soon.
     
  17. angelsm85

    angelsm85

    Joined:
    Oct 27, 2015
    Posts:
    63
    The errors happen with this settings:

    Scripting Backend: IL2CPP
    Api Compatibility Level: .Net 2.0 Subset
    Strip Engine Code: ON

    When I change to Mono2x on Scripting Backend and Strip Byte Code on Strippping Level , it doesn't appear errors.
     
  18. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    @angelsm85

    That makes sense, as the Mono scripting backend uses a different managed code stripping utility than IL2CPP.
     
  19. angelsm85

    angelsm85

    Joined:
    Oct 27, 2015
    Posts:
    63
    Do I submit a bug report? My game is a big archive to send it...
     
  20. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    @angelsm85

    Yes, please submit a bug report. If the game is too big to attach, just mentioned that in the bug report, and we will communicate with you via the bug report about a different way to get the project. Also, please let me know the bug report number when you get it, so that I track it down properly.
     
  21. angelsm85

    angelsm85

    Joined:
    Oct 27, 2015
    Posts:
    63
    This is the bug report number: (Case 893519) Unity v5.6.b11: Errors when compile in iOS platform
    Thank you!
     
  22. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    @angelsm85

    Thanks, we will be contacting you soon!
     
  23. IonRift

    IonRift

    Joined:
    Jan 14, 2013
    Posts:
    16
    Similar issue (Case 939590)

    Latest unity 2017.x, latest xcode
    Clean project, empty test scene.
    import Unity IAP from services panel
    Send it to be cloud built and it fails on iOS

    Code (CSharp):
    1. 2993: [Unity] Fatal error in Unity CIL Linker
    2. 2994: [Unity] Mono.Cecil.ResolutionException: Failed to resolve UnityEngine.XR.XRSettings
    3. 2995: [Unity]   at UnityLinker.AddUnresolvedStubsStep.Process () [0x000ab] in <8faa3831367147a5b4f1efc161d11bdf>:0
    4. 2996: [Unity]   at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) [0x00018] in <114d8887b0b545308ed79d49a500b4cd>:0
    5. 2997: [Unity]   at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x00025] in <114d8887b0b545308ed79d49a500b4cd>:0
    6. 2998: [Unity]   at UnityLinker.UnityDriver.Run () [0x00087] in <8faa3831367147a5b4f1efc161d11bdf>:0
    7. 2999: [Unity]   at UnityLinker.UnityDriver.RunDriverWithoutErrorHandling () [0x00001] in <8faa3831367147a5b4f1efc161d11bdf>:0
    8. 3000: [Unity]   at UnityLinker.UnityDriver.RunDriver () [0x00002] in <8faa3831367147a5b4f1efc161d11bdf>:0
    I don't have any UnityEngine.XR.XRSettings afaik
     
  24. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    @IonRift

    Does this issue happen with a local build as well? Or is it just on Unity Cloud Build?
     
  25. IonRift

    IonRift

    Joined:
    Jan 14, 2013
    Posts:
    16
    @JoshPeterson I don't have access to a mac, so cannot verify - android builds though.
     
  26. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    @IonRift

    It is probably worth submitting a bug report, if possible. I'm not sure where the cause of the problem is then.
     
  27. IonRift

    IonRift

    Joined:
    Jan 14, 2013
    Posts:
    16
    @JoshPeterson Thanks for the help.
    I believe I have done so (Case 939590)
    or should I do something else in addition?
     
  28. JoshPeterson

    JoshPeterson

    Unity Technologies

    Joined:
    Jul 21, 2014
    Posts:
    6,938
    @IonRift

    No, sorry. I missed this in your original post.