共用方式為


MCDUserNotificationReader

@interface MCDUserNotificationReader : NSObject

這個類別提供新的傳入使用者通知和使用者通知更新。 它也提供在連線裝置平臺中保存之使用者通知集合的存取權。

屬性

serializedState

@property(nonatomic, readonly, nonnull) NSString* serializedState;

傳回變更讀取器的目前狀態。 可用來建構從相同狀態開始的新讀取器。 如果沒有成功完成) ,則根據上次完成的通知變更批次 (或初始狀態。

dataChanged

@property(nonatomic, readonly, nonnull) MCDEvent<MCDUserNotificationReader*, MCDUserNotificationReaderDataChangedEventArgs*>* dataChanged;

MCDUserNotificationReader 的事件訂用帳戶已變更。

方法

readBatchAsyncWithMaxSize

- (void)readBatchAsyncWithMaxSize:(NSUInteger)maxBatchSize completion:(nonnull void (^)(NSArray<MCDUserNotification*>* _Nullable, NSError* _Nullable))completion;

讀取通知變更,包括新的傳入通知,以及批次中現有通知的更新。