Skip to main content

Getting Started

Requirements

  • iOS 15.0 or newer.
  • Xcode with Swift Package Manager support.
  • Access to the private Genies package repository.
  • For private binary packages, GitHub API asset download access through ~/.netrc.

Install

The Genies NAFKit iOS SDK is published on GitHub Packages and can be installed using the Swift Package Manager (SPM) or with CocoaPods.

SPM Install

Add the Genies Partner SDK package using the URL and version provided by Genies.

External partner package, when promoted:

git@github.com:genies-sdk/geniespartnersdk-ios.git
Exact Version: <version-provided-by-genies>
Product: GeniesPartnerSDK

Example XcodeGen shape:

packages:
GeniesPartnerSDK:
url: git@github.com:geniesinc/geniespartnersdk-ios.git
exactVersion: 0.1.14

Add the Auth product to your app target:

dependencies:
- package: GeniesPartnerSDK
product: GeniesPartnerSDK

The package alias can be singular, but the current published Swift product name is GeniesPartnerSDK.

Private package resolution uses SSH for the package repository clone and HTTPS for the hosted binary download. Configure GitHub's SSH host key and ~/.netrc before resolving:

machine api.github.com
login x-access-token
password <PAT-with-package-repo-access>
chmod 600 ~/.netrc
mkdir -p ~/.ssh
ssh-keygen -F github.com >/dev/null || ssh-keyscan github.com >> ~/.ssh/known_hosts

If Genies provided a private SSH key for package access, install it before opening Xcode:

mkdir -p ~/.ssh
cp <provided-key-file> ~/.ssh/genies_partner_sdk
chmod 600 ~/.ssh/genies_partner_sdk
ssh-add --apple-use-keychain ~/.ssh/genies_partner_sdk

If that key is not your default GitHub identity, add it to ~/.ssh/config:

Host github.com
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/genies_partner_sdk

Verify access before opening Xcode:

ssh -T git@github.com
git ls-remote git@github.com:geniesinc/geniespartnersdk-ios.git HEAD
git ls-remote git@github.com:genies-sdk/geniesnafsdk-ios.git HEAD

ssh -T should authenticate and then say GitHub does not provide shell access. When the SSH key, GitHub host key, and ~/.netrc are configured before Xcode starts resolving packages, Xcode should not need a restart. Restart only if Xcode already cached a failed package graph or stale credentials.

Command-line package resolution can make Xcode use system Git/SSH and netrc:

xcodebuild -resolvePackageDependencies \
-project YourApp.xcodeproj \
-scheme YourApp \
-scmProvider system \
-packageAuthorizationProvider netrc

If your simulator build targets an Intel simulator architecture but the package provided by Genies contains only arm64 simulator slices, exclude x86_64 for simulator builds:

settings:
base:
"EXCLUDED_ARCHS[sdk=iphonesimulator*]": x86_64

CocoaPods Install

CocoaPods is supported as an alternative to Swift Package Manager. It uses the same ~/.netrc credential documented above (the hosted XCFramework is downloaded over HTTPS from the GitHub API asset URL), plus SSH access to the Genies specs index and the NAFKit dist repo.

Podfile:

source 'git@github.com:genies-sdk/genies-podspecs.git'
source 'https://cdn.cocoapods.org/'
platform :ios, '15.0'
use_frameworks!

target 'YourApp' do
pod 'GeniesPartnerSDK', '~> <version-provided-by-genies>' # pulls NAFKit transitively
end

Then:

pod install

Notes:

  • use_frameworks! is required (the NAFKit UI layer ships dynamic frameworks).
  • The podspec already excludes x86_64 for simulator builds, so no post_install hook is needed for the arm64-only simulator slices.
  • The hosted-binary download is authenticated by ~/.netrc (the same entry as the SwiftPM setup above); no token is embedded in the podspec.