Once installed, you will be ready to initialize the SDK and register customers.
1. Requirements
Your project must meet the following minimum requirements:- iOS Version: 12.0+
- Xcode: 12.0+
- Swift: 5.0+
- Package Manager: Swift Package Manager (SPM)
2. Checklist Before Installation
Before installing the SDK, ensure you have:- A Gameball Project Key from your Dashboard
- Selected your environment (sandbox recommended for testing)
- A valid bundle identifier for iOS
- A unique player identifier strategy (user ID, email, UUID, etc.)
- Swift Package Manager enabled in your project
3. Install the SDK
Install the SDK via Swift Package Manager. In Xcode:- Go to File → Add Packages
- Enter the repository URL:
- Select Version 3.1.1 (or Up to Next Major)
- Click Add Package
4. Import the SDK
In any Swift file where you plan to use Gameball:5. Verify Installation
Build your project to confirm the SDK was added successfully.Using Xcode
Using terminal
If your build succeeds, you are ready to initialize the SDK.
6. Next Steps
Proceed with:- Initialize SDK Connect your app to Gameball using your API key and (optionally) Session Token.
- Initialize Customer Profile Register and identify your player.
7. Troubleshooting
Below are common installation issues and fixes.Problem: “No such module ‘Gameball’”
Fixes:- Product → Clean Build Folder (⇧⌘K)
- Xcode → File → Packages → Reset Package Caches
- Verify the package is added to your target
- Restart Xcode
Problem: Deployment target or API availability warnings
Fixes:- Ensure iOS 12.0+ minimum deployment target
- Update Info.plist if needed
- Ensure Xcode 12+ and Swift 5.0+
Problem: dyld or framework loading errors
Fixes:- Run pod install
- Remove/re-add the SPM package
- Delete DerivedData:
Problem: Package dependency not resolving
Fixes:- Confirm you selected 3.1.1 (or newer) in the package dialog
- Remove and re-add the package in Xcode
- Verify network connectivity to GitHub
8. Debug Logging
The SDK includes built-in debug logging visible in Xcode’s console. Filter logs by typing:- Initialization
- Network
- Events
- Profile