Quick start
Three steps. When you finish, your app opens the Flyy rewards screen for a signed-in user.
:::info Before you start
You need your partner key from the Flyy dashboard → Settings. Use the
STAGE environment while you build, then switch to PRODUCTION.
:::
1. Add the SDK
- Android
- iOS
settings.gradle.kts
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url = uri("https://cdn.flyyx.in/maven") }
}
}
app/build.gradle.kts
dependencies {
implementation("com.theflyy:flyy:2.1.0")
}
Podfile
platform :ios, '14.0'
use_frameworks!
target 'YourApp' do
pod 'FlyyFramework', '~> 3.0'
end
Then run pod install --repo-update.
2. Initialize
- Android
- iOS
MainActivity.kt
import com.theflyy.sdk.Flyy
import com.theflyy.sdk.FlyyEnvironment
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Flyy.start(this) {
partnerId = "YOUR_PARTNER_KEY"
environment = FlyyEnvironment.STAGE
user = "user-1001" // your own user id
themeColor = "#7C3AED"
}
}
Flyy.start is safe to call on every onCreate. Repeat calls do nothing.
AppDelegate.swift
import FlyyFramework
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
Flyy.initialize(FlyyConfig(
partnerId: "YOUR_PARTNER_KEY",
environment: .stage,
themeColor: "#7C3AED"
))
Flyy.setUser("user-1001")
return true
}
3. Open rewards
- Android
- iOS
rewardsButton.setOnClickListener { Flyy.open(this) }
@IBAction func rewardsTapped(_ sender: Any) {
Flyy.open(from: self)
}
That's a working integration. Next:
- Identify users properly, with a server-issued token
- Track events your campaigns reward
- Credit referrals at signup
- Embed widgets inside your own screens