Using EOS SDK on iOS

How to implement EOS SDK in an iOS project using Xcode

2 mins to read

The Epic Online Services (EOS) SDK is integrated into an iOS project as a framework. This document will review how to add the framework into a project, and assumes that you are using Xcode 10.3.1.

Before implementing the SDK with iOS, be sure to review the general guidelines and references for platform implementation.

1. Project Setup

This guide assumes that you already have an iOS project set up in Xcode to link the SDK with. Apple's guide on Creating an Xcode Project for an App will walk you through the process of starting a new project if you do not already have one.

There are two requirements for developing with the EOS SDK:

  • You must disable bitcode for your project.
  • You need a connected device to run the project with the linked SDK.

This guide uses the initial file structure from a new Single View App project in Xcode 10.3.1.

SDK Framework

When you download the SDK from the Developer Portal, you should find the following framework files and file structure inside the downloaded zip:

EOSSDK.framework
- EOSSDK
- Headers
-eos_achievements_types.h
-info.plist
-Payload
-EOSSDK

2. Adding the Framework to the File Structure

Once you have downloaded the framework, we need to add it to the project. For this example, we have named our project "Test."

  1. Create a Frameworks directory in your project root folder in Finder.
Frameworks Directory

Click to enlarge image

  1. Copy the EOSSDK.framework file into Frameworks directory.
Adding the EOS SDK framework to the directory

Click to enlarge image

This will make the framework available to link to your project.

3. Linking the Framework to Your Project

  1. In Xcode, drag the framework from the Frameworks directory into Target > General > Frameworks, Libraries and Embedded Content.
Adding the framework to Frameworks, Libraries, and Embedded Content

Click to enlarge image

  1. Verify that the added framework's Target Membership is your app.
Verifying target membership for the framework.

Click to enlarge image

4. Embed Binaries

  1. Open the Embed Binary Target > General > Embedded Binaries dropdown menu, then select "+".

  2. Select the added EOSSDK framework.

Frameworks Directory

Click to enlarge image

The project will now have the EOSSDK.framework file embedded and linked.

Frameworks Directory

Click to enlarge image

5. Embed Dependencies

  1. Open the Embed Binary Target > General > Embedded Binaries dropdown menu, then select "+".

  2. Locate and add AuthenticationServices.framework.

Frameworks Directory

Click to enlarge image

Click to enlarge image

Framework Dependencies