Disabling Automatic SDK Initialization
If you prefer to control when the SDK starts, you can disable the autostart feature and programmatically start the SDK when needed.
Disabling autostart on iOS
Section titled Disabling autostart on iOSYou need to edit the Info.plist
, usually located in ios/{project_name}/
, add the following key:
Disabling autostart on Android
Section titled Disabling autostart on AndroidYou need to edit the AndroidManifest.xml
, usually located in android/app/src/main/
, add the following flag:
Programmatically start the SDK
Section titled Programmatically start the SDKThen, you can start the Contentsquare SDK by calling the start()
method of the Contentsquare
class.
This function should be called as early as possible in the app process. Call this function in the useEffect
of your App element: