Created
September 6, 2018 23:16
-
-
Save mobilequickie/5a1e97d655ff5d750653f9b2a4a6bacc to your computer and use it in GitHub Desktop.
Function inside of AWSAnalyticsService class that updates custom attributes for collecting demographics in Amazon Pinpoint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Send custom model and platformVersion for this device to Amazon Pinpoint | |
func recordCustomProfileDemographics() { | |
let profile: AWSPinpointEndpointProfile = (pinpoint?.targetingClient.currentEndpointProfile())! | |
// Call our DeviceUtility class for readable Apple model type and iOS version for this device | |
profile.demographic?.model = UIDevice.current.modelName | |
profile.demographic?.platformVersion = UIDevice.current.systemVersion | |
pinpoint?.targetingClient.update(profile) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment