IMSDK
IM features a comprehensive suite of solutions including global access, one-to-one chat, group chat, message push, profile and relationship chain hosting, and account authentication. It also provides complete app access and backend management APIs.
V2TIMOfflinePushInfo

Properties

NSString * title
 
NSString * desc
 
NSString * ext
 
BOOL disablePush
 
V2TIMIOSOfflinePushType iOSPushType
 
BOOL ignoreIOSBadge
 
NSString * iOSSound
 
NSString * AndroidSound
 
NSString * AndroidOPPOChannelID
 
NSString * AndroidFCMChannelID
 
NSString * AndroidXiaoMiChannelID
 
NSInteger AndroidVIVOClassification
 
NSString * AndroidVIVOCategory
 
NSString * AndroidHuaWeiCategory
 
NSString * AndroidHuaWeiImage
 
NSString * AndroidHonorImage
 
NSString * AndroidFCMImage
 
NSString * iOSImage
 
NSString * HarmonyImage
 
NSString * HarmonyCategory
 
BOOL ignoreHarmonyBadge
 

Property Documentation

◆ title

- (NSString*) title
readwritenonatomicstrong

Notification title(This field must be set for custom message offline push)

◆ desc

- (NSString*) desc
readwritenonatomicstrong

Notification content.

◆ ext

- (NSString*) ext
readwritenonatomicstrong

Extended field passed through by offline push The party that receives the offline push can get this field in UIApplicationDelegate -> didReceiveRemoteNotification -> userInfo, and use this field to make UI jump logic.

◆ disablePush

- (BOOL) disablePush
readwritenonatomicassign

Whether to disable push (enabled by default)

◆ iOSPushType

- (V2TIMIOSOfflinePushType) iOSPushType
readwritenonatomicassign

The offline push type for iOS systems Default value is V2TIM_IOS_OFFLINE_PUSH_TYPE_APNS

◆ ignoreIOSBadge

- (BOOL) ignoreIOSBadge
readwritenonatomicassign

Whether to exclude an offline push notification from the badge count (valid only for iOS).

If the parameter is set to YES, on an iOS device, the app's unread badge will not increase after the notification is sent.

◆ iOSSound

- (NSString*) iOSSound
readwritenonatomicstrong

Set the sound effect for offline push (valid only for iOS).

If "sound" is kIOSOfflinePushNoSound, no sound will be played when a notification is received. If "sound" is kIOSOfflinePushDefaultSound, the system notification sound will be played when a notification is received. To customize the sound, link an audio file to your Xcode project and set iOSSound to the filename (including the extension).

◆ AndroidSound

- (NSString*) AndroidSound
readwritenonatomicstrong

Set the sound effect for offline push (valid only for Android and supported in imsdk 6.1 and later versions).

Only Huawei and Google phones support configuring sound effects for offline push notifications. To configure offline push sound effects for Xiaomi phones, please see https://dev.mi.com/console/doc/detail?pId=1278%23_3_0. For FCM notifications on Google phones, in order for the configured sound effect to take effect, you need to call setAndroidFCMChannelID to set the channel ID first.

To customize AndroidSound: The name of the audio file in the raw directory of your Android project (leave out the extension)

◆ AndroidOPPOChannelID

- (NSString*) AndroidOPPOChannelID
readwritenonatomicstrong

Configure the channel ID for offline push on OPPO phones with Android 8.0 and later.

◆ AndroidFCMChannelID

- (NSString*) AndroidFCMChannelID
readwritenonatomicstrong

Configure the channel ID for FCM offline push on phones with Android 8.0 and later.

◆ AndroidXiaoMiChannelID

- (NSString*) AndroidXiaoMiChannelID
readwritenonatomicstrong

Configure the channel ID for offline push on Xiaomi phones with Android 8.0 and later.

◆ AndroidVIVOClassification

- (NSInteger) AndroidVIVOClassification
readwritenonatomicassign

Set the notification type for offline push on vivo phones (to be deprecated). The vivo push service optimized its message classification rules on April 3, 2023. We recommend you use setAndroidVIVOCategory instead. Offline push notification type on vivo phones. 0: operation notification; 1 (default): system notification.

◆ AndroidVIVOCategory

- (NSString*) AndroidVIVOCategory
readwritenonatomicstrong

Set the notification type for offline push on vivo phones. For details, see https://dev.vivo.com.cn/documentCenter/doc/359. The vivo push service optimized its message classification rules on April 3, 2023. We recommend you use this API now instead of setAndroidVIVOClassification.

◆ AndroidHuaWeiCategory

- (NSString*) AndroidHuaWeiCategory
readwritenonatomicstrong

Set the offline push notification type for Huawei phones. For details, see https://developer.huawei.com/consumer/cn/doc/development/HMSCore-Guides/message-classification-0000001149358835.

◆ AndroidHuaWeiImage

- (NSString*) AndroidHuaWeiImage
readwritenonatomicstrong

Set the notification image for Huawei device offline push. The protocol used must be HTTPS. Here is an example of the value: https://example.com/image.png The image file should be smaller than 512KB and the recommended dimensions are 40dp x 40dp with a corner radius of 8dp. Images that exceed the recommended dimensions may be compressed or displayed incompletely. It is recommended to use the JPG/JPEG/PNG image formats.

◆ AndroidHonorImage

- (NSString*) AndroidHonorImage
readwritenonatomicstrong

Set the notification image for Honor device offline push. The protocol used must be HTTPS. Here is an example of the value:https://example.com/image.png The icon file size must be smaller than 100KB. The recommended dimensions for the icon are 160px x 160px with a corner radius of 32px. Icons that exceed the recommended dimensions may be compressed or displayed incompletely.

◆ AndroidFCMImage

- (NSString*) AndroidFCMImage
readwritenonatomicstrong

Set the notification image for Google FCM device offline push. Display as a large icon when the message is not expanded, and show as a large image when the message is expanded. The protocol used must be HTTPS. Here is an example of the value:https://example.com/image.png The icon file size must be smaller than 1 MB. Icons that exceed the specified size may be compressed or displayed incompletely.

◆ iOSImage

- (NSString*) iOSImage
readwritenonatomicstrong

Set the notification image for APNs offline push, leveraging the iOS 10 Service Extension feature to download and display it in the popup.The protocol used must be HTTPS. Here is an example of the value:https://example.com/image.png Limitations and restrictions:

  • Image: Supports JPEG, GIF, PNG formats with a maximum size of 10 MB. Instructions for use:
  • To enable the iOS 10 Service Extension feature, you need to open the "mutable-content" property in the IM console.
  • The key value to retrieve the iOSImage resource is "image".

◆ HarmonyImage

- (NSString*) HarmonyImage
readwritenonatomicstrong

Set the notification image for offline push by Harmony device. The protocol used by the URL must be the HTTPS protocol. Example value: https://example.com/image.png. Supported image formats include png, jpg, jpeg, heif, gif, bmp. The image dimensions should be less than 25000 pixels (length * width).

◆ HarmonyCategory

- (NSString*) HarmonyCategory
readwritenonatomicstrong

Set the offline push notification category for HarmonyOS devices. For details, see https://developer.huawei.com/consumer/cn/doc/HMSCore-Guides/message-classification-0000001149358835.

◆ ignoreHarmonyBadge

- (BOOL) ignoreHarmonyBadge
readwritenonatomicassign

Whether to exclude an offline push notification from the badge count (valid only for Harmony). If the parameter is set to YES, on an Harmony device, the app's unread badge will not increase after the notification is sent.