From 36e04fa0be2ff282a79334dff34aca716ba62e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20DELRIEU?= Date: Wed, 21 Apr 2021 09:54:03 +0200 Subject: [PATCH] TKRTankerOptions: expose sdkType --- Tanker/Headers/TKRTankerOptions.h | 2 ++ Tanker/Sources/TKRTanker.m | 2 +- Tanker/Sources/TKRTankerOptions+Private.m | 21 --------------------- Tanker/Tests/Tests.m | 4 ++-- 4 files changed, 5 insertions(+), 24 deletions(-) delete mode 100644 Tanker/Sources/TKRTankerOptions+Private.m diff --git a/Tanker/Headers/TKRTankerOptions.h b/Tanker/Headers/TKRTankerOptions.h index 1ae970f..9b19cf5 100644 --- a/Tanker/Headers/TKRTankerOptions.h +++ b/Tanker/Headers/TKRTankerOptions.h @@ -28,6 +28,8 @@ */ @property NSString* writablePath; +@property NSString* sdkType; + /*! @brief Create and return an empty TKRTankerOptions. */ diff --git a/Tanker/Sources/TKRTanker.m b/Tanker/Sources/TKRTanker.m index f875c60..4395832 100644 --- a/Tanker/Sources/TKRTanker.m +++ b/Tanker/Sources/TKRTanker.m @@ -7,7 +7,7 @@ #import "TKREncryptionSession+Private.h" #import "TKRInputStreamDataSource+Private.h" #import "TKRTanker+Private.h" -#import "TKRTankerOptions+Private.h" +#import "TKRTankerOptions.h" #import "TKRUtils+Private.h" #import "TKRVerification+Private.h" #import "TKRVerificationKey+Private.h" diff --git a/Tanker/Sources/TKRTankerOptions+Private.m b/Tanker/Sources/TKRTankerOptions+Private.m deleted file mode 100644 index 8f4b128..0000000 --- a/Tanker/Sources/TKRTankerOptions+Private.m +++ /dev/null @@ -1,21 +0,0 @@ - -#import "TKRTankerOptions+Private.h" -#import "TKRUtils+Private.h" - -#import - -@implementation TKRTankerOptions (Private) - -@dynamic sdkType; - -- (void)setSdkType:(NSString*)value -{ - objc_setAssociatedObject(self, @selector(sdkType), value, OBJC_ASSOCIATION_RETAIN); -} - -- (NSString*)sdkType -{ - return objc_getAssociatedObject(self, @selector(sdkType)); -} - -@end diff --git a/Tanker/Tests/Tests.m b/Tanker/Tests/Tests.m index 4349ad9..5f22116 100644 --- a/Tanker/Tests/Tests.m +++ b/Tanker/Tests/Tests.m @@ -4,7 +4,7 @@ #import "TKRError.h" #import "TKRInputStreamDataSource+Private.h" #import "TKRTanker.h" -#import "TKRTankerOptions+Private.h" +#import "TKRTankerOptions.h" #import "TKRVerification.h" #import "TKRVerificationKey.h" @@ -100,7 +100,7 @@ opts.url = url; opts.appID = appID; opts.writablePath = createStorageFullpath(); - opts.sdkType = @"test"; + opts.sdkType = @"sdk-ios-tests"; return opts; }