UE4.20 compile fail on iOS

Hiya,

I'm trying the UE4 demo project using the Mac and iOS SDKs (v4.1.11.1)

I can build for Mac and everything runs fine. But when building to iOS, I get a compile fail error everywhere there's a conversion to FString. E.g. FString(joinedRoomName.cstr())

Note that this does not happen when using UE4.19. It only happens when using UE4.20 and building to iOS.

======================================
Here's one of the errors (they are all the same):

error: no matching conversion for functional-style cast from 'const EG_CHAR *' (aka 'const wchar_t *') to 'FString'

note: candidate constructor not viable: no known conversion from 'const EG_CHAR *' (aka 'const wchar_t *') to 'FString' for 1st argument
LogPlayLevel: FString(FString&&) = default;

note: candidate constructor not viable: no known conversion from 'const EG_CHAR *' (aka 'const wchar_t *') to 'const FString' for 1st argument
LogPlayLevel: FString(const FString&) = default;

note: candidate constructor not viable: no known conversion from 'const EG_CHAR *' (aka 'const wchar_t *') to 'const NSString *' for 1st argument
LogPlayLevel: FORCEINLINE FString(const NSString* In)

note: candidate template ignored: substitution failure [with CharType = wchar_t]: no type named 'Type' in 'TEnableIf'
LogPlayLevel: FORCEINLINE FString(const CharType* Src)

note: candidate constructor not viable: requires 0 arguments, but 1 was provided
LogPlayLevel: FString() = default;

note: candidate constructor not viable: requires 2 arguments, but 1 was provided
LogPlayLevel: FORCEINLINE FString(const FString& Other, int32 ExtraSlack)

note: candidate constructor not viable: requires 2 arguments, but 1 was provided
LogPlayLevel: FORCEINLINE FString(FString&& Other, int32 ExtraSlack)

note: candidate constructor not viable: requires 2 arguments, but 1 was provided
LogPlayLevel: FORCEINLINE explicit FString( int32 InCount, const TCHAR* InSrc )

Best Answer

Answers

  • Thanks for the detailed response!

    I had used FString::Printf(TEXT("%s"), aJString.cstr()) as a hacky workaround. But I'll get the updated demo as you suggested.

    Thanks again.