Browse Source

IOSAD-233 Implement PEPSession

ENGINE-900_IOSAD-233
Dirk Zimmermann 7 months ago
parent
commit
071e94d595
1 changed files with 34 additions and 0 deletions
  1. +34
    -0
      src/PEPSession.m

+ 34
- 0
src/PEPSession.m View File

@ -640,4 +640,38 @@ successCallback:(void (^)(NSString *log))successCallback
return [session disableAllSyncChannels:error];
}
// MARK: - TKA
- (void)tkaSubscribeKeychangeDelegate:(nonnull id<PEPTKADelegate>)delegate
errorCallback:(nonnull void (^)(NSError * _Nonnull))errorCallback
successCallback:(nonnull void (^)(void))successCallback {
dispatch_async(queue, ^{
NSError *error = nil;
BOOL success = [[PEPSessionProvider session] tkaSubscribeKeychangeDelegate:delegate
error:&error];
if (success) {
successCallback();
} else {
errorCallback(error);
}
});
}
- (void)tkaRequestTempKeyMe:(nonnull PEPIdentity *)me
partner:(nonnull PEPIdentity *)partner
errorCallback:(nonnull void (^)(NSError * _Nonnull))errorCallback
successCallback:(nonnull void (^)(void))successCallback {
dispatch_async(queue, ^{
NSError *error = nil;
BOOL success = [[PEPSessionProvider session] tkaRequestTempKeyMe:me
partner:partner
error:&error];
if (success) {
successCallback();
} else {
errorCallback(error);
}
});
}
@end

Loading…
Cancel
Save