Uinterface unkown typename for ios

I get these errors for every type of interface I have when trying to launch for ios.

error: expected class name

class UGEPlanetInterface : public UInterface

error: unknown type name 'UInterface'

error: constructor initializer 'Super' (aka 'int') does not name a class

This works perfectly in editor on mac and windows and works perfectly for launching to windows and mac. Am I doing something wrong ? Are UInterfaces not supported for ios ? Thanks in advanced

So I figured it out. I was having similar errors to this with just about every basic type like TSubClassOf. Apparently when compiling for ios, you must explicitly include everything you are using. I’m not sure why for windows or mac these #include’s aren’t needed but they are for ios. In case anyone comes across this the include for UInterface and TSubClassOf are

#include "Runtime/CoreUObject/Public/UObject/Interface.h"

and

#include "Runtime/Engine/Classes/Engine/StaticMesh.h"

2 Likes