Skip to content

Commit

Permalink
fix(ios-build): fix build error with Xcode 11.4 (#98)
Browse files Browse the repository at this point in the history
* Fix build error with XCode 11.4.
Fix by upgrading to Stripe iOS SDK 19.

* Bump version

* Update xcode version in CI env.

* Revert "Update xcode version in CI env."

This reverts commit c1f4f64.
  • Loading branch information
RobertGardner authored Mar 30, 2020
1 parent 75023e4 commit ec0c3e1
Show file tree
Hide file tree
Showing 6 changed files with 3,606 additions and 2,301 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Changelog

## 6.3.0 (2020, March 30)
### Fixes
- [(# 97)](https://github.com/triniwiz/nativescript-stripe/issues/97) IOS Build Failed (Xcode >= 11.3). This was fixed by upgrading to Stripe iOS SDK 19.0.1 (from SDK 16.0.6). No code changes were made. This release does not specifically use any new features of SDK 17, 18, or 19. Note that Stripe SDK 19 requires Apple iOS platform 10 or greater (currently supported by > 95% of all iOS devices).

## 6.2.1 (2019, November 21)
### Fixes
- [(# 87)](https://github.com/triniwiz/nativescript-stripe/issues/87) Can't Resolve tns-core-modules/utils/utils.ios
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Stripe Android [v10.2.1 SDK](https://github.com/stripe/stripe-android/releases/t

## iOS

Stripe [iOS 16.0.6 SDK](https://github.com/stripe/stripe-ios/releases/tag/v16.0.6) (pod) is being used
Stripe [iOS 19.0.1 SDK](https://github.com/stripe/stripe-ios/releases/tag/v19.0.1) (pod) is being used

## Angular
To use the Custom Integration's CreditCardView in Angular,
Expand Down
9 changes: 7 additions & 2 deletions src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-stripe",
"version": "6.2.1",
"version": "6.3.0",
"description": "NativeScript Stripe sdk",
"main": "stripe",
"typings": "index.d.ts",
Expand Down Expand Up @@ -50,6 +50,10 @@
"name": "Osei Fortune",
"email": "[email protected]"
},
"repository": {
"type": "git",
"url": "https://github.com/triniwiz/nativescript-stripe"
},
"bugs": {
"url": "https://github.com/triniwiz/nativescript-stripe/issues"
},
Expand All @@ -62,6 +66,7 @@
"@angular/compiler-cli": "8.0.0",
"@angular/core": "8.0.0",
"@angular/platform-browser": "8.0.0",
"@angular/platform-browser-dynamic": "8.0.0",
"@angular/router": "8.0.0",
"nativescript-angular": "8.0.2",
"prompt": "^1.0.0",
Expand All @@ -72,7 +77,7 @@
"tns-platform-declarations": "6.0.1",
"typescript": "3.4.5",
"tslint": "^5.14.0",
"zone.js": "^0.8.4"
"zone.js": "~0.9.1"
},
"bootstrapper": "nativescript-plugin-seed",
"dependencies": {}
Expand Down
4 changes: 2 additions & 2 deletions src/platforms/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
platform :ios, '9.0'
pod 'Stripe', '~> 16.0.6'
platform :ios, '10.0'
pod 'Stripe', '~> 19.0.1'
6 changes: 3 additions & 3 deletions src/standard/standard.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,16 @@ class StripePaymentDelegate extends NSObject implements STPPaymentContextDelegat
this.listener.onPaymentDataChanged(data);
}

paymentContextDidCreatePaymentResultCompletion(paymentContext: STPPaymentContext, paymentResult: STPPaymentResult, completion: (p1: NSError) => void): void {
paymentContextDidCreatePaymentResultCompletion(paymentContext: STPPaymentContext, paymentResult: STPPaymentResult, completion: ((p1: STPPaymentStatus, p2: NSError) => void)): void {
StripeConfig.shared().backendAPI.capturePayment(
paymentResult.paymentMethod.stripeId,
paymentContext.paymentAmount,
createShippingMethod(paymentContext),
createAddress(paymentContext.shippingAddress))
.then(() => {
completion(null);
completion(STPPaymentStatus.Success, null);
}).catch(e => {
completion(createError("PaymentError", 100, e));
completion(null, createError("PaymentError", 100, e));
});
}

Expand Down
Loading

0 comments on commit ec0c3e1

Please sign in to comment.