iOS API
Everything is static on Flyy. The v1 API lives on Flyy.sharedInstance
([Flyy sharedFlyyInstance] in Objective-C) — see migration.
Setup
| API | Description |
|---|---|
initialize(_ config: FlyyConfig) | Initialize. Options. |
prewarm() · recyclePrewarm() | Prepare a hidden WebView for an instant open. |
setThemeColor(_:) · setUiVariant(_:) | Theme and UI variant. |
setSegmentId(_:) · getSegmentId() | Segment. |
setBaseFlyyDomain(_:) · setBaseStageFlyyDomain(_:) | API domain overrides. |
Identity
| API | Description |
|---|---|
setUser(_:segmentId:completion:) | Returning user. |
setNewUser(_:segmentId:completion:) | New signup. |
setUserToken(_:) · setNewUserToken(_:) | Server-issued token. Recommended. |
setUserWithReferralCode(_:completion:) | New signup + credit the referrer. |
loginUser(_:userName:completion:) | Identify with a display name. |
setUsername · setDisplayName · setContactNumber | Profile fields. |
addUserToSegment(title:key:) | Add to a segment. |
logout() | Clear identity. |
getAnonymousId() | Visitor id used before identify. |
Referrals
| API | Description |
|---|---|
startReferralTracking(userActivity:onComplete:) | Install attribution. |
setReferrerCode(_:) · getReferrerCode() | Referral code. |
getReferrerLink(onComplete:) | Share link. |
Events
| API | Description |
|---|---|
sendEvent(_:value:completion:) · sendEvent(_:json:completion:) | Campaign event. Queued offline. |
trackEvent(_:value:completion:) | Analytics pipeline event. |
Screens
| API | Description |
|---|---|
open(from:screen:deepPath:) | Full-screen SDK. |
open(path:query:from:) | Any path; presenter optional. |
handleDeeplink(_:from:) | Paths, flyy://, URLs, v1 screen names. |
navigateToRewards · navigateToWallet · navigateToReferAndEarn · navigateToSpinWheel · navigateToMilestones · openInbox · … | Shortcuts; from: optional. |
closeSdk(from:) | Dismiss the SDK. |
Embeds and placements
| API | Description |
|---|---|
FlyyEmbedView · load(_:) · loadPath(_:) · onCta · onState | Embeds. |
FlyyEmbed(_:onState:onCta:) · FlyyEmbedPage(_:) | SwiftUI embeds. |
FlyyPlacementView(slot:) · FlyySlot(_:) · FlyyStories(slot:) | Inline placements. |
.flyyTarget(_:) · .flyyAnchor(_:) | SwiftUI targets and anchors. |
registerAnchor(_:view:) · unregisterAnchor(_:) | UIKit anchors. |
showPlacement(_:) · showNudge(_:) · showDynamicIsland(_:) · dismissPlacements() | Manual triggers. |
setCurrentScreen(_:) | Name a route for targeting. |
showFloatingWidget(_:) · hideFloatingWidget() · setFloatingWidgetEnabled(_:) · refreshFloatingWidgets() | Floating widgets. |
floatingWidgetListener · floatingCtaHandler | Floating widget callbacks. |
Push and popups
| API | Description |
|---|---|
handlePush(_:) | true if the payload was Flyy's. |
syncPushToken(_:) | FCM registration token. |
FlyyNotifications.handleTap(_:presenter:) · .handleForeground(_:) · .isFlyyNotification(_:) | Notification center hooks. |
FlyyPopups.showRewardWonPopup · .showRewardWonScratchPopup · .showPopup · .showToastAlert | Popups over your app. |
OTA
| API | Description |
|---|---|
getOtaVersion() | Version being served. |
checkForOtaUpdate(_:) | Force a check. |