Getting Started
Requirements
- Minimum Flutter Version: 1.17.0
- Dart: 3.4.4+
- Android: API level 21+
- iOS: iOS 12.0+
Install the SDK
Add the dependency to yourpubspec.yaml:
iOS Setup
Make sure your iOS deployment target is at least 12.0. In yourios/Podfile:
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 21:
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 12.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 21 in
build.gradle - Check React Native version compatibility