Activate / Deactivate Channel Push Notification
You can enable or disable channel push notification settings for current user.
// activate
[[TalkPlus sharedInstance] enableChannelPushNotification:channel
success:^(TPChannel * tpChannel) {
// SUCCESS
} failure:^(int errorCode, NSError *error) {
// FAILURE
}];
// deactivate
[[TalkPlus sharedInstance] disableChannelPushNotification:channel
success:^(TPChannel * tpChannel) {
// SUCCESS
} failure:^(int errorCode, NSError *error) {
// FAILURE
}];
// activate
TalkPlus.sharedInstance()?.enableChannelPushNotification(tpChannel,
success: { tpChannel in
// SUCCESS
}, failure: { (errorCode, error) in
// FAILURE
})
// deactivate
TalkPlus.sharedInstance()?.disableChannelPushNotification(tpChannel,
success: { tpChannel in
// SUCCESS
}, failure: { (errorCode, error) in
// FAILURE
})
Channel Push Notification Settings (Sound)
You can change channel push notification (FCM) sound settings for current user.
// change channel notification sound
[[TalkPlus sharedInstance] setChannelPush:channel
sound:@"mySound.wav"
success:^{
// SUCCESS
} failure:^(int errorCode, NSError *error) {
// FAILURE
}];
// change channel notification sound
TalkPlus.sharedInstance()?.setChannelPush(tpChannel,
sound: "mySound.wav",
success: { tpChannel in
// SUCCESS
}, failure: { (errorCode, error) in
// FAILURE
})
Last updated