SDKsiOS
Set global message reception
Configure the signed-in account’s default message-reception and notification behavior with OpenIM iOS SDK.
[[OIMManager manager] setGlobalRecvMessageOpt:OIMReceiveMessageOptNotNotify
onSuccess:nil
onFailure:nil];| Enum value | Numeric value | Meaning |
|---|---|---|
OIMReceiveMessageOptReceive | 0 | Receive messages normally and allow offline push notifications. |
OIMReceiveMessageOptNotReceive | 1 | Do not receive messages or trigger offline push notifications. |
OIMReceiveMessageOptNotNotify | 2 | Receive messages without triggering offline push notifications. |
If your product exposes only a global Do Not Disturb switch, it normally toggles between Receive and NotNotify. Because NotReceive stops message delivery, present it as a separate option. A successful callback means that the setting request has completed. Retrieve the current user's profile again when you need to confirm the final value.
Was this page helpful?