Skip to main content

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 your pubspec.yaml:
dependencies:
  gameball_flutter: ^3.1.0
Then run:
flutter pub get

iOS Setup

Make sure your iOS deployment target is at least 12.0. In your ios/Podfile:
platform :ios, '12.0'
Run:
cd ios && pod install
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:
<uses-permission android:name="android.permission.INTERNET" />
Your android/app/build.gradle should have minimum SDK version 21:
android {
    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 34
    }
}

Verify Installation

After installing, import the package in your Dart code to verify:
import 'package:gameball_flutter/gameball_flutter.dart';
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 12.0
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

Debug Logging

Enable Flutter’s debug logging to see detailed SDK operation logs:
flutter run --verbose
For verbose logging during development, run your app with the --verbose flag to see detailed SDK logs and network operations.

Next Steps