diff --git a/.github/workflows/SonarCloud.yml b/.github/workflows/SonarCloud.yml index 676df1c..67f68e1 100644 --- a/.github/workflows/SonarCloud.yml +++ b/.github/workflows/SonarCloud.yml @@ -10,7 +10,7 @@ jobs: name: SonarCloud runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Setup environment @@ -29,10 +29,11 @@ jobs: -destination 'platform=iOS Simulator,name=iPhone 8,OS=14.4'\ test - - name: Set up JDK 11 - uses: actions/setup-java@v1 + - name: Set up JDK 17 + uses: actions/setup-java@v3.10.0 with: - java-version: 11 + distribution: 'temurin' + java-version: 17 - name: SonarCloud Analysis env: diff --git a/.github/workflows/deploy_to_cocoapods.yml b/.github/workflows/deploy_to_cocoapods.yml index e8183d6..a3f6923 100644 --- a/.github/workflows/deploy_to_cocoapods.yml +++ b/.github/workflows/deploy_to_cocoapods.yml @@ -10,7 +10,7 @@ jobs: build: runs-on: macos-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Install Cocoapods run: gem install cocoapods diff --git a/.github/workflows/primary.yml b/.github/workflows/primary.yml index adcf76d..fee6942 100644 --- a/.github/workflows/primary.yml +++ b/.github/workflows/primary.yml @@ -9,7 +9,7 @@ jobs: name: Code quality Checks steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Danger uses: docker://ghcr.io/danger/danger-swift-with-swiftlint:3.9.1 with: @@ -23,7 +23,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup environment run: | diff --git a/Gemfile.lock b/Gemfile.lock index 1c9499a..2969c4b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,70 +1,96 @@ GEM remote: https://rubygems.org/ specs: - CFPropertyList (3.0.3) - activesupport (6.1.3.1) + CFPropertyList (3.0.6) + rexml + activesupport (7.1.2) + base64 + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb i18n (>= 1.6, < 2) minitest (>= 5.1) + mutex_m tzinfo (~> 2.0) - zeitwerk (~> 2.3) - addressable (2.7.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.5) + public_suffix (>= 2.0.2, < 6.0) artifactory (3.0.15) atomos (0.1.3) - aws-eventstream (1.1.1) - aws-partitions (1.434.0) - aws-sdk-core (3.113.0) + aws-eventstream (1.2.0) + aws-partitions (1.850.0) + aws-sdk-core (3.186.0) aws-eventstream (~> 1, >= 1.0.2) - aws-partitions (~> 1, >= 1.239.0) - aws-sigv4 (~> 1.1) - jmespath (~> 1.0) - aws-sdk-kms (1.43.0) - aws-sdk-core (~> 3, >= 3.112.0) + aws-partitions (~> 1, >= 1.651.0) + aws-sigv4 (~> 1.5) + jmespath (~> 1, >= 1.6.1) + aws-sdk-kms (1.72.0) + aws-sdk-core (~> 3, >= 3.184.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.92.0) - aws-sdk-core (~> 3, >= 3.112.0) + aws-sdk-s3 (1.136.0) + aws-sdk-core (~> 3, >= 3.181.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.1) - aws-sigv4 (1.2.3) + aws-sigv4 (~> 1.6) + aws-sigv4 (1.6.1) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) - claide (1.0.3) + base64 (0.2.0) + bigdecimal (3.1.4) + claide (1.1.0) clamp (1.3.2) colored (1.2) colored2 (3.1.2) - commander-fastlane (4.4.6) - highline (~> 1.7.2) - concurrent-ruby (1.1.8) + commander (4.6.0) + highline (~> 2.0.0) + concurrent-ruby (1.2.2) + connection_pool (2.4.1) declarative (0.0.20) - declarative-option (0.1.0) - digest-crc (0.6.3) + digest-crc (0.6.5) rake (>= 12.0.0, < 14.0.0) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) - dotenv (2.7.6) - emoji_regex (3.2.2) - excon (0.79.0) - faraday (1.3.0) - faraday-net_http (~> 1.0) - multipart-post (>= 1.2, < 3) + domain_name (0.6.20231109) + dotenv (2.8.1) + drb (2.2.0) ruby2_keywords + emoji_regex (3.2.3) + excon (0.104.0) + faraday (1.10.3) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) faraday-cookie_jar (0.0.7) faraday (>= 0.8.0) http-cookie (~> 1.0.0) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.0.4) + multipart-post (~> 2) faraday-net_http (1.0.1) - faraday_middleware (1.0.0) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) + faraday_middleware (1.2.0) faraday (~> 1.0) - fastimage (2.2.3) - fastlane (2.178.0) + fastimage (2.2.7) + fastlane (2.217.0) CFPropertyList (>= 2.3, < 4.0.0) - addressable (>= 2.3, < 3.0.0) + addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) aws-sdk-s3 (~> 1.0) babosa (>= 1.0.3, < 2.0.0) bundler (>= 1.12.0, < 3.0.0) colored - commander-fastlane (>= 4.4.6, < 5.0.0) + commander (~> 4.6) dotenv (>= 2.1.1, < 3.0.0) emoji_regex (>= 0.1, < 4.0) excon (>= 0.71.0, < 1.0.0) @@ -73,21 +99,23 @@ GEM faraday_middleware (~> 1.0) fastimage (>= 2.1.0, < 3.0.0) gh_inspector (>= 1.1.2, < 2.0.0) - google-api-client (>= 0.37.0, < 0.39.0) - google-cloud-storage (>= 1.15.0, < 2.0.0) - highline (>= 1.7.2, < 2.0.0) + google-apis-androidpublisher_v3 (~> 0.3) + google-apis-playcustomapp_v1 (~> 0.1) + google-cloud-storage (~> 1.31) + highline (~> 2.0) + http-cookie (~> 1.0.5) json (< 3.0.0) jwt (>= 2.1.0, < 3) mini_magick (>= 4.9.4, < 5.0.0) - multipart-post (~> 2.0.0) + multipart-post (>= 2.0.0, < 3.0.0) naturally (~> 2.2) + optparse (~> 0.1.1) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 2.0.0, < 3.0.0) security (= 0.1.3) simctl (~> 1.6.3) - slack-notifier (>= 2.0.0, < 3.0.0) terminal-notifier (>= 2.0.0, < 3.0.0) - terminal-table (>= 1.4.5, < 2.0.0) + terminal-table (~> 3) tty-screen (>= 0.6.3, < 1.0.0) tty-spinner (>= 0.8.0, < 1.0.0) word_wrap (~> 1.0.0) @@ -95,127 +123,119 @@ GEM xcpretty (~> 0.3.0) xcpretty-travis-formatter (>= 0.0.3) gh_inspector (1.1.3) - google-api-client (0.38.0) - addressable (~> 2.5, >= 2.5.1) - googleauth (~> 0.9) - httpclient (>= 2.8.1, < 3.0) - mini_mime (~> 1.0) - representable (~> 3.0) - retriable (>= 2.0, < 4.0) - signet (~> 0.12) - google-apis-core (0.3.0) + google-apis-androidpublisher_v3 (0.52.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-core (0.11.2) addressable (~> 2.5, >= 2.5.1) - googleauth (~> 0.14) - httpclient (>= 2.8.1, < 3.0) + googleauth (>= 0.16.2, < 2.a) + httpclient (>= 2.8.1, < 3.a) mini_mime (~> 1.0) representable (~> 3.0) - retriable (>= 2.0, < 4.0) + retriable (>= 2.0, < 4.a) rexml - signet (~> 0.14) webrick - google-apis-iamcredentials_v1 (0.2.0) - google-apis-core (~> 0.1) - google-apis-storage_v1 (0.3.0) - google-apis-core (~> 0.1) + google-apis-iamcredentials_v1 (0.17.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-playcustomapp_v1 (0.13.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-storage_v1 (0.29.0) + google-apis-core (>= 0.11.0, < 2.a) google-cloud-core (1.6.0) google-cloud-env (~> 1.0) google-cloud-errors (~> 1.0) - google-cloud-env (1.5.0) - faraday (>= 0.17.3, < 2.0) - google-cloud-errors (1.1.0) - google-cloud-storage (1.31.0) - addressable (~> 2.5) + google-cloud-env (1.6.0) + faraday (>= 0.17.3, < 3.0) + google-cloud-errors (1.3.1) + google-cloud-storage (1.45.0) + addressable (~> 2.8) digest-crc (~> 0.4) google-apis-iamcredentials_v1 (~> 0.1) - google-apis-storage_v1 (~> 0.1) - google-cloud-core (~> 1.2) - googleauth (~> 0.9) + google-apis-storage_v1 (~> 0.29.0) + google-cloud-core (~> 1.6) + googleauth (>= 0.16.2, < 2.a) mini_mime (~> 1.0) - googleauth (0.16.0) - faraday (>= 0.17.3, < 2.0) + googleauth (1.8.1) + faraday (>= 0.17.3, < 3.a) jwt (>= 1.4, < 3.0) - memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) - signet (~> 0.14) - highline (1.7.10) - http-cookie (1.0.3) + signet (>= 0.16, < 2.a) + highline (2.0.3) + http-cookie (1.0.5) domain_name (~> 0.5) httpclient (2.8.3) - i18n (1.8.10) + i18n (1.14.1) concurrent-ruby (~> 1.0) - jmespath (1.4.0) - json (2.5.1) - jwt (2.2.2) - memoist (0.16.2) - mini_magick (4.11.0) - mini_mime (1.0.2) - mini_portile2 (2.5.3) - minitest (5.14.4) + jmespath (1.6.2) + json (2.6.3) + jwt (2.7.1) + mini_magick (4.12.0) + mini_mime (1.1.5) + mini_portile2 (2.8.5) + minitest (5.20.0) multi_json (1.15.0) - multipart-post (2.0.0) + multipart-post (2.3.0) + mutex_m (0.2.0) nanaimo (0.3.0) naturally (2.2.1) - nokogiri (1.11.7) - mini_portile2 (~> 2.5.0) + nokogiri (1.15.4) + mini_portile2 (~> 2.8.2) racc (~> 1.4) - os (1.1.1) - plist (3.6.0) - public_suffix (4.0.6) - racc (1.5.2) - rake (13.0.3) - representable (3.0.4) + optparse (0.1.1) + os (1.1.4) + plist (3.7.0) + public_suffix (5.0.3) + racc (1.7.3) + rake (13.1.0) + representable (3.2.0) declarative (< 0.1.0) - declarative-option (< 0.2.0) + trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) retriable (3.1.2) - rexml (3.2.5) + rexml (3.2.6) rouge (2.0.7) - ruby2_keywords (0.0.4) - rubyzip (2.3.0) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) security (0.1.3) - signet (0.15.0) - addressable (~> 2.3) - faraday (>= 0.17.3, < 2.0) + signet (0.18.0) + addressable (~> 2.8) + faraday (>= 0.17.5, < 3.a) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) - simctl (1.6.8) + simctl (1.6.10) CFPropertyList naturally - slack-notifier (2.3.2) - slather (2.7.1) + slather (2.8.0) CFPropertyList (>= 2.2, < 4) activesupport clamp (~> 1.3) - nokogiri (~> 1.11) - xcodeproj (~> 1.7) + nokogiri (>= 1.14.3) + xcodeproj (~> 1.21) terminal-notifier (2.0.0) - terminal-table (1.8.0) - unicode-display_width (~> 1.1, >= 1.1.1) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + trailblazer-option (0.1.2) tty-cursor (0.7.1) tty-screen (0.8.1) tty-spinner (0.9.3) tty-cursor (~> 0.7) - tzinfo (2.0.4) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) uber (0.1.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.7.7) - unicode-display_width (1.7.0) - webrick (1.7.0) + unicode-display_width (2.5.0) + webrick (1.8.1) word_wrap (1.0.0) - xcodeproj (1.19.0) + xcodeproj (1.23.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) colored2 (~> 3.1) nanaimo (~> 0.3.0) + rexml (~> 3.2.4) xcpretty (0.3.0) rouge (~> 2.0.7) xcpretty-travis-formatter (1.0.1) xcpretty (~> 0.2, >= 0.0.7) - zeitwerk (2.4.2) PLATFORMS ruby @@ -225,4 +245,4 @@ DEPENDENCIES slather BUNDLED WITH - 2.2.16 + 2.4.10 diff --git a/Paystack/PublicHeaders/PSTCKAPIClient.h b/Paystack/PublicHeaders/PSTCKAPIClient.h index 80f45ba..fd08463 100644 --- a/Paystack/PublicHeaders/PSTCKAPIClient.h +++ b/Paystack/PublicHeaders/PSTCKAPIClient.h @@ -78,7 +78,7 @@ typedef void (^PSTCKNotifyCompletionBlock)(void); onViewController:(nonnull UIViewController *)viewController didEndWithError:(nonnull PSTCKErrorCompletionBlock)errorCompletion didRequestValidation:(nonnull PSTCKTransactionCompletionBlock)beforeValidateCompletion - didTransactionSuccess:(nonnull PSTCKTransactionCompletionBlock)successCompletion; + didTransactionSuccess:(nonnull PSTCKTransactionCompletionBlock)successCompletion __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios"))); /// Charges a card using the Paystack API /// @param card The user's card details. Cannot be nil @@ -95,7 +95,7 @@ typedef void (^PSTCKNotifyCompletionBlock)(void); didRequestValidation:(nonnull PSTCKTransactionCompletionBlock)beforeValidateCompletion willPresentDialog:(nonnull PSTCKNotifyCompletionBlock)showingDialogCompletion dismissedDialog:(nonnull PSTCKNotifyCompletionBlock)dialogDismissedCompletion - didTransactionSuccess:(nonnull PSTCKTransactionCompletionBlock)successCompletion; + didTransactionSuccess:(nonnull PSTCKTransactionCompletionBlock)successCompletion __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios"))); - (void) chargeCard:(nonnull PSTCKCardParams *)card forTransaction:(nonnull PSTCKTransactionParams *)transaction @@ -103,8 +103,8 @@ typedef void (^PSTCKNotifyCompletionBlock)(void); didEndWithError:(nonnull PSTCKErrorCompletionBlock)errorCompletion willPresentDialog:(nonnull PSTCKNotifyCompletionBlock)showingDialogCompletion dismissedDialog:(nonnull PSTCKNotifyCompletionBlock)dialogDismissedCompletion - didTransactionSuccess:(nonnull PSTCKTransactionCompletionBlock)successCompletion; + didTransactionSuccess:(nonnull PSTCKTransactionCompletionBlock)successCompletion __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios"))); -- (void) setProcessingStatus:(Boolean)status; +- (void) setProcessingStatus:(Boolean)status __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios"))); @end diff --git a/Paystack/PublicHeaders/PSTCKCard.h b/Paystack/PublicHeaders/PSTCKCard.h index 500b93f..b95d492 100644 --- a/Paystack/PublicHeaders/PSTCKCard.h +++ b/Paystack/PublicHeaders/PSTCKCard.h @@ -67,24 +67,24 @@ typedef NS_ENUM(NSInteger, PSTCKCardFundingType) { /** * The Paystack ID for the card. */ -@property (nonatomic, readonly, nullable) NSString *cardId; +@property (nonatomic, readonly, nullable) NSString *cardId __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios"))); /** * The issuer of the card. */ -@property (nonatomic, readonly) PSTCKCardBrand brand; +@property (nonatomic, readonly) PSTCKCardBrand brand __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios"))); /** * The issuer of the card. * Can be one of "Visa", "American Express", "MasterCard", "Discover", "JCB", "Diners Club", or "Unknown" * @deprecated use "brand" instead. */ -@property (nonatomic, readonly, nonnull) NSString *type __attribute__((deprecated)); +@property (nonatomic, readonly, nonnull) NSString *type __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios"))); /** * The funding source for the card (credit, debit, prepaid, or other) */ -@property (nonatomic, readonly) PSTCKCardFundingType funding; +@property (nonatomic, readonly) PSTCKCardFundingType funding __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios"))); /** * A proxy for the card's number, this uniquely identifies the credit card and can be used to compare different cards. @@ -95,12 +95,12 @@ typedef NS_ENUM(NSInteger, PSTCKCardFundingType) { /** * Two-letter ISO code representing the issuing country of the card. */ -@property (nonatomic, readonly, nullable) NSString *country; +@property (nonatomic, readonly, nullable) NSString *country __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios"))); /** * This is only applicable when tokenizing debit cards to issue payouts to managed accounts. You should not set it otherwise. The card can then be used as a transfer destination for funds in this currency. */ -@property (nonatomic, copy, nullable) NSString *currency; +@property (nonatomic, copy, nullable) NSString *currency __attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios"))); #pragma mark - deprecated properties diff --git a/Paystack/PublicHeaders/PSTCKTransactionParams.h b/Paystack/PublicHeaders/PSTCKTransactionParams.h index 85b31db..4b2d0f2 100644 --- a/Paystack/PublicHeaders/PSTCKTransactionParams.h +++ b/Paystack/PublicHeaders/PSTCKTransactionParams.h @@ -24,17 +24,21 @@ - (nullable PSTCKTransactionParams *) setMetadataValue:(nonnull NSString*)value forKey:(nonnull NSString*)key - error:(NSError * _Nullable __autoreleasing * _Nonnull) error; + error:(NSError * _Nullable __autoreleasing * _Nonnull) error +__attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios"))); - (nullable PSTCKTransactionParams *) setMetadataValueDict:(nonnull NSMutableDictionary*)dict forKey:(nonnull NSString*)key - error:(NSError * _Nullable __autoreleasing * _Nonnull) error; + error:(NSError * _Nullable __autoreleasing * _Nonnull) error +__attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios"))); - (nullable PSTCKTransactionParams *) setMetadataValueArray:(nonnull NSMutableArray*)arr forKey:(nonnull NSString*)key - error:(NSError * _Nullable __autoreleasing * _Nonnull) error; + error:(NSError * _Nullable __autoreleasing * _Nonnull) error +__attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios"))); - (nullable PSTCKTransactionParams *) setCustomFieldValue:(nonnull NSString*)value displayedAs:(nonnull NSString*)display_name - error:(NSError * _Nullable __autoreleasing * _Nonnull) error; + error:(NSError * _Nullable __autoreleasing * _Nonnull) error +__attribute__((deprecated("This SDK has been deprecated, Please refer to our new SDK: https://github.com/PaystackHQ/paystack-sdk-ios"))); @end diff --git a/Paystack/UI/PSTCKPaymentCardTextField.m b/Paystack/UI/PSTCKPaymentCardTextField.m index 9b95968..0e326fa 100644 --- a/Paystack/UI/PSTCKPaymentCardTextField.m +++ b/Paystack/UI/PSTCKPaymentCardTextField.m @@ -13,7 +13,7 @@ #import "UIImage+Paystack.h" #define FAUXPAS_IGNORED_IN_METHOD(...) - +__deprecated @interface PSTCKPaymentCardTextField() @property(nonatomic, readwrite, strong)PSTCKFormTextField *sizingField;