Getting Started
Requirements
- Minimum Flutter Version: 1.17.0
- Dart: 3.4.4+
- Android: API level 24+ (Android 7.0)
- iOS: iOS 15.0+
Upgrading from v3? Version 4.0.0 raises the minimum versions to iOS 15.0 and Android API 24. Every v3 call works unchanged. See Migration Notes.
Install the SDK
Add the dependency to yourpubspec.yaml:
iOS Setup
Make sure your iOS deployment target is at least 15.0. In yourios/Podfile:
IPHONEOS_DEPLOYMENT_TARGET to 15.0 for the Runner target in Xcode as well.
Run:
After updating the Podfile, run
pod install to ensure all iOS dependencies are properly configured.Android Setup
EnsureINTERNET permission is declared in AndroidManifest.xml:
android/app/build.gradle should have minimum SDK version 24:
Verify Installation
After installing, import the package in your Dart code to verify:Troubleshooting
Common Issues
API Key Not Initialized Error
API Key Not Initialized Error
Error:
API key is not initialized. Call init() firstSolution: Ensure you call gameballApp.init(config) before any other SDK methods, preferably in your main() function before runApp().Invalid Customer ID Error
Invalid Customer ID Error
Error:
Customer ID cannot be emptySolution: Provide a valid, non-empty customer ID in your requests. The customer ID should be a permanent identifier for the user.Push Provider Validation Error
Push Provider Validation Error
Error:
Device token is required when push provider is setSolution: When setting a push provider, ensure you also provide a valid device token. Both must be set together.Build Errors on iOS
Build Errors on iOS
Symptoms: Pod installation or build failures on iOSSolutions:
- Clean build folder:
cd ios && xcodebuild clean - Reinstall pods:
cd ios && pod install --repo-update - Ensure iOS deployment target is at least 15.0
Build Errors on Android
Build Errors on Android
Symptoms: Gradle build failuresSolutions:
- Clean gradle cache:
cd android && ./gradlew clean - Verify minimum SDK version is 24 in
build.gradle - Check React Native version compatibility
Debug Logging
Enable Flutter’s debug logging to see detailed SDK operation logs:[GameballIAM]. See In-App Messaging.