UGC Reactions from Real Creators
Real creator library videos at $11 and images at $8. Custom production from $25/video with a $250 minimum. Commercial licensing included.
翻訳待ち
Setgreet designs, ships, and measures the onboarding, paywalls, and surveys that grow your app. Native on iOS, Android, React Native & Flutter. Live in minutes. No code, no release, no revenue cut.
翻訳待ち
マーケティングDart · SwiftGitHub @setgreetオンライン所有者未確認
Have you tried it? One tap is enough. No sign-in needed.
Setgreet Flutter SDK - Mobile app user onboarding
翻訳待ち
Loading the full README.
Read the full README ↗Setgreet Flutter SDK allows you to show Setgreet flows in your Flutter app.
Add setgreet as a dependency in your pubspec.yaml file:
dependencies:
setgreet: ^1.0.0
Then run:
flutter pub get
The plugin bundles the Setgreet iOS SDK, so there is nothing to add on either dependency manager.
Swift Package Manager (the default from Flutter 3.44): the plugin ships a Swift package (ios/setgreet/Package.swift) that depends on setgreet-ios-sdk at the exact version this release was built with. Flutter resolves it when you build or run the app.
CocoaPods (projects that have not moved to Swift Package Manager yet, and Flutter versions before 3.44): the same SDK is included as prebuilt frameworks inside the plugin, so no extra pod source is needed. Run:
cd ios && pod install
No additional setup required for Android.
[!WARNING] A missing or incomplete Podfile setup for Lottie still builds without errors, then crashes at launch, for example with
dyld: Library not loaded: @rpath/Lottie.framework/Lottie(referenced fromSetgreetSDKLottie.framework). Apply every Podfile line below. A Podfile allows only onepre_installand onepost_installblock, so merge these lines into the blocks your Podfile already has instead of adding second ones.
Lottie support is opt-in on iOS, so apps that don't use it stay smaller. Without it, a Lottie component in a flow renders nothing on iOS; the rest of the flow is unaffected. On Android the native SDK already includes Lottie.
iOS with Swift Package Manager: the plugin cannot add an optional product for you, so add it to the app in Xcode (ios/Runner.xcworkspace, File > Add Package Dependencies):
https://github.com/setgreet/setgreet-ios-sdk.git, Exact Version set to the iOS SDK version this plugin release bundles (see the CHANGELOG entry for your version, or the exact: line in the plugin's ios/setgreet/Package.swift). Add the SetgreetSDKLottie product to the Runner target. The version must match the plugin's, since both resolve the same package.https://github.com/airbnb/lottie-spm.git, from 4.6.0. Add the Lottie product to the Runner target. SetgreetSDKLottie is a prebuilt framework and cannot declare this dependency itself.Then register at startup (below). No Podfile changes are needed; if your Podfile still has a pod 'setgreet/Lottie' line from a CocoaPods setup, remove it so the plugin is not linked twice.
iOS with CocoaPods: add the setgreet/Lottie pod to your ios/Podfile. It brings in the SetgreetSDKLottie module and lottie-ios. SetgreetSDKLottie is a prebuilt dynamic framework that loads @rpath/Lottie.framework, built with library evolution, so lottie-ios must be built as a dynamic framework with library evolution too.
With dynamic frameworks (use_frameworks!, Flutter's default), add the pod and one setting to the post_install block Flutter generated:
use_frameworks!
target 'Runner' do
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
pod 'setgreet/Lottie', :path => '.symlinks/plugins/setgreet/ios'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target) # already in your Podfile
# Added for Setgreet Lottie
if target.name == 'lottie-ios'
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
end
end
Static frameworks (use_frameworks! :linkage => :static): pods are then built as static frameworks, and SetgreetSDKLottie cannot load a static Lottie, so the app crashes at launch with the error above. Keep the pod line and the post_install setting, and also build just lottie-ios as a dynamic framework in pre_install (merge it into yours if you already have one):
use_frameworks! :linkage => :static
pre_install do |installer|
installer.pod_targets.each do |pod|
if pod.name == 'lottie-ios'
def pod.build_type
Pod::BuildType.dynamic_framework
end
end
end
end
Then run cd ios && pod install.
Register at startup, once, before the first flow shows:
await Setgreet.registerLottie(); // true when Lottie can render
registerLottie() returns false on iOS when neither the setgreet/Lottie pod nor the SetgreetSDKLottie Swift package product is in the app. On Android it always returns true. The example app does both steps with CocoaPods.
Initialize the SDK in your Flutter app:
import 'package:setgreet/setgreet.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
try {
await Setgreet.initialize(
'your_app_key_here',
config: SetgreetConfig(
debugMode: true, // Enable for development
),
);
} catch (e) {
print('Failed to initialize Setgreet: $e');
}
runApp(MyApp());
}
Sync your app's theme (colors + typography) to Setgreet so generated flows
match your brand. A Flutter app draws its UI from its own ThemeData, which
the native SDKs can't see — their auto-sync reads the host platform theme
(iOS system colors / the Android Activity theme), which for a Flutter app is
just framework defaults. So Flutter syncs its ThemeData explicitly:
This is the beginning of the README. Read the rest at the original. Read the full README ↗