Skip to main content

Authenticating with Apple (iOS)

To enable "Sign in with Apple" authentication, you need to be using a source-based version of the plugin and a source-based version of Unreal Engine, compile it with SIWA support, and then configure your application for Apple authentication.

Switch to using source code

If you have not done so already, switch to using a source-based version of the plugin by following the instructions on the Welcome page.

Compile the engine with "Sign in with Apple" support

Unreal Engine 4.26 and 4.27 by default target an iOS minimum version of 12.0. Sign in with Apple wasn't available until iOS 13.0, which means that these versions of Unreal Engine by default do not support it.

You can enable it by setting MinimumiOSVersion=IOS_13 but this needs to be done at an engine level (not a project level), which means recompiling Unreal Engine. Versions of Unreal Engine installed from the launcher also do not have SIWA support.

Unreal Engine 5 targets 13.0 by default, so for Unreal Engine 5 you can skip to Enable SIWA support in your project.

Change the minimum iOS version in BaseEngine.ini

Locate the Engine/Config/BaseEngine.ini file for the source-based version of Unreal Engine you are using.

Change:

MinimumiOSVersion=IOS_12

to:

MinimumiOSVersion=IOS_13
bEnableSignInWithAppleSupport=True

Note the addition of bEnableSignInWithAppleSupport=True as well.

Build Unreal Engine from source

Now, build Unreal Engine.

If you are compiling your project against a source-based version of the engine, ensure it rebuilds the OnlineSubsystemApple module. This is the module that needs to recompile to enable SIWA support.

If you are building an installed version of the engine to distribute to other team members, you shouldn't need to do anything other than build the engine.

Enable SIWA support in your project

Once Unreal Engine has been built, you also need to enable SIWA support at the project level. Open IOSEngine.ini (not DefaultEngine.ini) and add:

[/Script/IOSRuntimeSettings.IOSRuntimeSettings]
bEnableSignInWithAppleSupport=True

Build your project and ensure the iOS minimum version is correct

If you have correctly built Unreal Engine with a minimum iOS version of 13, then you should see the following emitted when your project builds with EOS:

EOSSDK (IOS): Using AuthenticationServices framework because this project is targeting iOS 13
EOSSDK (IOS): Enabling PresentationContext code as this project is targeting iOS 13
Compiling against OS Version 13.0 [minimum allowed at runtime]

If instead you see it compiling against OS Version 12.0, then you haven't configured and built Unreal Engine properly, and you need to return to the previous step.

danger

Do not try to set the minimum iOS version at the project level or via Project Settings. It will appear to compile for 13.0, but the necessary engine support will be missing at runtime.

Set up your application in the Apple Developer portal

It is assumed that you already have an identifier set up for your application in the Apple Developer portal, as this is a prerequisite for iOS development.

  1. Locate your App ID on the Certificates, Identifiers & Profiles page.
  2. Note the "Identifier" for your App; you will need this for the Epic Games Developer portal in a moment.
  3. Click on the App ID you want to set up.
  4. Scroll down to "Sign In with Apple" and click the checkbox next to it.
  5. Click "Save" in the top right.

Set up Apple authentication in the Epic Games Dev Portal

  1. Open the Epic Games Dev Portal.
  2. Navigate to your product.
  3. Click "Product Settings".
  4. Under the "Identity Providers" tab, click "Add Identity Provider".
  5. Select "Apple" as the identity provider.
  6. Set the "Description" to any value you like.
  7. Set the "Client ID" to your iOS app identifier that you noted down from the previous steps.
  8. Click "Save & Exit".
  9. Under the "Environments" tab, click "Identity Providers" next to the Live sandbox.
  10. For Apple, select the new credential you just made.

Enable the Apple online subsystem in your game

In your IOSEngine.ini file, you need to add the following settings:

[OnlineSubsystemApple]
bEnabled=True

Use Apple authentication at runtime

The Default authentication graph will automatically use Apple authentication if the game is launched on iOS.

If you specifically want to use Apple authentication, you can set the authentication graph in Project Settings to "Apple Only", or set it in a platform-specific INI file with:

[EpicOnlineServices]
AuthenticationGraph=Apple

Testing Apple authentication

To test Apple authentication, launch your game on an iOS device and sign in.