Overview
FlockSDK-iOS enables seamless integration of Flock referral and rewards into your iOS applications. Effortlessly build powerful referral programs and track customer engagement in minutes.- Identify and track users
- Trigger checkpoints to show Flock experiences at specific moments in your user journey
- Navigate within existing web views or create new placements
- Handle events (close, success, invalid) in-app
- Modern Swift builder pattern API for easy configuration
- Officially supported by the Flock team
Requirements
- iOS 14.0 or later
- Swift 5.7 or later
- Xcode 14 or later
Installation
Swift Package Manager (Recommended)
- Open your Xcode project.
- Go to File > Add Packages…
- Enter the repository URL:
https://github.com/Flock-Solutions/FlockSDK-iOS.git
- Select a version and add the package to your target.
Usage
1. Configure the SDK
CallFlock.initialize
once, ideally in your AppDelegate
or early in your app’s startup:
2. Identify Your User
Identify the current user (after login or at app start):3. Trigger Checkpoints
Trigger checkpoints to show Flock experiences at specific moments in your user journey. The checkpoint system uses a modern Swift builder pattern for easy configuration.Basic Usage
Checkpoint with Callbacks
Navigation in Success Callback
Use navigation within success callbacks to show success screens after successful actions:Checkpoint Options
The checkpoint system automatically loads campaign checkpoints when you call
identify()
. Make sure to call identify()
before triggering any checkpoints.navigate()
: Navigate within existing web view instead of creating a new placementonClose()
: Handle when the checkpoint is closedonSuccess()
: Handle successful checkpoint completiononInvalid()
: Handle invalid checkpoint eventstrigger()
: Trigger the checkpoint with configured options
Support
- Open an issue on GitHub
- Email: support@withflock.com