Requirements
Package structure
- Swift
- Kotlin
- Flutter
- React Native
The SDK ships as a pre-compiled binary XCFramework via Swift Package Manager:
Import the module in your code with
import ShortKitSDK.Package installation
- Swift
- Kotlin
- Flutter
- React Native
- Expo
- Web
Option A: Xcode UI
1
Open your project in Xcode
Go to File then Add Package Dependencies.
2
Enter the repository URL
Paste the following URL into the search field:
3
Select your version rule
Choose Up to Next Major Version and set the minimum to
0.2.22. Click Add Package.4
Add to your target
Select the
ShortKitSDK library product and add it to your app target.Option B: Package.swift
Add ShortKit to your dependencies array:Package.swift
Package.swift
Verify installation
Build and run this minimal example to confirm the import resolves and the SDK initializes.- Swift (SwiftUI)
- Swift (UIKit)
- Kotlin
- Flutter
- React Native
- Expo
- Web (npm)
- Web (CDN)
App.swift
Troubleshooting
iOS: 'No such module ShortKitSDK'
iOS: 'No such module ShortKitSDK'
This means Xcode has not resolved the Swift Package dependency.
- Verify the package URL is exactly
https://github.com/shortkit/shortkit-ios - Go to File then Packages then Reset Package Caches
- Clean the build folder: Product then Clean Build Folder (Shift+Cmd+K)
- Close and reopen Xcode
- Confirm your deployment target is iOS 16.0 or higher in your project settings
iOS: Deployment target too low
iOS: Deployment target too low
ShortKit requires iOS 16.0 or later. If you see a build error referencing a minimum deployment target:
- Select your project in the Xcode navigator
- Under the General tab, set Minimum Deployments to iOS 16.0 or higher
- If you have multiple targets, update each one
iOS: XCFramework download fails or checksum mismatch
iOS: XCFramework download fails or checksum mismatch
ShortKitSDK is distributed as a pre-compiled XCFramework. If the download fails:
- Check your internet connection — the binary is downloaded from GitHub Releases
- Go to File then Packages then Reset Package Caches and resolve again
- If you see a checksum mismatch, ensure you are on the latest version of the package
Android: Dependency resolution failed
Android: Dependency resolution failed
If Gradle cannot resolve the ShortKit dependency:
- Confirm your project includes Maven Central in its repositories. Most new Android projects include it by default in
settings.gradle.kts. - Check your internet connection and any proxy configuration
- Run
./gradlew --refresh-dependenciesto clear the dependency cache - Confirm your
minSdkis 24 or higher
Android: Duplicate class errors
Android: Duplicate class errors
If you see duplicate class errors after adding ShortKit, another dependency in your project may include a conflicting version of a transitive dependency (e.g., Media3 or OkHttp).
- Run
./gradlew app:dependenciesto inspect the full dependency tree - Use Gradle’s
resolutionStrategyorconstraintsblock to force a consistent version
Flutter: 'shortkit_flutter' not found
Flutter: 'shortkit_flutter' not found
If
flutter pub get cannot resolve the package:- Verify the package name is exactly
shortkit_flutterin yourpubspec.yaml - Run
flutter pub cache repairto clear the cache - Ensure you are using Flutter 3.38 or later:
flutter --version
Flutter: iOS pod install fails
Flutter: iOS pod install fails
If
pod install fails after adding the Flutter package:- Confirm your
ios/Podfilehasplatform :ios, '16.0'or higher - Run
cd ios && pod install --repo-update - If you see a CocoaPods version error, update CocoaPods:
gem install cocoapods
React Native: Native module not linked
React Native: Native module not linked
If you see an error about
ShortKit not being found at runtime:- React Native CLI: Run
cd ios && pod installand rebuild - Verify autolinking is enabled (check
react-native.config.jsis not excluding the package) - Clear the Metro cache:
npx react-native start --reset-cache
Expo: Config plugin not applied / pod install fails
Expo: Config plugin not applied / pod install fails
If the native build fails after adding the package:
- Confirm
"@shortkitsdk/react-native"is in thepluginsarray in yourapp.jsonorapp.config.js - Run
npx expo prebuild --cleanto regenerate native projects from scratch - If using EAS Build, ensure
@shortkitsdk/react-nativeis listed in yourpackage.jsondependencies (not just devDependencies) - Clear the Metro cache:
npx expo start --clear
Web: ShortKit is not defined
Web: ShortKit is not defined
If you are using the CDN script tag and see
ShortKit is not defined:- Confirm the script tag loads before your code runs. Place it above your initialization script, or use the
deferattribute and initialize in aDOMContentLoadedlistener. - Check the browser console for network errors loading the script.
- Verify you are using
ShortKit(capital S, capital K) — the global is case-sensitive.
All platforms: Feed loads but shows no content
All platforms: Feed loads but shows no content
If the SDK initializes successfully but the feed is empty:
- Confirm you have uploaded at least one video to your ShortKit account. You can check in the Admin Portal under Content.
- Verify the video status is Ready (processing can take 1-2 minutes after upload)
- Check that you are using the correct API key for the environment where your content lives (
pk_live_...for production content,pk_test_...for test content)