Questions tagged with Mobile

Content language: English

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Enable/Disable Pinpoint Analytics on AWS SDK for IOS

A mobile developers team is leveraging on aws-sdk-ios to integrate Pinpoint into a mobile app. They are following the [documentation](, initializing the client inside their AppDelegates' `application:didFinishLaunchingWithOptions`: method. They initialize the client with the analytics disabled, because at the very first launch of the app, the user needs to give consent to be tracked. If the user accepts the analytics tracking, then the app needs to enable pinpoint analytics. Ideally, developers would like to update the config of the client, but they could not find any way to do it, since the client config is read-only. So they tried to instantiate a new client, but if a client already exists, that one is returned with its configuration (so analytics disabled). So at this moment, they are not able to enable Pinpoint analytics within the first session of app usage. This is the method they are using: ``` /** Creates an `AWSPinpoint` instance with the specified `configuration` if the instance does not already exists for the configurations' `appId`. If an instance exists for the given `appId`, returns the existing instance. `configuration` are ignored if an instance exists for the given `appId`. The strong reference to the instance is maintained by `AWSPinpoint`, and the developer does not need to retain it manually. This initializer should be called inside your AppDelegates' application:didFinishLaunchingWithOptions: method. @param configuration A configuration object. By default, it uses [AWSServiceManager defaultServiceManager].defaultServiceConfiguration to access the service. @returns The AWSPinpoint instance with the specified appId or nil if serviceConfiguration is invalid or appId is empty. */ + (nonnull instancetype)pinpointWithConfiguration:(AWSPinpointConfiguration *)configuration; ``` How can developers update the configuration of AWSPinpoint instance, after it's been instantiated? Thanks!
asked 4 months ago