RLMPushClient
Objective-C
@interface RLMPushClient : NSObject
Swift
@_nonSendable(_assumed) class RLMPushClient : NSObject, @unchecked Sendable
客户端,可用于向服务器注册设备以接收推送通知
-
设备将在服务器上注册的推送通知服务名称
声明
Objective-C
@property (nonatomic, readonly, nonnull) NSString *serviceName;
Swift
var serviceName: String { get }
-
将设备令牌注册到服务器的请求
声明
Objective-C
- (void)registerDeviceWithToken:(nonnull NSString *)token user:(nonnull RLMUser *)user completion:(nonnull RLMOptionalErrorBlock)completion;
Swift
func registerDevice(token: String, user: RLMUser) async throws
-
请求取消注册用户的设备
声明
Objective-C
- (void)deregisterDeviceForUser:(nonnull RLMUser *)user completion:(nonnull RLMOptionalErrorBlock)completion;
Swift
func deregisterDevice(user: RLMUser) async throws