Repro - Mobile Analytics for growth
日本語
Sign Up Back to Dashboard
  • System Requirements
  • Dashboard Guide
  • Development Guide
    • Signup
    • iOS/Android SDK
      • Get Started
      • Session Lifecycle
      • User ID
      • Device ID
      • User Profile
      • Event Tracking
      • Push Notification
      • NewsFeed
      • In-App Message
      • Silver Egg Recommendation Messages
      • Remote Config
      • WebView
      • Opt-out feature
        • Switching between opt-in and opt-out
        • Setting the initial state of opt-in/opt-out
          • iOS
          • Android
          • Unity
          • Cordova
          • Monaca
          • Cocos2d-x
          • React Native
          • Flutter
      • Settings regarding the collection of advertiser IDs
      • Registering an user device into a specific audience with the help of a QR code
      • Set attribution data from Adjust to Repro
      • Set attribution data from AppsFlyer to Repro
      • Log Level
      • Verification Method
    • Web
    • Audience API
    • Audience Import(β)
    • Push API
    • User Profile API
    • User Profile Bulk Import
    • NewsFeed API
    • Deletion Targeted User Registration API
    • Booster installation guide
    • Mail(β)
  • Release Notes
  • FAQ

Setting the initial state for opt-in/opt-out - Cordova¶

Edit config.xml¶

The initial optIn/optOut state can be set in the config.xml file. Depending on your Cordova version, the setup procedure differs.

Creating a config-file tag (Cordova version 7.1 and above)¶

iOS Platform¶

Please insert the following XML construct into the <platform name="ios"> tag. The inner <true /> tag would result in an initial opt-in setting, <false /> in an initial opt-out setting.

<config-file parent="RPREndUserOptInDefault" target="*-Info.plist">
    <false />
</config-file>

Android Platform¶

Please insert the following XML construct into the <platform name="android"> tag. android:value="true" tag would result in an initial opt-in setting, android:value="false" in an initial opt-out setting.

<config-file parent="./application" target="AndroidManifest.xml">
    <meta-data android:name="io.repro.android.EndUserOptInDefault" android:value="false">
    </meta-data>
</config-file>

Creating a custom-config-file tag (Cordova below version 7.1)¶

Cordova earlier to version 7.1 does not use config-file tags, therefore the cordova-custom-config plugin is necessary.

If you do not have the cordova-custom-config plugin installed, follow the instructions below.

$ cordova plugin add cordova-custom-config

iOS Platform¶

Please insert the following XML construct into the <platform name="ios"> tag. The inner <true /> tag would result in an initial opt-in setting, <false /> in an initial opt-out setting.

<custom-config-file parent="RPREndUserOptInDefault" target="*-Info.plist">
    <false />
</custom-config-file>

Android Platform¶

Please insert the following XML construct into the <platform name="android"> tag. android:value="true" tag would result in an initial opt-in setting, android:value="false" in an initial opt-out setting.

<custom-config-file parent="./application" target="AndroidManifest.xml">
    <meta-data android:name="io.repro.android.EndUserOptInDefault" android:value="false">
    </meta-data>
</custom-config-file>
  • « Setting the initial state for opt-in/opt-out - Unity
  • Setting the initial state for opt-in/opt-out - Monaca »

About Us Careers Terms of Service Privacy Policy Cookie Policy

© 2022 Repro Inc.