I found the answer for 7.x versions of sdk how to disable push notifications. Its a simple call sfmc_setPushEnabled(Bool). But I have migrated to 8.x spms, i couldnt find a equivalent to sfmc_setPushEnabled(Bool). Please help me how to stop push when user logs out.

I tried clearing attributes also.

SFMCSdk.identity.setProfileId([ModuleName.push: "NoPush"])
SFMCSdk.identity.setProfileAttributes([ModuleName.push: [["firstname": "","lastname":"","subscriberId":""]]])
SFMCSdk.identity.PushEnabled(false)---------> Should i put anything like this ??
  • 1
    There is no user logged in/logged out state in the SDK. That is an application feature/implementation. Your question should simply be: how do I disable push in SDK v8.x?
    – Bill Mote
    Jun 29, 2022 at 13:57

1 Answer 1


Regarding logged in/logged out state: as Bill mentioned in the comment, that is an application feature/implementation.

In v8.x, you can access the MobilePush module using SFMCSdk.mp

To disable push in SDK v8.x (i.e. like in v7.x sfmc_setPushEnabled(Bool)) you can use the following:


  • I added the code above mentioned when a user logs out. But still if create a message -> filter by my contact list -> Send the push message. The push message is still receiving. After adding the above code, should i do anything further to stop push from MarketingCloud SDK.
    – Niranjan
    Jun 30, 2022 at 5:19
  • Should i clear the profile attributes with it. ??
    – Niranjan
    Jun 30, 2022 at 5:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .