Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add withExceptionResolver to Android Terminal init function #491

Merged
merged 4 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class StripeTerminalReactNativeModule(reactContext: ReactApplicationContext) :

@ReactMethod
@Suppress("unused")
fun initialize(params: ReadableMap, promise: Promise) {
fun initialize(params: ReadableMap, promise: Promise) = withExceptionResolver(promise) {
UiThreadUtil.runOnUiThread { onCreate(context.applicationContext as Application) }

val result = if (!Terminal.isInitialized()) {
Expand Down
7 changes: 4 additions & 3 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ workflows:
- content: |-
set -e
# This is a terrible hack, as I haven't worked out how Bitrise's `pod install` step interacts with the rbenv set in this app. You definitely shouldn't copy this.
cd dev-app/ios && rbenv install 2.7.4 && bundle install && \
cd dev-app/ios && asdf install ruby 2.7.4 && bundle install && \
gem install cocoapods -v 1.12.1 && pod install && cd - && \
echo "Checking for diffs in pod lockfile, if this fails please ensure all dependencies are up to date" && \
git diff --exit-code
Expand Down Expand Up @@ -136,8 +136,8 @@ workflows:
- complete_all
meta:
bitrise.io:
stack: osx-xcode-14.0.x-ventura
machine_type_id: g2.12core
stack: linux-docker-android-20.04
machine_type_id: elite-xl
example-build-ios:
steps:
- cocoapods-install@2:
Expand Down Expand Up @@ -176,6 +176,7 @@ workflows:
- script@1:
inputs:
- content: |-
asdf install nodejs 16.15.0
echo 'export PATH="$PATH:~/project/node_modules/.bin:~/project/dev-app/node_modules/.bin"' >> $BASH_ENV
source $BASH_ENV
brew update >/dev/null
Expand Down