Installation & Setup
How to install the Nx10 SDK into your Xcode project and configure iOS permissions.
1. Swift Package Manager (SPM)
The Nx10 iOS SDK is distributed exclusively via Swift Package Manager to ensure minimal bloat, rapid compilation, and easy version control.
- Open your project in Xcode.
- Navigate to File > Add Package Dependencies...
- In the search bar, paste the repository URL:
https://github.com/nx10-devs/ios-sdk.git. - Set the Dependency Rule to Up to Next Major Version and click Add Package.
- Ensure the `Nx10Core` library is added to your main App Target.
2. Privacy & Permissions (Info.plist)
The Large Feelings Model (LFM) requires high-fidelity device motion data (Accelerometer and Gyroscope readings) to accurately calculate the Game Behaviour Index (GBI) and Brain Charge Index (BCI).
Apple strictly requires applications to declare why they are accessing Core Motion data. You must add the NSMotionUsageDescription key to your Info.plist file.
App Store Review Tip
Apple reviewers look closely at this string. It must clearly explain to the end-user how the data benefits them. We recommend a string similar to:
"We use device motion data to understand interface pacing and automatically optimize the app experience to your comfort level."
<key>NSMotionUsageDescription</key>
<string>We use device motion data to dynamically optimize the user experience and interface pacing.</string>3. Environment Management (API Keys)
When you sign up for Nx10, your Organisation is equipped with multiple Deployments in the Control Plane. You must keep your testing data separate from your live users to prevent polluting the LFM's predictive baselines.
It is highly recommended to use Xcode Build Configurations (e.g., DEBUG vs RELEASE) or environment-specific `.xcconfig` files to inject the correct API key.
import Foundation
struct Nx10Environment {
static var apiKey: String {
#if DEBUG
// Staging Deployment Key
return "sk_test_abc123..."
#else
// Production Deployment Key
return "sk_live_xyz789..."
#endif
}
}4. Adding the Keyboard Extension
Once your main Host App is configured with the iOS SDK, adding the Nx10 Keyboard Extension to your project takes less than 5 minutes.
You simply add a "Custom Keyboard Extension" target in Xcode, configure a shared App Group, and let the iOS SDK pass the authenticated session tokens directly to the keyboard sandbox.
View the Keyboard Setup Guide →