Hello,
We have been trying to make GameCenter (Apple’s internal game service for multiplayer) to work with EOS. We got so far that everything seems to be correct but when trying to login with EOS_Connect_Login
it triggers the following error LogOnlineEOSSDK: Error: [EOS_SDK]: [LogEOSConnect]:Incompatible EOS_Connect_UserLoginInfo version specified (1225075024), expected range (1 to 2)
we are setting up the version using EOS_CONNECT_USERLOGININFO_API_LATEST
as stated on the docs but this issue is persistent. Just to be clear EOS_Connect_UserLoginInfo
is needed for the function as stated in the docs for Apple. We have also tried to set the value to 1 or 2 manually but the same error happens. I think the issue has to do with some lost of data when sending the values to the function. Any idea of what could be happening here?
The following code uses EOS SDK 1.16.0 and UE 4.25-Plus
void FOnlineIdentityEOS::ConnectLogin(int32 LocalUserNum, const FOnConnectLoginCompleteDelegate& Delegate, bool ForcePlatformToken)
{
// Code .....
std::string Token{ TCHAR_TO_UTF8(*PlatformToken) };
EOS_Connect_Credentials Credentials{};
Credentials.ApiVersion = EOS_CONNECT_CREDENTIALS_API_LATEST;
Credentials.Token = Token.c_str();
Credentials.Type = ConvertAuthType(PlatformTokenType);
EOS_Connect_LoginOptions Options{};
Options.ApiVersion = EOS_CONNECT_LOGIN_API_LATEST;
Options.Credentials = &Credentials;
#if PLATFORM_MAC
if(EOSSubsystem->UseGameCenterAuth())
{
EOS_Connect_UserLoginInfo UserLoginInfo{};
UserLoginInfo.ApiVersion = EOS_CONNECT_USERLOGININFO_API_LATEST;
UE_LOG_ONLINE_IDENTITY(Log, TEXT("[EOS] Connect login API version [%i]"), UserLoginInfo.ApiVersion);
IOnlineIdentityPtr OnlineIdentityInterface = IOnlineSubsystem::Get(MAC_SUBSYSTEM)->GetIdentityInterface();
if (OnlineIdentityInterface.IsValid())
{
FString PlayerNickName = OnlineIdentityInterface->GetPlayerNickname(LocalUserNum);
std::string DisplayName {TCHAR_TO_UTF8(*PlayerNickName)};
UserLoginInfo.DisplayName = DisplayName.c_str();
UE_LOG_ONLINE_IDENTITY(Log, TEXT("[EOS] Connect login setting display name [%s]"), UserLoginInfo.DisplayName);
}
else
{
UE_LOG_ONLINE_IDENTITY(Error, TEXT("[EOS] Connect login for user failed to get Online identity interface for Mac auth token"));
}
Options.UserLoginInfo = &UserLoginInfo;
}
else
{
Options.UserLoginInfo = nullptr;
}
#endif
UE_LOG_ONLINE_IDENTITY(Log, TEXT("[EOS] Connect login for user [%d]:[%s], using [%s] auth token"), LocalUserNum, *UserData->GetAccountIdString(), *PlatformTokenType);
CALL_COUNTER(TEXT("EOS_Connect_Login"));
EOS_Connect_Login(EOSConnectHandle, &Options, new FConnectLoginCallbackClientData(this, UserData, Credentials.Type, Delegate), OnConnectLoginCompleteCallback);
}
// More code ....