Skip to content

Commit

Permalink
Merge pull request #47 from xendit/feat/CC-6266-support-spm
Browse files Browse the repository at this point in the history
[CC-6266] support Swift Package Manager
  • Loading branch information
andysg012 authored Mar 14, 2022
2 parents a0c80cb + 9bd076c commit abab165
Show file tree
Hide file tree
Showing 169 changed files with 4,395 additions and 1,162 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

## Build generated
build/
.build/
DerivedData/

## Various settings
Expand Down Expand Up @@ -45,10 +46,13 @@ Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md

fastlane/report.xml
fastlane/screenshots

# SPM
.swiftpm/
42 changes: 42 additions & 0 deletions CardinalMobile.xcframework/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_armv7</string>
<key>LibraryPath</key>
<string>CardinalMobile.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>armv7</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_i386_x86_64-simulator</string>
<key>LibraryPath</key>
<string>CardinalMobile.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>i386</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
//
// AuthenticationRequestParameters.h
// CardinalEMVCoSDK
//
// Copyright © 2018 Cardinal Commerce. All rights reserved.
//

#import <Foundation/Foundation.h>

/**
* The AuthenticationRequestParameters class holds transaction data that the App passes to the 3DS Server for creating the AReq.
*/
@interface AuthenticationRequestParameters : NSObject

- (id _Nonnull ) initWithSDKTransactionId: (NSString *_Nonnull) sdkTransactionId
deviceData: (NSString *_Nonnull) deviceData
sdkEphemeralPublicKey: (NSString *_Nonnull) sdkEphemeralPublicKey
sdkAppID: (NSString *_Nonnull) sdkAppID
sdkReferenceNumber: (NSString *_Nonnull) sdkReferenceNumber
messageVersion: (NSString *_Nonnull) messageVersion;

/**
* @property sdkTransactionID SDK Transaction ID.
*/
@property (nonnull, nonatomic, strong, readonly) NSString* sdkTransactionID;

/**
* @property deviceData Device data collected by the SDK.
*/
@property (nullable, nonatomic, strong, readonly) NSString* deviceData;

/**
* @property sdkEphemeralPublicKey SDK Ephemeral Public Key (Qc).
*/
@property (nonnull, nonatomic, strong, readonly) NSString* sdkEphemeralPublicKey;

/**
* @property sdkAppID SDK App ID.
*/
@property (nonnull, nonatomic, strong, readonly) NSString* sdkAppID;

/**
* @property sdkReferenceNumber SDK Reference Number.
*/
@property (nonnull, nonatomic, strong, readonly) NSString* sdkReferenceNumber;

/**
* @property messageVersion Protocol version that is supported by the SDK and used for the transaction.
*/
@property (nonnull, nonatomic, strong, readonly) NSString* messageVersion;

/**
* The getDeviceData method returns the encrypted device data as a string.
* @return NSString
*/
- (NSString *_Nullable) getDeviceData;

/**
* The getSDKTransactionID method returns the SDK Transaction ID.
* @return NSString
*/
- (NSString *_Nonnull) getSDKTransactionID;

/**
* The getSDKAppID method returns the SDK App ID.
* @return NSString
*/
- (NSString *_Nonnull) getSDKAppID;

/**
* The getSDKReferenceNumber method returns the SDK Reference Number.
* @return NSString
*/
- (NSString *_Nonnull) getSDKReferenceNumber;

/**
* The getSDKEphemeralPublicKey method returns the SDK Ephemeral Public Key.
* @return NSString
*/
- (NSString *_Nonnull) getSDKEphemeralPublicKey;

/**
* The getMessageVersion method returns the protocol version that is used for the transaction.
* @return NSString
*/
- (NSString *_Nonnull) getMessageVersion;

+ (instancetype _Nonnull )new NS_UNAVAILABLE;
- (instancetype _Nonnull )init NS_UNAVAILABLE;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// ButtonCustomization.h
// CardinalEMVCoSDK
//
// Copyright © 2018 Cardinal Commerce. All rights reserved.
//

#import "Customization.h"

/**
* The ButtonCustomization class provides methods for the 3DS Requestor App to pass button customization parameters to the 3DS SDK.
*/
@interface ButtonCustomization : Customization

/**
* @property backgroundColor Colour code in Hex format. For example, the colour code can be “#999999”.
*/
@property (nonatomic, strong) NSString* backgroundColor;

/**
* @property cornerRadius Radius (integer value) for the button corners.
*/
@property int cornerRadius;

@end
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// CardinalEMVCoSDK.h
// CardinalEMVCoSDK
//
// Copyright © 2018 Cardinal Commerce. All rights reserved.
//

#import <UIKit/UIKit.h>

#import <CardinalMobile/CardinalResponse.h>
#import <CardinalMobile/CardinalSession.h>
#import <CardinalMobile/CardinalSessionConfiguration.h>
#import <CardinalMobile/CardinalSession.h>
#import <CardinalMobile/CardinalStepUpDelegate.h>
#import <CardinalMobile/DirectoryServerIDConst.h>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// CardinalEMVCoSDK.h
// CardinalEMVCoSDK
//
// Copyright © 2018 Cardinal Commerce. All rights reserved.
//

#import <UIKit/UIKit.h>

#import <CardinalMobile/ThreeDS2Service.h>
#import <CardinalMobile/Transaction.h>
#import <CardinalMobile/ConfigParameters.h>
#import <CardinalMobile/UiCustomization.h>

#import <CardinalMobile/CardinalThreeDS2ServiceImpl.h>
#import <CardinalMobile/CardinalTransaction.h>
#import <CardinalMobile/ProgressDialog.h>
#import <CardinalMobile/ChallengeStatusReceiver.h>
#import <CardinalMobile/ChallengeParameters.h>
#import <CardinalMobile/CompletionEvent.h>
#import <CardinalMobile/RuntimeErrorEvent.h>
#import <CardinalMobile/ProtocolErrorEvent.h>

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// CardinalMobile.h
// CardinalMobile
//
// Created by Sudeep Tuladhar on 10/23/18.
// Copyright © 2018 Cardinal Commerce. All rights reserved.
//

#import <UIKit/UIKit.h>

//! Project version number for CardinalMobile.
FOUNDATION_EXPORT double CardinalMobileVersionNumber;

//! Project version string for CardinalMobile.
FOUNDATION_EXPORT const unsigned char CardinalMobileVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <CardinalMobile/PublicHeader.h>

#import <CardinalMobile/CardinalCMSDK.h>
#import <CardinalMobile/CardinalEMVCoSDK.h>
Loading

0 comments on commit abab165

Please sign in to comment.