Search Issue Tracker

Fixed in 5.3.5

Votes

17

Found in

5.3.4p1

Issue ID

782688

Regression

Yes

[IL2CPP][iOS] Expected class name error when deploying to iOS device

IL2CPP

-

To reproduce:
1. Open attached project
2. Build for iOS
3. Try to deploy to iOS device using Xcode

Actual behavior: failed deployment and errors in Xcode
Classes/Native/AssemblyU2DCSharp_LongPressGesture2876118082.h:34:64: Expected class name
Classes/Native/AssemblyU2DCSharp_SwipeGesture529355983.h:85:59: Expected class name

Reproducible with: 5.3.4p1, 5.4.0b12
Not reproducible with: 5.3.2f1

Comments (4)

  1. SungchulPark

    Mar 29, 2016 07:32

    As you mentioned, the class in which the error is happening has [StructLayout(LayoutKind.Sequential)] attribute.

    Thank you for your fix.

  2. JoshPeterson

    Mar 28, 2016 16:15

    Thanks for commenting on this issue. We have corrected it, and the fix should be available in the 5.3.4p2 release. There is a work around for the problem though.

    This bug occurs when a class in C# has the [StructLayout(LayoutKind.Sequential)] attribute, but its base class does not have that attribute. If the attribute is removed from the derived class, this error will not occur. In some cases the attribute may be necessary, as it is often used for types that need to be marshaled to native code. If a base class it not marshaled though, often the derived will also not be marshaled either, and this attribute can be removed.

  3. SungchulPark

    Mar 28, 2016 01:24

    This happens like below.

    AssemblyU2DCSharp_Scaleform_KeyEvent3433386805.h:74:56: error: expected class name
    struct KeyEvent_t3433386805_marshaled_pinvoke : public SFEvent_t1316346785_marshaled_pinvoke

    AssemblyU2DCSharp_Scaleform_KeyEvent3433386805.h:82:52: error: expected class name
    struct KeyEvent_t3433386805_marshaled_com : public SFEvent_t1316346785_marshaled_com

  4. asdagdsgsag

    Mar 28, 2016 01:17

    It's not been tested on 5.3.4p1, but exactly the same issue happens in 5.3.4f1 in my case.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.