Kids Mode in Capacitor SDK
If your Capacitor 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, GAID, and IP address:
import { adapty } from '@adapty/capacitor';
try {
await adapty.activate({
apiKey: 'YOUR_PUBLIC_SDK_KEY',
params: {
// Disable IP address collection
ipAddressCollectionDisabled: true,
// Disable IDFA collection on iOS
ios: {
idfaCollectionDisabled: true
},
// Disable Google Advertising ID collection on Android
android: {
adIdCollectionDisabled: true
}
}
});
console.log('Adapty activated with Kids Mode enabled');
} catch (error) {
console.error('Failed to activate Adapty with Kids Mode:', error);
}Platform-specific configurations
iOS
Even with IDFA collection disabled in code (above), your build still includes the AdSupport and AppTrackingTransparency frameworks. The App Store Kids Category doesn’t allow them.
To comply with Apple’s requirements, build the native iOS SDK in Kids Mode, which compiles out all IDFA, AdSupport, and AppTrackingTransparency code. How you enable it depends on the package manager of your iOS project, as described in Set up your iOS project.
Add the adapty-kids-mode command shipped with the SDK to your app’s postinstall. It enables the SDK’s KidsMode trait. The command re-applies on every install:
{
"scripts": {
"postinstall": "adapty-kids-mode"
}
}Then reinstall + re-resolve the iOS packages, and build with Xcode 26 or later:
npm install
npx cap sync iosTo turn Kids Mode off, remove adapty-kids-mode from postinstall or change it to adapty-kids-mode disable, run npx adapty-kids-mode disable, and sync again. Otherwise, the next npm install enables Kids Mode again.
In SDK 4.2.0 and later, adapty-kids-mode prints a warning, without failing the install, when it can’t find the iOS project, or when your Podfile doesn’t match the command: enable with no adapty_enable_kids_mode call in the Podfile, or disable with the call still there. To silence the warnings, pass --no-warnings or set ADAPTY_KIDS_MODE_NO_WARNINGS=1. When your app is outside the directory you install from, pass --app-root=path/to/app.
To confirm Kids Mode is active, check the activation log line. The native SDK writes it at the verbose level before it applies the logLevel you pass to activate, so set the log level before activation:
await adapty.setLogLevel({ logLevel: 'verbose' });
await adapty.activate({ apiKey: 'YOUR_PUBLIC_SDK_KEY' });In the Xcode console, the Calling Adapty activate line lists "kids_mode_enabled": true among its parameters.
If you’re using CocoaPods for iOS, you can also enable Kids Mode at the native level:
-
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
-
Run the following command to apply the changes:
pod install
Android: remove the advertising ID permission
Setting adIdCollectionDisabled: true (above) stops Adapty from collecting the advertising ID, but the SDK still declares the AD_ID permission. If your app targets children only and compiles against Android 13 (API 33) or higher, Google Play prohibits you from even requesting it.
Make two additions to your <manifest> element:
- Declare the
toolsnamespace (Capacitor’s default manifest omits it). - Add a
<uses-permission>entry forAD_IDwithtools:node="remove"to strip it.
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission
android:name="com.google.android.gms.permission.AD_ID"
tools:node="remove" />
<!-- your existing manifest content -->
</manifest>Next steps
Once you’ve enabled Kids Mode, make sure to:
- Test your app thoroughly to ensure all functionality works correctly
- Review your app’s privacy policy to reflect the disabled data collection
- Submit your app for review with clear documentation about Kids Mode compliance
For more information about platform-specific requirements:
- Kids Mode in iOS SDK for additional iOS configuration details
- Kids Mode in Android SDK for additional Android configuration details