Skip to main content

Overview

The Encore SDK is distributed as a private Swift Package. You’ll receive a GitHub Personal Access Token from the Encore team to authenticate and install the package.

Prerequisites: Obtain Access Credentials

You should have received the following from the Encore team:
  • Repository URL: https://github.com/EncoreKit/ios-sdk
  • Access Token: A GitHub Personal Access Token (starts with ghp_...)
Don’t have credentials? Contact us in your dedicated support channel.

Install via Swift Package Manager

Swift Package Manager is Apple’s official dependency manager integrated into Xcode.

Step 1: Add Package in Xcode

  1. In Xcode, select File ▸ Add Packages Dependencies…
  2. Paste the private repository URL:
    https://github.com/EncoreKit/ios-sdk
    
  3. Press Return or click the search icon
  4. When prompted for credentials, enter:
    • Username: encore-sdk (or any text - doesn’t matter)
    • Password: Paste the access token provided by Encore
    • Check “Remember my choice” to avoid re-entering

Step 2: Configure Dependency

With the encore-swift-sdk package selected:
  1. Set Dependency Rule to Up to Next Major Version
  2. Set the lower bound to 1.0.0
  3. Make sure your project is selected in Add to Project
  4. Click Add Package

Step 3: Add to Target

After the package resolves:
  1. Ensure Add to Target is set to your app’s name
  2. Click Add Package

Step 4: Verify Installation

You should now be able to import the SDK:
import Encore
✅ Installation complete!

Next Steps

Now that the SDK is installed, you’re ready to:

Advanced Topics

If you’re using continuous integration, you’ll need to configure authentication in your CI environment.GitHub ActionsAdd the Encore-provided access token as a repository secret:
  1. Go to your repository Settings → Secrets and variables → Actions
  2. Click New repository secret
  3. Name: ENCORE_GITHUB_TOKEN
  4. Value: The access token provided by Encore
  5. Add to your workflow YAML:
- name: Checkout code
  uses: actions/checkout@v3

- name: Configure Git credentials for Encore SDK
  run: |
    git config --global url."https://${{ secrets.ENCORE_GITHUB_TOKEN }}@github.com/EncoreKit/".insteadOf "https://github.com/EncoreKit/"

- name: Resolve Swift dependencies
  run: xcodebuild -resolvePackageDependencies -project YourApp.xcodeproj
Xcode Cloud
  1. Go to App Store Connect → Your App → Xcode Cloud
  2. Navigate to Settings → Environment
  3. Add a new secret environment variable:
    • Name: ENCORE_GITHUB_TOKEN
    • Value: The access token provided by Encore
  4. Create a custom build script in Xcode:
    1. Right-click on your project in Xcode
    2. Click New Group
    3. Name the group ci_scripts
    4. Right-click the ci_scripts group
    5. Click New Empty File
    6. Name the file ci_post_clone.sh
    7. Paste the following content in that file:
ci_post_clone.sh
#!/bin/sh
git config --global url."https://${ENCORE_GITHUB_TOKEN}@github.com/EncoreKit/".insteadOf "https://github.com/EncoreKit/"
Bitrise / CircleCI / Other CIAdd the token as an environment variable and configure Git:
# Add to your build script
git config --global url."https://${ENCORE_GITHUB_TOKEN}@github.com/EncoreKit/".insteadOf "https://github.com/EncoreKit/"

# Then run your build
xcodebuild -resolvePackageDependencies
To update to the latest version:
  1. In Xcode, select your project in the navigator
  2. Select the Package Dependencies tab
  3. Find encore-swift-sdk in the list
  4. Click the refresh button or right-click and select Update Package
Alternatively, set a specific version:
  1. Right-click encore-swift-sdk in Package Dependencies
  2. Select Update to Latest Package Versions or specify an exact version