# Auth Login Callbacks not firing on iOS (EOS-SDK-CSharp-39599718-v1.17.0), but same callback fire on Android and Windows... 

**URL:** <https://forums.unrealengine.com/t/auth-login-callbacks-not-firing-on-ios-eos-sdk-csharp-39599718-v1-17-0-but-same-callback-fire-on-android-and-windows/2858270>\
**Category:** Multiplayer\
**Tags:** epic-online-services, question\
**Created:** [March 23, 2025, 11:35am UTC](https://forums.unrealengine.com/t/auth-login-callbacks-not-firing-on-ios-eos-sdk-csharp-39599718-v1-17-0-but-same-callback-fire-on-android-and-windows/2858270 "2025-03-23T11:35:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [March 23, 2025, 11:35am UTC](https://forums.unrealengine.com/t/auth-login-callbacks-not-firing-on-ios-eos-sdk-csharp-39599718-v1-17-0-but-same-callback-fire-on-android-and-windows/2858270/1 "2025-03-23T11:35:50Z")

</div>

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.

1. The PlatformInterface appears to be working correctly, so I know that the EOSSDK.framework etc is being loaded correctly.
2. 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:

```auto
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:

```auto
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 🙂

---

<div class="post-metadata">

**Author:** ![jamesherd](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jamesherd](https://forums.unrealengine.com/u/jamesherd)\
**Post date:** [May 2, 2025, 4:20pm UTC](https://forums.unrealengine.com/t/auth-login-callbacks-not-firing-on-ios-eos-sdk-csharp-39599718-v1-17-0-but-same-callback-fire-on-android-and-windows/2858270/2 "2025-05-02T16:20:16Z")

</div>

Hi, there are some unique issues to be aware of when using the SDK on macOS and iOS. If you’re seeing problems with callbacks, I would ask you to check that you’re using the CoreFoundation run loop. I’ve included a mac example below, but this should be very similar for iOS.

// MAC EXAMPLE

// Instead of:

while (true) {

EOS\_Platform\_Tick(platformInterface);

}

// You should use something like:

while (CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.1, true)) {

EOS\_Platform\_Tick(platformInterface);

}

// Or, this:

while ([[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.05]]) {

EOS\_Platform\_Tick(platformInterface);

}

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [June 3, 2025, 5:16pm UTC](https://forums.unrealengine.com/t/auth-login-callbacks-not-firing-on-ios-eos-sdk-csharp-39599718-v1-17-0-but-same-callback-fire-on-android-and-windows/2858270/3 "2025-06-03T17:16:18Z")

</div>

Thanks James, I’ll be giving this a try.
