We have been trying to implement eos sdk for iOS, but it keeps failing to open the login window and throwserrors.com.epicgames.eos.auth.client_not_found
. Which is strange because the implementation works on other platforms (switch, xbox, playstation, pc). We are trying to have the login with eos account not with apple’s account (SIWA). The failure point seems to be after trying to login with EOS_Auth_Login
. And it fails opening the webpage for logging in.
var loginOptions = new LoginOptions() {
Credentials = new Credentials() {
Type = loginType,
ExternalType = service.ExternalCredentialType,
Id = id,
Token = service.AuthToken,
},
ScopeFlags = service.AuthScopeFlags
};
platformInterface.GetAuthInterface().Login(ref loginOptions, null, (ref LoginCallbackInfo loginCallbackInfo) => {
public void Login(ref LoginOptions options, object clientData, OnLoginCallback completionDelegate)
{
LoginOptionsInternal optionsInternal = new LoginOptionsInternal();
optionsInternal.Set(ref options);
var clientDataAddress = System.IntPtr.Zero;
var completionDelegateInternal = new OnLoginCallbackInternal(OnLoginCallbackInternalImplementation);
Helper.AddCallback(out clientDataAddress, clientData, completionDelegate, completionDelegateInternal);
Bindings.EOS_Auth_Login(InnerHandle, ref optionsInternal, clientDataAddress, completionDelegateInternal);
Helper.Dispose(ref optionsInternal);
}
The creation of platform interface and initialization works well without throwing any errors. This is the code for initialization:
Debug.Log("Initializing EOS...");
var initializeOptions = new InitializeOptions() { ProductName = settings.ProductName, ProductVersion = settings.ProductVersion };
var initializeResult = PlatformInterface.Initialize(ref initializeOptions);
if(initializeResult != Result.Success) {
LogEOSMessage(LogLevel.Fatal, $"Failed to initialize platform interface: {initializeResult}");
}
// The SDK outputs lots of information that is useful for debugging.
// Make sure to set up the logging interface as early as possible: after initializing.
LoggingInterface.SetLogLevel(LogCategory.AllCategories, settings.LogLevel);
LoggingInterface.SetCallback((ref LogMessage logMessage) => LogEOSMessage(logMessage.Level, $"[{logMessage.Category}] {logMessage.Message}"));
Debug.Log("Log level set.");
var editorFlag = DisableOverlay ? PlatformFlags.DisableOverlay : ServiceManager.Instance.Service.PlatformFlags;
var options = new Options() {
ProductId = settings.ProductId,
SandboxId = settings.SandboxId,
DeploymentId = settings.DeploymentId,
ClientCredentials = new ClientCredentials() {
ClientId = settings.ClientId,
ClientSecret = settings.ClientSecret
},
Flags = Application.isEditor ? editorFlag : ServiceManager.Instance.Service.PlatformFlags,
};
platformInterface = PlatformInterface.Create(ref options);
What could be the problem/problems with this approach? Is it a dashboard configuration issue or are there any specific things that need to be taken care of in code for iOS to work properly?
Any help and guidance is appreciated!
There was no application to select that fits perfectly for this topic so I’ve added Unreal Engine as the application.