BMXPushService Class Reference#
Inherits from NSObject
Declared in floo_proxy.h
Overview#
@interface 推播Service
Properties#
swigCMemOwn#
@property (nonatomic) BOOL swigCMemOwn
swigCPtr#
@property (nonatomic) void *swigCPtr
Instance Methods#
bindDeviceTokenWithToken:#
推播綁定設備token。
- (BMXErrorCode)bindDeviceTokenWithToken:(NSString )token*
Parameters#
token
設備的推播token
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="bindDeviceTokenWithToken:" %}{% endlanying_code_snippet %}
bindVoipTokenWithToken:#
推播綁定設備token。
- (BMXErrorCode)bindVoipTokenWithToken:(NSString )token*
Parameters#
token
設備的推播token
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="bindVoipTokenWithToken:" %}{% endlanying_code_snippet %}
clearAllNotifications#
清空下拉通知欄全部通知。
- (void)clearAllNotifications
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="clearAllNotifications" %}{% endlanying_code_snippet %}
clearNotificationWithNotificationId:#
清除指定id的通知。
- (void)clearNotificationWithNotificationId:(long long)notificationId
Parameters#
notificationId
通知id
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="clearNotificationWithNotificationId:" %}{% endlanying_code_snippet %}
clearTagsWithOperationId:#
清空推播使用者的標籤。
- (BMXErrorCode)clearTagsWithOperationId:(NSString )operationId*
Parameters#
operationId
操作id。在回呼通知中對應通知提醒。
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="clearTagsWithOperationId:" %}{% endlanying_code_snippet %}
dealloc#
- (void)dealloc
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="dealloc" %}{% endlanying_code_snippet %}
deleteTagsWithTags:operationId:#
刪除推播使用者的標籤。
- (BMXErrorCode)deleteTagsWithTags:(TagList )tags operationId:(NSString )operationId
Parameters#
tags
要刪除使用者標籤
operationId
操作id。在回呼通知中對應通知提醒。
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="deleteTagsWithTags:operationId:" %}{% endlanying_code_snippet %}
getCert#
取得登陸後伺服器回傳的推播證書。
- (NSString *)getCert
Return Value#
NSString
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="getCert" %}{% endlanying_code_snippet %}
getPushProfile:forceRefresh:#
取得推播使用者詳情,如果forceRefresh == true,則強制從服務端拉取
- (BMXErrorCode)getPushProfile:(BMXPushUserProfile )pushProfile forceRefresh:(BOOL)forceRefresh*
Parameters#
forceRefresh
是否強制從伺服器拉取,本地取得失敗的情況下會自動從伺服器拉取
profile
推播使用者profile信息,初始傳入指向為空的shared_ptr物件,函數回傳後從此處取得使用者profile信息。
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="getPushProfile:forceRefresh:" %}{% endlanying_code_snippet %}
getTags:operationId:#
取得推播使用者的標籤。
- (BMXErrorCode)getTags:(TagList )tags operationId:(NSString )operationId
Parameters#
tags
使用者標籤
operationId
操作id。在回呼通知中對應通知提醒。
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="getTags:operationId:" %}{% endlanying_code_snippet %}
getToken#
取得登陸後使用的使用者token。
- (NSString *)getToken
Return Value#
NSString
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="getToken" %}{% endlanying_code_snippet %}
initWithCptr:swigOwnCObject:#
- (id)initWithCptr:(void )cptr swigOwnCObject:(BOOL)ownCObject*
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="initWithCptr:swigOwnCObject:" %}{% endlanying_code_snippet %}
loadLocalPushMessagesWithRefMsgId:size:result:#
- (BMXErrorCode)loadLocalPushMessagesWithRefMsgId:(long long)refMsgId size:(unsigned long)size result:(BMXMessageList )result*
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="loadLocalPushMessagesWithRefMsgId:size:result:" %}{% endlanying_code_snippet %}
loadLocalPushMessagesWithRefMsgId:size:result:arg4:#
加載資料庫本地存儲的推播訊息。如果不指定則從最新訊息開始
- (BMXErrorCode)loadLocalPushMessagesWithRefMsgId:(long long)refMsgId size:(unsigned long)size result:(BMXMessageList )result arg4:(BMXPushService_PushDirection)arg4*
Parameters#
refMsgId
加載推播訊息的起始id
size
最大加載訊息條數
result
資料庫回傳的加載本地推播訊息列表
arg4
加載推播訊息的方向,預設是加載更早的訊息
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="loadLocalPushMessagesWithRefMsgId:size:result:arg4:" %}{% endlanying_code_snippet %}
resume#
恢復推播功能介面。
- (BMXErrorCode)resume
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="resume" %}{% endlanying_code_snippet %}
sendMessageWithContent:#
發送推播上行訊息,訊息狀態變化會通過listener通知
- (void)sendMessageWithContent:(NSString )content*
Parameters#
content
發送的上行推播訊息內容
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="sendMessageWithContent:" %}{% endlanying_code_snippet %}
setBadge:#
設定推播使用者的未讀角標。
- (BMXErrorCode)setBadge:(int)count
Parameters#
count
使用者未讀角標數
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="setBadge:" %}{% endlanying_code_snippet %}
setGeoFenceMode#
- (BMXErrorCode)setGeoFenceMode
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="setGeoFenceMode" %}{% endlanying_code_snippet %}
setGeoFenceMode:#
- (BMXErrorCode)setGeoFenceMode:(BOOL)enable
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="setGeoFenceMode:" %}{% endlanying_code_snippet %}
setGeoFenceMode:isAllow:#
設定推播的地理圍欄功能是否運行。
- (BMXErrorCode)setGeoFenceMode:(BOOL)enable isAllow:(BOOL)isAllow
Parameters#
enable
地理圍欄功能是否運行。
isAllow
使用者是否主動彈出使用者定位請求。
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="setGeoFenceMode:isAllow:" %}{% endlanying_code_snippet %}
setPushMode#
設定允許推播時間。
- (BMXErrorCode)setPushMode
Parameters#
startHour
靜默允許推播的起始時間小時
endHour
靜默允許推播的結束時間小時
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="setPushMode" %}{% endlanying_code_snippet %}
setPushMode:#
設定推播啟用狀態。預設為使用推播。
- (BMXErrorCode)setPushMode:(BOOL)enable
Parameters#
enable
推播的啟用狀態
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="setPushMode:" %}{% endlanying_code_snippet %}
setPushTime:endHour:#
- (BMXErrorCode)setPushTime:(int)startHour endHour:(int)endHour
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="setPushTime:endHour:" %}{% endlanying_code_snippet %}
setRunBackgroundMode#
- (BMXErrorCode)setRunBackgroundMode
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="setRunBackgroundMode" %}{% endlanying_code_snippet %}
setRunBackgroundMode:#
設定推播是否可以後臺運行。預設是false。
- (BMXErrorCode)setRunBackgroundMode:(BOOL)enable
Parameters#
enable
推播後臺運行狀態。
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="setRunBackgroundMode:" %}{% endlanying_code_snippet %}
setSilenceTime:endHour:#
設定推播靜默的起始結束時間。
- (BMXErrorCode)setSilenceTime:(int)startHour endHour:(int)endHour
Parameters#
startHour
靜默推播的起始時間小時
endHour
靜默推播的結束時間小時
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="setSilenceTime:endHour:" %}{% endlanying_code_snippet %}
setTags:operationId:#
設定推播使用者的標籤。
- (BMXErrorCode)setTags:(TagList )tags operationId:(NSString )operationId
Parameters#
tags
使用者標籤
operationId
操作id。在回呼通知中對應通知提醒。
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="setTags:operationId:" %}{% endlanying_code_snippet %}
start#
- (BMXErrorCode)start
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="start" %}{% endlanying_code_snippet %}
startWithAlias:#
- (BMXErrorCode)startWithAlias:(NSString )alias*
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="startWithAlias:" %}{% endlanying_code_snippet %}
startWithAlias:bmxToken:#
初始化推播sdk。在僅使用推播的情況下使用該介面初始化推播sdk。在同時使用IM功能的時候直接在BMXClient呼叫登陸功能即可。config物件初始化的時候需要傳入平臺類型和設備id。
- (BMXErrorCode)startWithAlias:(NSString )alias bmxToken:(NSString )bmxToken
Parameters#
alias
推播初始化使用的當前使用者別名
bmxToken
推播初始化的時候App傳入的使用的使用者的token,無使用者的狀態下不傳入即可。
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="startWithAlias:bmxToken:" %}{% endlanying_code_snippet %}
status#
推播sdk當前的狀態。
- (BMXPushService_PushSdkStatus)status
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="status" %}{% endlanying_code_snippet %}
stop#
停止推播功能介面。
- (BMXErrorCode)stop
Return Value#
Declared In#
floo_proxy.h
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="stop" %}{% endlanying_code_snippet %}
unbindAliasWithAlias:#
解除使用者別名綁定。
- (BMXErrorCode)unbindAliasWithAlias:(NSString )alias*
Parameters#
alias
需要解除綁定的使用者別名。
Return Value#
Declared In#
floo_proxy.h
Example:
{% lanying_code_snippet repo="lanying-im-ios",class="BMXPushService",function="unbindAliasWithAlias:" %}{% endlanying_code_snippet %}