By using AWS re:Post, you agree to the Terms of Use

Mobile

Quickly build mobile and web apps. AWS offers a full set of tools and services to support development workflows for native iOS/Android, React Native, and front-end web developers. Easily build, test, and deploy your app, even if you are new to AWS. Scale your app from prototype to millions of users, and quickly drive your business forward.

Recent questions

see all
1/18

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](https://github.com/aws-amplify/aws-sdk-ios/blob/main/AWSPinpoint/AWSPinpointService.h), 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!
0
answers
0
votes
51
views
asked a month ago

Popular users

see all
1/18