2.14
New
-
Added
QBDarwinNotificationCenter
classNOTE
A notification that enables the broadcast of information to registered observers between extensions with the same QuickBlox application id.
The Darwin notification center is a system mechanism on iOS and OS X to send signals across process boundaries. It's useful to exchange information between two or more running processes such as an iPhone app notifying a WatchKit/Share/Siri.... Extension that new data has arrived.
Is based on Darwin notification center.
How to use:
@interface YouExtensionClass () @property (nonatomic, strong) id logoutObserver; @end @implementation YourExtensionClass - (void)registerToLogoutNotificaiton { __weak __typeof(self)weakSelf = self; self.logoutObserver = [[QBDarwinNotificationCenter defaultCenter] addObserverForName:@"logout" usingBlock:^{ [weakSelf completeSharing:nil]; NSLog(@"Logout received"); }]; } @end ... @implementation YourApplicationClass - (void)postLogoutNotificaion { [[QBDarwinNotificationCenter defaultCenter] postNotificationName:@"logout"]; } @end
-
Added
FOUNDATION_EXPORT NSNotificationName const kQBLogoutNotification;
- Posted immediately after logout from QuickBlox and session destruction. Used only for Darwin notification center. -
Added New method
+ [QBRequest registeredUsersFromAddressBookWithUdid:isCompact:successBlock:errorBlock:]
to retrieve registered users from address book.Parameter Description udid User's device identifier. If specified - all operations will be in this context. Max length 64 symbols. compact if YES - server will return only id
andphone
fields of User. Otherwise - all User's fields will be returned.successBlock The block to be executed when registered users are retrieved. errorBlock The block to be executed when the request is failed. How to use:
[QBRequest registeredUsersFromAddressBookWithUdid:@"your udid" isCompact:NO successBlock:^(NSArray<QBUUser *> *users) { NSLog(@"Registered users: %@", users); } errorBlock:^(QBResponse *response) { NSLog(@"Error: %@", response.error.error.localizedDescription) }];