|
24 | 24 | #import "PSTCKAPIPostRequest.h" |
25 | 25 | #import <Paystack/Paystack-Swift.h> |
26 | 26 |
|
27 | | -#if __has_include("Fabric.h") |
28 | | -#import "Fabric+FABKits.h" |
29 | | -#import "FABKitProtocol.h" |
30 | | -#endif |
31 | | - |
32 | 27 | #ifdef PSTCK_STATIC_LIBRARY_BUILD |
33 | 28 | #import "PSTCKCategoryLoader.h" |
34 | 29 | #endif |
@@ -61,11 +56,7 @@ + (NSString *)defaultPublicKey { |
61 | 56 |
|
62 | 57 | @end |
63 | 58 |
|
64 | | -#if __has_include("Fabric.h") |
65 | | -@interface PSTCKAPIClient ()<NSURLSessionDelegate, FABKit> |
66 | | -#else |
67 | 59 | @interface PSTCKAPIClient()<NSURLSessionDelegate> |
68 | | -#endif |
69 | 60 | @property (nonatomic, readwrite) NSURL *apiURL; |
70 | 61 | @property (nonatomic, readwrite) NSURLSession *urlSession; |
71 | 62 | @end |
@@ -202,36 +193,6 @@ + (NSString *)paystackUserAgentDetails { |
202 | 193 | return [[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:[details copy] options:0 error:NULL] encoding:NSUTF8StringEncoding]; |
203 | 194 | } |
204 | 195 |
|
205 | | -#pragma mark Fabric |
206 | | -#if __has_include("Fabric.h") |
207 | | - |
208 | | -+ (NSString *)bundleIdentifier { |
209 | | - return @"com.paystack.paystack-ios"; |
210 | | -} |
211 | | - |
212 | | -+ (NSString *)kitDisplayVersion { |
213 | | - return PSTCKSDKVersion; |
214 | | -} |
215 | | - |
216 | | -+ (void)initializeIfNeeded { |
217 | | - Class fabric = NSClassFromString(@"Fabric"); |
218 | | - if (fabric) { |
219 | | - // The app must be using Fabric, as it exists at runtime. We fetch our default public key from Fabric. |
220 | | - NSDictionary *fabricConfiguration = [fabric configurationDictionaryForKitClass:[PSTCKAPIClient class]]; |
221 | | - NSString *publicKey = fabricConfiguration[@"public"]; |
222 | | - if (!publicKey) { |
223 | | - NSLog(@"Configuration dictionary returned by Fabric was nil, or doesn't have publicKey. Can't initialize Paystack."); |
224 | | - return; |
225 | | - } |
226 | | - [self validateKey:publicKey]; |
227 | | - [Paystack setDefaultPublicKey:publicKey]; |
228 | | - } else { |
229 | | - NSCAssert(fabric, @"initializeIfNeeded method called from a project that doesn't have Fabric."); |
230 | | - } |
231 | | -} |
232 | | - |
233 | | -#endif |
234 | | - |
235 | 196 | @end |
236 | 197 |
|
237 | 198 | typedef NS_ENUM(NSInteger, PSTCKChargeStage) { |
|
0 commit comments