Skip to content

Commit

Permalink
Merge pull request #38 from PaystackHQ/patch/fabric
Browse files Browse the repository at this point in the history
Patch/fabric
  • Loading branch information
jubril-paystack authored Aug 7, 2020
2 parents db4fc87 + f710198 commit 1cf3504
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 58 deletions.
2 changes: 1 addition & 1 deletion Paystack.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Paystack'
s.version = '3.0.14'
s.version = '3.0.15'
s.summary = 'Paystack is a web-based API helping African Businesses accept payments online.'
s.description = <<-DESC
Paystack makes it easy for African Businesses to accept Mastercard, Visa and Verve cards from anyone, anywhere in the world.
Expand Down
19 changes: 2 additions & 17 deletions Paystack.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,6 @@
049952CE1BCF13510088C703 /* PSTCKAPIPostRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PSTCKAPIPostRequest.m; sourceTree = "<group>"; };
049952D11BCF13DD0088C703 /* PSTCKAPIClient+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "PSTCKAPIClient+Private.h"; sourceTree = "<group>"; };
049E84AB1A605D93000B66CD /* libPaystack.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPaystack.a; sourceTree = BUILT_PRODUCTS_DIR; };
04A58A461BC603BB004E7BC2 /* FABKitProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FABKitProtocol.h; sourceTree = "<group>"; };
04A58A471BC603BB004E7BC2 /* Fabric+FABKits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Fabric+FABKits.h"; sourceTree = "<group>"; };
04A58A481BC603BB004E7BC2 /* Fabric.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Fabric.h; sourceTree = "<group>"; };
04B33F301BC7417B00DD8120 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
04B94BC71A47B78A00092C46 /* AddressBook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AddressBook.framework; path = System/Library/Frameworks/AddressBook.framework; sourceTree = SDKROOT; };
04CDB4421A5F2E1800B854EE /* Paystack.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Paystack.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -602,17 +599,6 @@
path = Images;
sourceTree = "<group>";
};
04A58A451BC603BB004E7BC2 /* Fabric */ = {
isa = PBXGroup;
children = (
04A58A461BC603BB004E7BC2 /* FABKitProtocol.h */,
04A58A471BC603BB004E7BC2 /* Fabric+FABKits.h */,
04A58A481BC603BB004E7BC2 /* Fabric.h */,
);
name = Fabric;
path = Paystack/Fabric;
sourceTree = "<group>";
};
04B33F2F1BC7414C00DD8120 /* Supporting Files */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -745,7 +731,6 @@
11C74B9A164043050071C2CA /* Frameworks */ = {
isa = PBXGroup;
children = (
04A58A451BC603BB004E7BC2 /* Fabric */,
04365D2C1A4CF86C00A3E1D4 /* CoreGraphics.framework */,
04B94BC71A47B78A00092C46 /* AddressBook.framework */,
04D5BF9019BF958F009521A5 /* PassKit.framework */,
Expand Down Expand Up @@ -1398,7 +1383,7 @@
DEFINES_MODULE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 3.0.14;
MARKETING_VERSION = 3.0.15;
PRODUCT_BUNDLE_IDENTIFIER = "com.paystack.paystack-ios";
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -1417,7 +1402,7 @@
DEFINES_MODULE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MARKETING_VERSION = 3.0.14;
MARKETING_VERSION = 3.0.15;
PRODUCT_BUNDLE_IDENTIFIER = "com.paystack.paystack-ios";
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_VERSION = 5.0;
Expand Down
39 changes: 0 additions & 39 deletions Paystack/PSTCKAPIClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
#import "PSTCKAPIPostRequest.h"
#import <Paystack/Paystack-Swift.h>

#if __has_include("Fabric.h")
#import "Fabric+FABKits.h"
#import "FABKitProtocol.h"
#endif

#ifdef PSTCK_STATIC_LIBRARY_BUILD
#import "PSTCKCategoryLoader.h"
#endif
Expand Down Expand Up @@ -61,11 +56,7 @@ + (NSString *)defaultPublicKey {

@end

#if __has_include("Fabric.h")
@interface PSTCKAPIClient ()<NSURLSessionDelegate, FABKit>
#else
@interface PSTCKAPIClient()<NSURLSessionDelegate>
#endif
@property (nonatomic, readwrite) NSURL *apiURL;
@property (nonatomic, readwrite) NSURLSession *urlSession;
@end
Expand Down Expand Up @@ -202,36 +193,6 @@ + (NSString *)paystackUserAgentDetails {
return [[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:[details copy] options:0 error:NULL] encoding:NSUTF8StringEncoding];
}

#pragma mark Fabric
#if __has_include("Fabric.h")

+ (NSString *)bundleIdentifier {
return @"com.paystack.paystack-ios";
}

+ (NSString *)kitDisplayVersion {
return PSTCKSDKVersion;
}

+ (void)initializeIfNeeded {
Class fabric = NSClassFromString(@"Fabric");
if (fabric) {
// The app must be using Fabric, as it exists at runtime. We fetch our default public key from Fabric.
NSDictionary *fabricConfiguration = [fabric configurationDictionaryForKitClass:[PSTCKAPIClient class]];
NSString *publicKey = fabricConfiguration[@"public"];
if (!publicKey) {
NSLog(@"Configuration dictionary returned by Fabric was nil, or doesn't have publicKey. Can't initialize Paystack.");
return;
}
[self validateKey:publicKey];
[Paystack setDefaultPublicKey:publicKey];
} else {
NSCAssert(fabric, @"initializeIfNeeded method called from a project that doesn't have Fabric.");
}
}

#endif

@end

typedef NS_ENUM(NSInteger, PSTCKChargeStage) {
Expand Down
2 changes: 1 addition & 1 deletion Paystack/PublicHeaders/PSTCKAPIClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#import <UIKit/UIViewController.h>
#endif

static NSString *const __nonnull PSTCKSDKVersion = @"3.0.14";
static NSString *const __nonnull PSTCKSDKVersion = @"3.0.15";
static NSString *const __nonnull PSTCKSDKBuild = @"18";

@class PSTCKCard, PSTCKCardParams, PSTCKTransactionParams, PSTCKToken, PSTCKState;
Expand Down

0 comments on commit 1cf3504

Please sign in to comment.