0

We are in a process of testing new functionalities for our Mobile Push implementation.

We can set standard and custom attributes via the SDK using sfmc_setAttributeNamed but we have some issues with the Opt-in status ([Mobile Push Subscriptions].OptInStatusID)

Example :

sfmc_setAttributeNamed("OptInStatusID", value: "???")

We were able to set it to an empty string but that's it.

How this problem should be approached?

2

Please see https://salesforce-marketingcloud.github.io/MarketingCloudSDK-iOS/sdk-implementation/user-data.html#reserved-words. You should not be setting this value manually.

Also, if you're having issues with the opted-in status of a device or devices then you should verify the APNS certificate you have registered with the Marketing Cloud servers. The most common issue (99% of the time) is the wrong certificate being uploaded to your application in the Marketing Cloud.

| improve this answer | |
1

@jclobro, are you validating the result returned from your call to sfmc_setAttributeNamed()?

The method will be returning false in your example, and if you have debug logging enabled in the SDK you'd see:

[foundation] sfmc_setAttributeNamed key: OptInStatusID, value: ??? failed, name is not valid

Additionally, if you pass an empty string ( "" ) you'll see:

[foundation] sfmc_setAttributeNamed key: OptInStatusID, value: failed, name is not valid

in the log.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.