Kids Mode in Flutter SDK
If your Flutter application is intended for kids, you must follow the policies of Apple and Google. If you’re using the Adapty SDK, a few simple steps will help you configure it to meet these policies and pass app store reviews.
What’s required?
You need to configure the Adapty SDK to disable the collection of:
In addition, we recommend using customer user ID carefully. User ID in format <FirstName.LastName> will be definitely treated as gathering personal data as well as using email. For Kids Mode, a best practice is to use randomized or anonymized identifiers (e.g., hashed IDs or device-generated UUIDs) to ensure compliance.
Enabling Kids Mode
Updates in the Adapty Dashboard
In the Adapty Dashboard, you need to disable the IP address collection. To do this, go to App settings and click Disable IP address collection under Collect users’ IP address.
Updates in your mobile app code
In order to comply with policies, disable the collection of the user’s IDFA (for iOS), GAID/AAID (for Android), and IP address.
Android: Update your SDK configuration
try {
await Adapty().activate(
configuration: AdaptyConfiguration(apiKey: 'YOUR_API_KEY')
..withGoogleAdvertisingIdCollectionDisabled(true) // set to `true`
..withIpAddressCollectionDisabled(true), // set to `true`
);
} catch (e) {
// handle the error
}
iOS: Enable Kids Mode in SDK v4
In SDK v4, the native iOS SDK is installed through Swift Package Manager, and Kids Mode is enabled through the KidsMode Swift package trait, which compiles out all IDFA, AdSupport, and AppTrackingTransparency code. This requires Xcode 26 or later.
In SDK v4, use the adapty_flutter_kids package instead of adapty_flutter in your pubspec.yaml. It is a Kids Mode variant of the plugin with the same public API and the same version — the only difference is that its native iOS SDK is built with the KidsMode trait:
dependencies:
adapty_flutter_kids: 4.0.0
Your Dart code stays the same — only update the import to the new package name:
import 'package:adapty_flutter_kids/adapty_flutter.dart';
iOS: Enable Kids Mode using CocoaPods (SDK v3)
-
Update your Podfile:
- If you don’t have a
post_installsection, add the entire code block below. - If you do have a
post_installsection, merge the highlighted lines into it.
def adapty_enable_kids_mode(installer) installer.pods_project.targets.each do |target| next unless target.name == 'Adapty' target.build_configurations.each do |config| flags = config.build_settings['OTHER_SWIFT_FLAGS'] || '$(inherited)' flags = flags.join(' ') if flags.is_a?(Array) config.build_settings['OTHER_SWIFT_FLAGS'] = "#{flags} -DADAPTY_KIDS_MODE" end target.frameworks_build_phase.files.dup.each do |bf| target.frameworks_build_phase.remove_build_file(bf) if bf.display_name.to_s.include?('AdSupport') end end installer.pods_project.save Dir.glob(File.join(installer.sandbox.root, 'Target Support Files', '**', '*.xcconfig')).each do |xc| File.write(xc, File.read(xc).gsub(/\s*-framework\s+"?AdSupport"?/, '')) end end post_install do |installer| # ... keep your existing post_install body (Flutter adds one automatically) ... adapty_enable_kids_mode(installer) # <-- enable Adapty Kids Mode end - If you don’t have a
-
Apply the changes by running
pod install