From 02d4997a5efdf220dd820fc689f9d249cb61aece Mon Sep 17 00:00:00 2001 From: Nazli Yurdakul <69359432+nazli-stripe@users.noreply.github.com> Date: Thu, 12 Dec 2024 18:07:57 -0500 Subject: [PATCH] Fix build issues (#859) * iphone 15 * ios 17.2 * xcode 15.4 * latest ios * xcode test 6 * bitrise recommended yml * format * latest bitrise * prettier * update unit-ios to run the script from workflow * deploy to bitrise-io * revert changes * bootstrap pods * revert that * bundle update * remove deploy to bitrise io * fix unsafe gets --- .../StripeTerminalReactNativeModule.kt | 12 ++++++------ bitrise.yml | 6 +++--- dev-app/Gemfile.lock | 9 ++++----- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/android/src/main/java/com/stripeterminalreactnative/StripeTerminalReactNativeModule.kt b/android/src/main/java/com/stripeterminalreactnative/StripeTerminalReactNativeModule.kt index 4ff553ed..d0b69597 100644 --- a/android/src/main/java/com/stripeterminalreactnative/StripeTerminalReactNativeModule.kt +++ b/android/src/main/java/com/stripeterminalreactnative/StripeTerminalReactNativeModule.kt @@ -895,9 +895,9 @@ class StripeTerminalReactNativeModule(reactContext: ReactApplicationContext) : val toggle = array.getMap(i) toggles.add( Toggle( - toggle.getString("title"), - toggle.getString("description"), - if (toggle.getString("defaultValue") == "enabled") { + toggle?.getString("title"), + toggle?.getString("description"), + if (toggle?.getString("defaultValue") == "enabled") { ToggleValue.ENABLED } else { ToggleValue.DISABLED @@ -919,7 +919,7 @@ class StripeTerminalReactNativeModule(reactContext: ReactApplicationContext) : val listInput = ArrayList() for (i in 0 until collectInputs.size()) { val collectInput = collectInputs.getMap(i) - when (collectInput.getString("formType")) { + when (collectInput?.getString("formType")) { "text" -> { collectInput.let { var toggles = ArrayList() @@ -1012,12 +1012,12 @@ class StripeTerminalReactNativeModule(reactContext: ReactApplicationContext) : val button = array.getMap(i) listSelectionButtons.add( SelectionButton( - if (button.getString("style") == "primary") { + if (button?.getString("style") == "primary") { SelectionButtonStyle.PRIMARY } else { SelectionButtonStyle.SECONDARY }, - button.getString("text") ?: "" + button?.getString("text") ?: "" ) ) } diff --git a/bitrise.yml b/bitrise.yml index c5b573d5..007eb2f6 100644 --- a/bitrise.yml +++ b/bitrise.yml @@ -261,11 +261,11 @@ workflows: - complete_all unit-ios: steps: - - xcode-test@5: + - xcode-test@6: inputs: - project_path: dev-app/ios/StripeTerminalReactNativeDevApp.xcworkspace - scheme: UnitTests - - destination: platform=iOS Simulator,name=iPhone 14,OS=latest + - destination: platform=iOS Simulator,name=iPhone 15,OS=latest - command: yarn unit-test:ios - cache_local_deps: 'yes' title: xcodebuild iOS Unit Tests @@ -276,7 +276,7 @@ workflows: - complete_all meta: bitrise.io: - stack: osx-xcode-15.2.x + stack: osx-xcode-15.4.x machine_type_id: g2.mac.large app: envs: diff --git a/dev-app/Gemfile.lock b/dev-app/Gemfile.lock index d1605509..a828d0f1 100644 --- a/dev-app/Gemfile.lock +++ b/dev-app/Gemfile.lock @@ -75,21 +75,19 @@ GEM netrc (0.11.0) nkf (0.2.0) public_suffix (4.0.7) - rexml (3.3.6) - strscan + rexml (3.3.9) ruby-macho (2.5.1) - strscan (3.1.0) typhoeus (1.4.1) ethon (>= 0.9.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - xcodeproj (1.25.0) + xcodeproj (1.25.1) 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.3.2, < 4.0) + rexml (>= 3.3.6, < 4.0) PLATFORMS ruby @@ -97,6 +95,7 @@ PLATFORMS DEPENDENCIES activesupport (>= 6.1.7.3, < 7.1.0) cocoapods (~> 1.15.2) + xcodeproj (= 1.25.1) RUBY VERSION ruby 3.2.3p157