Skip to main content

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 your pubspec.yaml:
Then run:

iOS Setup

Make sure your iOS deployment target is at least 15.0. In your ios/Podfile:
Set 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

Ensure INTERNET permission is declared in AndroidManifest.xml:
Your android/app/build.gradle should have minimum SDK version 24:

Verify Installation

After installing, import the package in your Dart code to verify:
If there are no import errors, you’re ready to initialize the SDK!

Troubleshooting

Common Issues

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().
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.
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.
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
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:
For verbose logging during development, run your app with the --verbose flag to see detailed SDK logs and network operations.
In-app messaging logs separately, prefixed [GameballIAM]. See In-App Messaging.

Next Steps