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: Enable Kids Mode using CocoaPods
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_install
section, add the entire code block below. - If you do have a
post_install
section, merge the highlighted lines into it.
Podfilepost_install do |installer|
installer.pods_project.targets.each do |target|
if target.name == 'Adapty'
target.build_configurations.each do |config|
config.build_settings['OTHER_SWIFT_FLAGS'] ||= ['$(inherited)']
config.build_settings['OTHER_SWIFT_FLAGS'] << '-DADAPTY_KIDS_MODE'
end
end
end
end - If you don't have a
-
Run the following command to apply the changes:
Shellpod install
Android: Enable Kids Mode using Gradle
For Android, you can also enable Kids Mode at the native level by adding the following to your app's build.gradle
:
android {
defaultConfig {
// ... existing config ...
// Enable Kids Mode
buildConfigField "boolean", "ADAPTY_KIDS_MODE", "true"
}
}
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