Search Issue Tracker
Fixed in 5.3.5
[IL2CPP][iOS] Expected class name error when deploying to iOS device
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
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Variable is set to a different value from the selected enum value in the Editor dropdown
- TreeView Child display toggle styling becomes reversed when clicking and dragging it
- Null is returned when using FocusOutEvent.relatedTarget
- Unity_BaseInstanceID is always zero when rendering multiple meshes and instancing with the same buffer
- UI Document button's text does not resize relatively when size in percentage (%) is used
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.
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.
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
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.