As mentioned I’ve downloaded the EOS-SDK-CSharp-39599718-v1.17.0 SDK, which has C# bindings for Android, iOS, Windows, macOS and Linux. So far I’ve managed to get a cross-platform implementation working with both Windows and Android. I’m now hitting a callback issue with iOS.
- The PlatformInterface appears to be working correctly, so I know that the EOSSDK.framework etc is being loaded correctly.
- I can see that logging callbacks are hooked up and working, as I can hit that break-point in that callback and see, the following output:
[EPIC] Default Network Status: EOS_NS_Online
[EPIC] [Boot] EOSSDK Version 1.17.0-38100716 booting at 2025-03-23T10:55:35.657Z using C
[EPIC] [Boot] EOSSDK Platform Properties [OS=IOS/18.3.2, ClientId=x…, ProductId=9…, SandboxId=c…, DeploymentId=0…, ProductName=SomeGame ProductVersion=1.61, IsServer=false, Flags=None]
[EPIC] Start Session (User: …)
[EPIC] Overlay loaded and initialized
EPIC] Record Event: SDKOverlayComponent.Init <Redacted>
all the IDs etc redacted for obvious reasons ![]()
So when I try to login, the call definitely happens, but I never get the Web page pop-up to sign into my Epic acount, and therefore no call backs. My setup is:
var presentationContextProvider = new PresentationContextProviderToSharedKeyWindow();
IOSLoginOptions loginOptions = new IOSLoginOptions
{
Credentials = new IOSCredentials
{
Type = _loginCredentialType,
Id = loginCredentialId,
Token = loginCredentialToken,
SystemAuthCredentialsOptions = new IOSCredentialsSystemAuthCredentialsOptions
{
PresentationContextProviding = presentationContextProvider.Handle
},
},
ScopeFlags = AuthScopeFlags.BasicProfile,
};
_authInterface?.Login(ref loginOptions, null, onLoginCallBack);
where onLoginCallBack looks like:
private void onLoginCallBack(ref LoginCallbackInfo loginCallbackInfo)
{
if (loginCallbackInfo.ResultCode == Epic.OnlineServices.Result.Success)
{
System.Diagnostics.Debug.WriteLine("[EPIC] Login succeeded.");
_epicAccountId = loginCallbackInfo.LocalUserId;
// check ownership
if (_checkOwnsership)
CheckOwnership();
else
Login();
}
else
{
Fail("[EPIC] Failed to login: " + loginCallbackInfo.ResultCode, false);
}
}
the PresentationContextProviderToSharedKeyWindow class looks like this and it’s GetPresentationAnchor method, is never called by EOS:
private class PresentationContextProviderToSharedKeyWindow : NSObject, IASWebAuthenticationPresentationContextProviding
{
[Export("presentationAnchorForWebAuthenticationSession:")]
public UIWindow GetPresentationAnchor(ASWebAuthenticationSession session)
{
if (UIDevice.CurrentDevice.CheckSystemVersion(13, 0)
&& UIApplication.SharedApplication.ConnectedScenes != null)
{
foreach (var scene in UIApplication.SharedApplication.ConnectedScenes)
{
if (scene is UIWindowScene windowScene)
{
foreach (var window in windowScene.Windows)
{
if (window.IsKeyWindow)
{
return window;
}
}
}
}
}
else
{
// Fallback for earlier versions - Use KeyWindow
return UIApplication.SharedApplication.KeyWindow;
}
// If no key window is found, throw an exception or log an error
throw new InvalidOperationException("No key window found.");
}
}
I believe I followed everything mentioned in the iOS documentation. Can anyone spot what I might be missing? I feel I’m very close, but can’t see the woods for the trees right now ![]()