From f2155856d6762f38509f8512b43df1ecc53fa1fe Mon Sep 17 00:00:00 2001 From: Tyler Coffman Date: Tue, 30 Apr 2024 08:45:07 -0700 Subject: [PATCH] Fix Expo SDK 50 Build Issues. Fix issues that cause build errors when building an Expo app. --- android/build.gradle | 14 +++++++++----- ios/ReactNativePayments.h | 4 ---- react-native-payments.podspec | 6 +++++- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 0d066bd1..b0aa8498 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,12 +1,16 @@ apply plugin: 'com.android.library' +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + android { - compileSdkVersion 28 - buildToolsVersion "28.0.3" + compileSdkVersion safeExtGet("compileSdkVersion", 28) + buildToolsVersion safeExtGet("buildToolsVersion", "28.0.3") defaultConfig { - minSdkVersion 21 - targetSdkVersion 28 + minSdkVersion safeExtGet("minSdkVersion", 21) + targetSdkVersion safeExtGet("targetSdkVersion", 28) versionCode 1 versionName "1.0" ndk { @@ -14,7 +18,7 @@ android { } } lintOptions { - warning 'InvalidPackage' + warning 'InvalidPackage' } } diff --git a/ios/ReactNativePayments.h b/ios/ReactNativePayments.h index 8a5d1bfe..a67f7b47 100644 --- a/ios/ReactNativePayments.h +++ b/ios/ReactNativePayments.h @@ -2,11 +2,7 @@ @import PassKit; @import AddressBook; -#if __has_include("RCTBridgeModule.h") -#import "RCTBridgeModule.h" -#else #import -#endif #import "GatewayManager.h" diff --git a/react-native-payments.podspec b/react-native-payments.podspec index 3a866ece..9705bb08 100644 --- a/react-native-payments.podspec +++ b/react-native-payments.podspec @@ -15,5 +15,9 @@ Pod::Spec.new do |s| s.requires_arc = true s.dependency 'React' - s.dependency 'Stripe', '~> 19' + + # Stripe support on this fork is completely untested. This change to depend on + # stripe 23 is to fix simulator build issues in our app. We do not use stripe, + # and I make no guarantee that this works. + s.dependency 'Stripe', '~> 23' end