From b7454ed7e05216ae93d382b6eadc273f26b3e33d Mon Sep 17 00:00:00 2001 From: Tamas Toth Date: Fri, 3 Nov 2023 16:22:27 +0100 Subject: [PATCH] NEVISACCESSAPP-5323: Add GitHub actions --- .editorconfig | 15 + .github/actions/build-android/action.yml | 50 +-- .github/actions/build-ios/action.yml | 52 +--- .github/actions/get-version/action.yml | 17 +- .github/actions/git-tag/action.yml | 27 +- .github/actions/release-android/action.yml | 69 +++++ .github/actions/release-ios/action.yml | 60 ++++ .github/actions/setup-android/action.yml | 29 ++ .github/actions/setup-ios/action.yml | 38 +++ .../actions/{setup => setup-node}/action.yml | 8 +- .github/actions/slack-report/action.yml | 34 --- .../actions/slack-report/message_payload.json | 44 --- .github/actions/update-config/action.yml | 17 ++ .github/workflows/main.yml | 90 +++--- .github/workflows/pr.yml | 43 ++- .gitignore | 7 + README.md | 4 +- android/Gemfile | 6 + android/Gemfile.lock | 223 ++++++++++++++ android/app/build.gradle | 6 +- .../app/src/main/assets/index.android.bundle | 0 android/fastlane/Appfile | 2 + android/fastlane/Fastfile | 100 ++++++ android/fastlane/Pluginfile | 5 + android/fastlane/README.md | 42 +++ .../fastlane/actions/modify_gradle_file.rb | 116 +++++++ ios/Gemfile | 7 + ios/Gemfile.lock | 287 ++++++++++++++++++ ios/Podfile.lock | 2 +- ios/fastlane/Appfile | 6 + ios/fastlane/Fastfile | 137 +++++++++ ios/fastlane/Pluginfile | 5 + ios/fastlane/README.md | 40 +++ package.json | 3 +- yarn.lock | 164 ++++++++++ 35 files changed, 1535 insertions(+), 220 deletions(-) create mode 100644 .editorconfig create mode 100644 .github/actions/release-android/action.yml create mode 100644 .github/actions/release-ios/action.yml create mode 100644 .github/actions/setup-android/action.yml create mode 100644 .github/actions/setup-ios/action.yml rename .github/actions/{setup => setup-node}/action.yml (75%) delete mode 100644 .github/actions/slack-report/action.yml delete mode 100644 .github/actions/slack-report/message_payload.json create mode 100644 .github/actions/update-config/action.yml create mode 100644 android/Gemfile create mode 100644 android/Gemfile.lock create mode 100644 android/app/src/main/assets/index.android.bundle create mode 100644 android/fastlane/Appfile create mode 100644 android/fastlane/Fastfile create mode 100644 android/fastlane/Pluginfile create mode 100644 android/fastlane/README.md create mode 100644 android/fastlane/actions/modify_gradle_file.rb create mode 100644 ios/Gemfile create mode 100644 ios/Gemfile.lock create mode 100644 ios/fastlane/Appfile create mode 100644 ios/fastlane/Fastfile create mode 100644 ios/fastlane/Pluginfile create mode 100644 ios/fastlane/README.md diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..898e3f1 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] + +indent_style = tab +indent_size = 4 + +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/.github/actions/build-android/action.yml b/.github/actions/build-android/action.yml index 3a32cab..b4db5b9 100644 --- a/.github/actions/build-android/action.yml +++ b/.github/actions/build-android/action.yml @@ -1,13 +1,9 @@ name: Build Android -description: Build Android example app - Required environment variables - * JAVA_VERSION - * GITHUB_USERNAME - * GITHUB_PERSONAL_ACCESS_TOKEN +description: Build Android App inputs: - build-4-new-arch: - description: "If true, the artifact will be built for the new architecture." + new-arch-enabled: + description: "Flag that tells whether enable support to the new architecture." required: true runs: @@ -15,36 +11,22 @@ runs: steps: - name: Setup id: setup-node - uses: ./.github/actions/setup + uses: ./.github/actions/setup-node with: - build-4-new-arch: ${{ inputs.build-4-new-arch }} + new-arch-enabled: ${{ inputs.new-arch-enabled }} - - name: Install JDK - uses: actions/setup-java@v3 + - name: Set up Android + uses: ./.github/actions/setup-android with: - distribution: 'zulu' - java-version: ${{ env.JAVA_VERSION }} + cache-gradle: ${{ steps.setup-node.outputs.cache-hit == 'true' }} - - name: Finalize Android SDK + - name: Build Android App shell: bash - run: /bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null" + run: | + if [[ ${{ inputs.new-arch-enabled }} == 'true' ]]; then + NEW_ARCH_ENABLED=true + else + NEW_ARCH_ENABLED=false + fi - - name: Cache Gradle - if: steps.setup-node.outputs.cache-hit == 'true' - uses: actions/cache@v3 - with: - path: | - ~/.gradle/wrapper - ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('android/gradle/wrapper/gradle-wrapper.properties') }}-${{ inputs.build-4-new-arch == 'true' && 'new-arch' || 'old-arch' }}-${{ env.BUILD_TYPE }} - - - name: Build example for Android - shell: bash - run: yarn android:build - - - name: Slack report - if: ${{ github.ref == 'refs/heads/main' }} - uses: ./.github/actions/slack-report - with: - platform: 'iOS' - is-workflow-state-success: success() + yarn react-native build-android --mode Debug --extra-params -PnewArchEnabled=$NEW_ARCH_ENABLED diff --git a/.github/actions/build-ios/action.yml b/.github/actions/build-ios/action.yml index 197c9e9..b306ff3 100644 --- a/.github/actions/build-ios/action.yml +++ b/.github/actions/build-ios/action.yml @@ -1,54 +1,26 @@ name: Build iOS -description: Build iOS example app - Required environment variables - * XCODE_VERSION +description: Build iOS App inputs: - build-4-new-arch: - description: "If true, the artifact will be built for the new architecture." + new-arch-enabled: + description: "Flag that tells whether enable support to the new architecture." required: true runs: using: composite steps: - - name: Set Xcode version - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: ${{ env.XCODE_VERSION }} - - - name: Setup + - name: Set up Node id: setup-node - uses: ./.github/actions/setup + uses: ./.github/actions/setup-node with: - build-4-new-arch: ${{ inputs.build-4-new-arch }} + new-arch-enabled: ${{ inputs.new-arch-enabled }} - - name: Cache cocoapods - if: steps.setup-node.outputs.cache-hit == 'true' - id: cocoapods-cache - uses: actions/cache@v3 + - name: Set up iOS + uses: ./.github/actions/setup-ios with: - path: | - **/ios/Pods - **/ios/build/generated - key: ${{ runner.os }}-cocoapods-${{ hashFiles('ios/Podfile.lock') }}-${{ inputs.build-4-new-arch == 'true' && 'new-arch' || 'old-arch' }}-${{ env.BUILD_TYPE }} - - - name: Install cocoapods - new architecture - shell: bash - if: steps.cocoapods-cache.outputs.cache-hit != 'true' && inputs.build-4-new-arch == 'true' - run: yarn pods:new + new-arch-enabled: ${{ inputs.new-arch-enabled }} + cache-cocoapods: ${{ steps.setup-node.outputs.cache-hit == 'true' }} - - name: Install cocoapods - old architecture + - name: Build iOS App shell: bash - if: steps.cocoapods-cache.outputs.cache-hit != 'true' && inputs.build-4-new-arch == 'false' - run: yarn pods:old - - - name: Build example for iOS - shell: bash - run: yarn ios:build - - - name: Slack report - if: ${{ github.ref == 'refs/heads/main' }} - uses: ./.github/actions/slack-report - with: - platform: 'iOS' - is-workflow-state-success: success() + run: yarn react-native build-ios --mode Debug diff --git a/.github/actions/get-version/action.yml b/.github/actions/get-version/action.yml index 7ddeaf6..9343fc5 100644 --- a/.github/actions/get-version/action.yml +++ b/.github/actions/get-version/action.yml @@ -1,19 +1,28 @@ name: Get Version description: Retrieves the version and build number of the app +outputs: + version-number: + description: "The current version" + value: ${{ steps.get_version_number.outputs.version_number }} + build-number: + description: "The generated build number" + value: ${{ steps.get_build_number.outputs.build_number }} + runs: using: composite + steps: - name: Get version number id: get_version_number shell: bash run: | - VERSION=$(cat ./package.json | jq '.version') - echo "VERSION_NUMBER=${VERSION}" >> $GITHUB_ENV + VERSION=$(cat ./package.json | jq -r '.version') + echo "version_number=$(echo $VERSION)" >> $GITHUB_OUTPUT echo Version number is $VERSION - name: Generate Build Number - id: build_number + id: get_build_number uses: onyxmueller/build-tag-number@v1 with: - token: ${{env.GITHUB_TOKEN}} + token: ${{ env.GITHUB_TOKEN }} diff --git a/.github/actions/git-tag/action.yml b/.github/actions/git-tag/action.yml index 36f54de..5703c37 100644 --- a/.github/actions/git-tag/action.yml +++ b/.github/actions/git-tag/action.yml @@ -1,24 +1,37 @@ name: Create Git Tag description: Creates a git tag for the current repository - Required environment variables - * BUILD_NUMBER - * VERSION_NUMBER - * GITHUB_TOKEN + +inputs: + version-number: + description: "The current version number" + required: false + build-number: + description: "The current build number" + required: false runs: using: composite - steps: - name: Create Tag uses: actions/github-script@v6 env: - TAG_NAME: release/${{ env.VERSION_NUMBER }}/${{ env.BUILD_NUMBER }} + TAG_NAME: release/${{ inputs.version-number }}/${{ inputs.build-number }} + TAG_MESSAGE: "Release NMA SDK Example App React ${{ inputs.version-number }}/${{ inputs.build-number }}" with: github-token: ${{ env.GITHUB_TOKEN }} script: | + const createdTag = await github.rest.git.createTag({ + owner: context.repo.owner, + repo: context.repo.repo, + tag: process.env.TAG_NAME, + message: process.env.TAG_NAME, + object: context.sha, + type: "commit" + }) + await github.rest.git.createRef({ owner: context.repo.owner, repo: context.repo.repo, ref: "refs/tags/" + process.env.TAG_NAME, - sha: context.sha + sha: createdTag.data.sha }) diff --git a/.github/actions/release-android/action.yml b/.github/actions/release-android/action.yml new file mode 100644 index 0000000..171d4bf --- /dev/null +++ b/.github/actions/release-android/action.yml @@ -0,0 +1,69 @@ +name: Release Android +description: Release Android App + +inputs: + new-arch-enabled: + description: "Flag that tells whether enable support to the new architecture." + required: true + version-number: + description: "The current version number" + required: true + build-number: + description: "The current build number" + required: true + +runs: + using: composite + steps: + - name: Setup + id: setup-node + uses: ./.github/actions/setup-node + with: + new-arch-enabled: ${{ inputs.new-arch-enabled }} + + - name: Set up Android + uses: ./.github/actions/setup-android + with: + cache-gradle: ${{ steps.setup-node.outputs.cache-hit == 'true' }} + + - name: Update Configuration + uses: ./.github/actions/update-config + with: + host-name: ${{ env.HOST_NAME }} + + - name: Bundle Android Assets + shell: bash + run: yarn react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res + + - name: Cache RubyGem Dependencies + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler-cache: true + working-directory: 'android' + + - name: Decode Keystore + uses: timheuer/base64-to-file@v1 + with: + fileName: 'keystore-example-app.jks' + fileDir: './android/etc' + encodedString: ${{ env.KEYSTORE_FILE }} + + - name: Publish Android App + if: ${{ env.BUILD_TYPE == 'RELEASE' }} + env: + GITHUB_TOKEN: ${{ env.GITHUB_TOKEN }} + SIGNING_CONFIGS: ${{ env.SIGNING_CONFIGS }} + GITHUB_USERNAME: ${{ env.GITHUB_USERNAME }} + GITHUB_PERSONAL_ACCESS_TOKEN: ${{ env.GITHUB_PERSONAL_ACCESS_TOKEN }} + FIREBASE_TOKEN: ${{ env.FIREBASE_TOKEN }} + FIREBASE_APP_ID_ANDROID: ${{ env.FIREBASE_APP_ID_ANDROID }} + SLACK_WEBHOOK_URL: ${{ env.SLACK_WEBHOOK_URL }} + uses: maierj/fastlane-action@v3.0.0 + with: + lane: 'main' + subdirectory: 'android' + options: '{ "version": "${{ inputs.version-number }}", + "build_number": "${{ inputs.build-number }}", + "new_arch_enabled": "${{ inputs.new-arch-enabled }}" + }' diff --git a/.github/actions/release-ios/action.yml b/.github/actions/release-ios/action.yml new file mode 100644 index 0000000..492b986 --- /dev/null +++ b/.github/actions/release-ios/action.yml @@ -0,0 +1,60 @@ +name: Release iOS +description: Release iOS App + +inputs: + new-arch-enabled: + description: "Flag that tells whether enable support to the new architecture." + required: true + version-number: + description: "The current version number" + required: true + build-number: + description: "The current build number" + required: true + +runs: + using: composite + steps: + - name: Set up Node + id: setup-node + uses: ./.github/actions/setup-node + with: + new-arch-enabled: ${{ inputs.new-arch-enabled }} + + - name: Set up iOS + uses: ./.github/actions/setup-ios + with: + new-arch-enabled: ${{ inputs.new-arch-enabled }} + cache-cocoapods: ${{ steps.setup-node.outputs.cache-hit == 'true' }} + + - name: Update Configuration + uses: ./.github/actions/update-config + with: + host-name: ${{ env.HOST_NAME }} + + - name: Cache RubyGem Dependencies + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler-cache: true + working-directory: 'ios' + + - name: Publish iOS App + env: + MATCH_GIT_AUTHORIZATION: ${{ env.MATCH_GIT_AUTHORIZATION }} + MATCH_GIT_URL: ${{ env.MATCH_GIT_URL }} + MATCH_PASSWORD: ${{ env.MATCH_PASSWORD }} + DEVELOPER_PORTAL_TEAM_ID: ${{ env.DEVELOPER_PORTAL_TEAM_ID }} + CODE_SIGNING_IDENTITY: ${{ env.CODE_SIGNING_IDENTITY }} + PROVISIONING_PROFILE_SPECIFIER: ${{ env.PROVISIONING_PROFILE_SPECIFIER }} + FIREBASE_TOKEN: ${{ env.FIREBASE_TOKEN }} + FIREBASE_APP_ID_IOS: ${{ env.FIREBASE_APP_ID_IOS }} + TEMP_KEYCHAIN_NAME: ${{ env.TEMP_KEYCHAIN_NAME }} + SLACK_WEBHOOK_URL: ${{ env.SLACK_WEBHOOK_URL }} + uses: maierj/fastlane-action@v3.0.0 + with: + lane: 'main' + subdirectory: 'ios' + options: '{ "version": "${{ inputs.version-number }}", + "build_number": "${{ inputs.build-number }}" + }' diff --git a/.github/actions/setup-android/action.yml b/.github/actions/setup-android/action.yml new file mode 100644 index 0000000..db3f987 --- /dev/null +++ b/.github/actions/setup-android/action.yml @@ -0,0 +1,29 @@ +name: Setup Android +description: Setup Android resources and install dependencies + +inputs: + cache-gradle: + description: "Flag that tells whether need to cache Gradle dependencies." + required: true + +runs: + using: composite + steps: + - name: Install JDK + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: ${{ env.JAVA_VERSION }} + + - name: Finalize Android SDK + shell: bash + run: /bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null" + + - name: Cache Gradle + if: ${{ inputs.cache-gradle == 'true' }} + uses: actions/cache@v3 + with: + path: | + ~/.gradle/wrapper + ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('android/gradle/wrapper/gradle-wrapper.properties') }}-${{ inputs.new-arch-enabled == 'true' && 'new-arch' || 'old-arch' }}-${{ env.BUILD_TYPE }} diff --git a/.github/actions/setup-ios/action.yml b/.github/actions/setup-ios/action.yml new file mode 100644 index 0000000..1980942 --- /dev/null +++ b/.github/actions/setup-ios/action.yml @@ -0,0 +1,38 @@ +name: Setup iOS +description: Setup iOS resources and install dependencies + +inputs: + new-arch-enabled: + description: "Flag that tells whether enable support to the new architecture." + required: true + cache-cocoapods: + description: "Flag that tells whether need to cache Cocoapods dependencies." + required: true + +runs: + using: composite + steps: + - name: Set Xcode version + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: ${{ env.XCODE_VERSION }} + + - name: Cache Cocoapods + if: ${{ inputs.cache-cocoapods == 'true' }} + id: cocoapods-cache + uses: actions/cache@v3 + with: + path: | + **/ios/Pods + **/ios/build/generated + key: ${{ runner.os }}-cocoapods-${{ hashFiles('ios/Podfile.lock') }}-${{ inputs.new-arch-enabled == 'true' && 'new-arch' || 'old-arch' }}-${{ env.BUILD_TYPE }} + + - name: Install Cocoapods - new architecture + if: steps.cocoapods-cache.outputs.cache-hit != 'true' && inputs.new-arch-enabled == 'true' + shell: bash + run: yarn pods:new + + - name: Install Cocoapods - old architecture + if: steps.cocoapods-cache.outputs.cache-hit != 'true' && inputs.new-arch-enabled == 'false' + shell: bash + run: yarn pods:old diff --git a/.github/actions/setup/action.yml b/.github/actions/setup-node/action.yml similarity index 75% rename from .github/actions/setup/action.yml rename to .github/actions/setup-node/action.yml index 9d232f5..bb3f9b2 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup-node/action.yml @@ -1,9 +1,9 @@ -name: Setup +name: Setup Node description: Setup Node.js and install dependencies inputs: - build-4-new-arch: - description: "If true, the artifact will be built for the new architecture." + new-arch-enabled: + description: "Flag that tells whether enable support to the new architecture." required: false default: "false" @@ -23,7 +23,7 @@ runs: uses: actions/cache@v3 with: path: node_modules - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}-${{ inputs.build-4-new-arch == 'true' && 'new-arch' || 'old-arch' }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }}-${{ inputs.new-arch-enabled == 'true' && 'new-arch' || 'old-arch' }} - name: Install dependencies if: steps.yarn-cache.outputs.cache-hit != 'true' diff --git a/.github/actions/slack-report/action.yml b/.github/actions/slack-report/action.yml deleted file mode 100644 index c46829a..0000000 --- a/.github/actions/slack-report/action.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Report Status -description: Report status to Slack - Required environment variables - * VERSION_NUMBER - * BUILD_NUMBER - * SLACK_WEBHOOK_URL - -inputs: - platform: - required: true - description: The platform for which the application is being built (Android or iOS). - is-workflow-state-success: - required: true - description: Contains 'true' if all of the previous jobs were successful in the workflow, 'false' otherwise. - -runs: - using: composite - steps: - - name: Prepare input for Slack report - shell: bash - run: | - echo "BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV - echo "AUTHOR_EMAIL=$(git log -1 --pretty=format:"%ae")" >> $GITHUB_ENV - echo "COMMIT_HASH=$(git log -1 --pretty=format:"%h")" >> $GITHUB_ENV - - - name: Report Status - uses: slackapi/slack-github-action@v1.24.0 - if: success() || failure() - with: - payload-file-path: "./.github/actions/slack-report/message_payload.json" - env: - SLACK_COLOR: "${{ job.status == 'success' && inputs.is-workflow-state-success == 'true' && '#5cb589' || '#951e13' }}" - SLACK_TEXT: "${{ format('*Nevis Mobile Authentication SDK Example App React {0} build is {1}: {2} ({3})*', inputs.platform, job.status == 'success' && inputs.is-workflow-state-success == 'true' && 'completed' || 'failed', env.VERSION_NUMBER, env.BUILD_NUMBER) }}" - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK diff --git a/.github/actions/slack-report/message_payload.json b/.github/actions/slack-report/message_payload.json deleted file mode 100644 index a4095f9..0000000 --- a/.github/actions/slack-report/message_payload.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "text": "${{ env.SLACK_TEXT }}", - "username": "React Native", - "icon_url": "https://cdn4.iconfinder.com/data/icons/logos-3/600/React.js_logo-512.png", - "attachments": [ - { - "color": "${{ env.SLACK_COLOR }}", - "blocks": [ - { - "type": "section", - "block_id": "branch_author", - "fields": [ - { - "type": "mrkdwn", - "text": "*Git Branch:*\n${{ env.BRANCH_NAME }}" - }, - { - "type": "mrkdwn", - "text": "*Git Author:*\n${{ env.AUTHOR_EMAIL }}" - } - ] - }, - { - "type": "section", - "block_id": "commit", - "fields": [ - { - "type": "mrkdwn", - "text": "*Git Commit Hash:*\n${{ env.COMMIT_HASH }}" - } - ] - }, - { - "type": "section", - "block_id": "logs", - "text": { - "type": "mrkdwn", - "text": "<${{ env.CURRENT_BUILD_URL }}|Build logs>" - } - } - ] - } - ] -} diff --git a/.github/actions/update-config/action.yml b/.github/actions/update-config/action.yml new file mode 100644 index 0000000..76929b4 --- /dev/null +++ b/.github/actions/update-config/action.yml @@ -0,0 +1,17 @@ +name: Update Configuration +description: 'Updates the configuration files' + +inputs: + host-name: + description: 'The host name to update' + required: true + +runs: + using: composite + steps: + - name: Update Configuration (hostname) + uses: jossef/action-set-json-field@v2.1 + with: + file: assets/config_authentication_cloud.json + field: sdk.hostname + value: '${{ inputs.host-name }}.mauth.nevis.cloud' diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 948d052..05a713e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,76 +9,89 @@ on: workflow_dispatch: env: + BUILD_TYPE: 'RELEASE' #BUILD_TYPE: Type of the build; allowed values: 'SNAPSHOT', 'RELEASE' CURRENT_BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GITHUB_USERNAME: ${{ secrets.PERSONAL_GITHUB_USERNAME }} GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_GITHUB_ACCESS_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MATCH_GIT_AUTHORIZATION: ${{ secrets.MATCH_GIT_AUTHORIZATION }} + MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} + MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} + DEVELOPER_PORTAL_TEAM_ID: ${{ secrets.DEVELOPER_PORTAL_TEAM_ID }} + CODE_SIGNING_IDENTITY: ${{ secrets.CODE_SIGNING_IDENTITY }} + PROVISIONING_PROFILE_SPECIFIER: ${{ secrets.PROVISIONING_PROFILE_SPECIFIER }} + KEYSTORE_FILE: ${{ secrets.KEYSTORE_FILE }} + SIGNING_CONFIGS: ${{ secrets.SIGNING_CONFIGS }} + FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} + FIREBASE_APP_ID_ANDROID: ${{ secrets.FIREBASE_APP_ID_ANDROID }} + FIREBASE_APP_ID_IOS: ${{ secrets.FIREBASE_APP_ID_IOS }} + TEMP_KEYCHAIN_NAME: ${{ secrets.TEMP_KEYCHAIN_NAME }} + HOST_NAME: ${{ secrets.HOST_NAME }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} XCODE_VERSION: 14.3.1 JAVA_VERSION: 11 + RUBY_VERSION: 3.0 jobs: lint-and-format: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 - - name: Setup - uses: ./.github/actions/setup + - name: Set up Node + uses: ./.github/actions/setup-node - - name: Lint files - run: yarn lint + - name: Lint files + run: yarn lint - - name: Run formatter on files - run: yarn formatcheck + - name: Run formatter + run: yarn formatcheck get-version-number: - needs: [lint-and-format] - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 + needs: [lint-and-format] + runs-on: ubuntu-latest + outputs: + version-number: ${{ steps.get_version.outputs.version-number }} + build-number: ${{ steps.get_version.outputs.build-number }} + steps: + - name: Checkout + uses: actions/checkout@v3 - - name: Get version - id: get_version - uses: ./.github/actions/get-version + - name: Get version + id: get_version + uses: ./.github/actions/get-version - build-android: + release-android: runs-on: ubuntu-latest needs: [get-version-number] steps: - name: Checkout uses: actions/checkout@v3 - - name: Build Android example with new arch - uses: ./.github/actions/build-android - with: - build-4-new-arch: true - - - name: Build Android example with old arch - uses: ./.github/actions/build-android + - name: Release Android App with old arch + uses: ./.github/actions/release-android with: - build-4-new-arch: false + new-arch-enabled: false + version-number: ${{ needs.get-version-number.outputs.version-number }} + build-number: ${{ needs.get-version-number.outputs.build-number }} - build-ios: + release-ios: runs-on: macos-13 needs: [get-version-number] steps: - name: Checkout uses: actions/checkout@v3 - - name: Build iOS example with new arch - uses: ./.github/actions/build-ios + - name: Release iOS App with old arch + uses: ./.github/actions/release-ios with: - build-4-new-arch: true - - - name: Build iOS example with old arch - uses: ./.github/actions/build-ios - with: - build-4-new-arch: false + new-arch-enabled: false + version-number: ${{ needs.get-version-number.outputs.version-number }} + build-number: ${{ needs.get-version-number.outputs.build-number }} create-tag: - needs: [build-android, build-ios] + needs: [get-version-number, release-android, release-ios] runs-on: ubuntu-latest steps: - name: Checkout @@ -86,3 +99,6 @@ jobs: - name: Create git tag uses: ./.github/actions/git-tag + with: + version-number: ${{ needs.get-version-number.outputs.version-number }} + build-number: ${{ needs.get-version-number.outputs.build-number }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0ee10c2..96a707a 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -6,6 +6,7 @@ on: workflow_dispatch: env: + BUILD_TYPE: 'SNAPSHOT' #BUILD_TYPE: Type of the build; allowed values: 'SNAPSHOT', 'RELEASE' GITHUB_USERNAME: ${{ secrets.PERSONAL_GITHUB_USERNAME }} GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_GITHUB_ACCESS_TOKEN }} XCODE_VERSION: 14.3.1 @@ -18,35 +19,59 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Setup - uses: ./.github/actions/setup + - name: Set up Node + uses: ./.github/actions/setup-node - name: Lint files run: yarn lint - - name: Run formatter on files + - name: Run formatter run: yarn formatcheck - build-android: + build-android-new-arch: runs-on: ubuntu-latest needs: [lint-and-format] steps: - name: Checkout uses: actions/checkout@v3 - - name: Build Android example with new arch + - name: Build Android App with new arch uses: ./.github/actions/build-android with: - build-4-new-arch: true + new-arch-enabled: true - build-ios: + build-android-old-arch: + runs-on: ubuntu-latest + needs: [lint-and-format] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Build Android App with old arch + uses: ./.github/actions/build-android + with: + new-arch-enabled: false + + build-ios-new-arch: + runs-on: macos-13 + needs: [lint-and-format] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Build iOS App with new arch + uses: ./.github/actions/build-ios + with: + new-arch-enabled: true + + build-ios-old-arch: runs-on: macos-13 needs: [lint-and-format] steps: - name: Checkout uses: actions/checkout@v3 - - name: Build iOS example with new arch + - name: Build iOS App with old arch uses: ./.github/actions/build-ios with: - build-4-new-arch: true + new-arch-enabled: false diff --git a/.gitignore b/.gitignore index bd5afa8..8b0354a 100644 --- a/.gitignore +++ b/.gitignore @@ -689,3 +689,10 @@ hs_err_pid* !/gradle/wrapper/gradle-wrapper.jar # End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,intellij,reactnative,xcode,node,macos,android,androidstudio,ruby,cocoapods,buck + +# Fastlane +**/fastlane/report.xml +**/fastlane/reports +**/fastlane/output +**/vendor/ +**/.bundle diff --git a/README.md b/README.md index aa4966c..64a100b 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ First open a terminal and run the `yarn` command in the root directory to get th 4. Synchronize your [android](/android) project with Gradle if opened in Android Studio. -> **Warning** +> **Warning** > The package repository only exposes the `debug` flavor. To use the `release` flavor contact us on [sales@nevis.net](mailto:sales@nevis.net). @@ -173,7 +173,7 @@ yarn ios:old Or by choosing Product > Run from Xcode, or by clicking the Run button in your project’s toolbar, similarly how you would run a native iOS application. -> **_NOTE_** +> **_NOTE_** > Running the app on an iOS device requires codesign setup. diff --git a/android/Gemfile b/android/Gemfile new file mode 100644 index 0000000..cdd3a6b --- /dev/null +++ b/android/Gemfile @@ -0,0 +1,6 @@ +source "https://rubygems.org" + +gem "fastlane" + +plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') +eval_gemfile(plugins_path) if File.exist?(plugins_path) diff --git a/android/Gemfile.lock b/android/Gemfile.lock new file mode 100644 index 0000000..aafa265 --- /dev/null +++ b/android/Gemfile.lock @@ -0,0 +1,223 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.6) + rexml + addressable (2.8.5) + public_suffix (>= 2.0.2, < 6.0) + artifactory (3.0.15) + atomos (0.1.3) + aws-eventstream (1.2.0) + aws-partitions (1.828.0) + aws-sdk-core (3.183.1) + aws-eventstream (~> 1, >= 1.0.2) + aws-partitions (~> 1, >= 1.651.0) + aws-sigv4 (~> 1.5) + jmespath (~> 1, >= 1.6.1) + aws-sdk-kms (1.71.0) + aws-sdk-core (~> 3, >= 3.177.0) + aws-sigv4 (~> 1.1) + aws-sdk-s3 (1.136.0) + aws-sdk-core (~> 3, >= 3.181.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.6) + aws-sigv4 (1.6.0) + aws-eventstream (~> 1, >= 1.0.2) + babosa (1.0.4) + claide (1.1.0) + colored (1.2) + colored2 (3.1.2) + commander (4.6.0) + highline (~> 2.0.0) + declarative (0.0.20) + 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.8.1) + emoji_regex (3.2.3) + excon (0.103.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-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.7) + fastlane (2.216.0) + CFPropertyList (>= 2.3, < 4.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 (~> 4.6) + dotenv (>= 2.1.1, < 3.0.0) + emoji_regex (>= 0.1, < 4.0) + excon (>= 0.71.0, < 1.0.0) + faraday (~> 1.0) + faraday-cookie_jar (~> 0.0.6) + faraday_middleware (~> 1.0) + fastimage (>= 2.1.0, < 3.0.0) + gh_inspector (>= 1.1.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, < 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) + terminal-notifier (>= 2.0.0, < 3.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) + xcodeproj (>= 1.13.0, < 2.0.0) + xcpretty (~> 0.3.0) + xcpretty-travis-formatter (>= 0.0.3) + fastlane-plugin-firebase_app_distribution (0.7.4) + google-apis-firebaseappdistribution_v1 (~> 0.3.0) + gh_inspector (1.1.3) + google-apis-androidpublisher_v3 (0.50.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-core (0.11.1) + addressable (~> 2.5, >= 2.5.1) + googleauth (>= 0.16.2, < 2.a) + httpclient (>= 2.8.1, < 3.a) + mini_mime (~> 1.0) + representable (~> 3.0) + retriable (>= 2.0, < 4.a) + rexml + webrick + google-apis-firebaseappdistribution_v1 (0.3.0) + google-apis-core (>= 0.11.0, < 2.a) + 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.19.0) + google-apis-core (>= 0.9.0, < 2.a) + google-cloud-core (1.6.0) + google-cloud-env (~> 1.0) + google-cloud-errors (~> 1.0) + google-cloud-env (1.6.0) + faraday (>= 0.17.3, < 3.0) + google-cloud-errors (1.3.1) + google-cloud-storage (1.44.0) + addressable (~> 2.8) + digest-crc (~> 0.4) + google-apis-iamcredentials_v1 (~> 0.1) + google-apis-storage_v1 (~> 0.19.0) + google-cloud-core (~> 1.6) + googleauth (>= 0.16.2, < 2.a) + mini_mime (~> 1.0) + googleauth (1.8.1) + faraday (>= 0.17.3, < 3.a) + jwt (>= 1.4, < 3.0) + multi_json (~> 1.11) + os (>= 0.9, < 2.0) + signet (>= 0.16, < 2.a) + highline (2.0.3) + http-cookie (1.0.5) + domain_name (~> 0.5) + httpclient (2.8.3) + jmespath (1.6.2) + json (2.6.3) + jwt (2.7.1) + mini_magick (4.12.0) + mini_mime (1.1.5) + multi_json (1.15.0) + multipart-post (2.3.0) + nanaimo (0.3.0) + naturally (2.2.1) + optparse (0.1.1) + os (1.1.4) + plist (3.7.0) + public_suffix (5.0.1) + rake (13.0.6) + representable (3.2.0) + declarative (< 0.1.0) + trailblazer-option (>= 0.1.1, < 0.2.0) + uber (< 0.2.0) + retriable (3.1.2) + rexml (3.2.6) + rouge (2.0.7) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + security (0.1.3) + 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.10) + CFPropertyList + naturally + terminal-notifier (2.0.0) + 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) + uber (0.1.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.8.2) + unicode-display_width (2.4.2) + webrick (1.8.1) + word_wrap (1.0.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) + +PLATFORMS + x86_64-darwin-22 + x86_64-linux + +DEPENDENCIES + fastlane + fastlane-plugin-firebase_app_distribution + +BUNDLED WITH + 2.3.26 diff --git a/android/app/build.gradle b/android/app/build.gradle index 3c1e4c6..d68d21f 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,5 +1,5 @@ -apply plugin: "com.android.application" -apply plugin: "com.facebook.react" +apply plugin: 'com.android.application' +apply plugin: 'com.facebook.react' /** * This is the configuration block to customize your React Native Android app. @@ -93,6 +93,8 @@ dependencies { // The version of react-native is set by the React Native Gradle Plugin implementation("com.facebook.react:react-android") + implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0")) + debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { exclude group:'com.squareup.okhttp3', module:'okhttp' diff --git a/android/app/src/main/assets/index.android.bundle b/android/app/src/main/assets/index.android.bundle new file mode 100644 index 0000000..e69de29 diff --git a/android/fastlane/Appfile b/android/fastlane/Appfile new file mode 100644 index 0000000..efbb7af --- /dev/null +++ b/android/fastlane/Appfile @@ -0,0 +1,2 @@ +json_key_file("") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one +package_name("ch.nevis.mobile.authentication.sdk.react.example") # e.g. com.krausefx.app diff --git a/android/fastlane/Fastfile b/android/fastlane/Fastfile new file mode 100644 index 0000000..f822d60 --- /dev/null +++ b/android/fastlane/Fastfile @@ -0,0 +1,100 @@ +## +## Fastlane configuration for the Nevis Mobile Authentication SDK Example App React Android application. +## See https://docs.fastlane.tools +## + +default_platform(:android) + +root_dir = File.expand_path(File.join(File.dirname(__FILE__), "../")) +signing_configs_gradle = File.join(root_dir, "app/signing_configs.gradle") +apk_path = File.join(root_dir, "../build/app/outputs/flutter-apk/app-debug.apk") +display_name = "Nevis Mobile Authentication SDK Example App React Android" + +def report_on_success(message) + slack( + message: "#{message}\nCheck build logs: #{ENV['CURRENT_BUILD_URL']}", + slack_url: ENV['SLACK_WEBHOOK_URL'] + ) if ENV['SLACK_WEBHOOK_URL'] +end + +def report_on_error(message, exception) + slack( + message: "#{message}\nCheck build logs: #{ENV['CURRENT_BUILD_URL']}", + slack_url: ENV['SLACK_WEBHOOK_URL'], + success: false, + attachment_properties: { + fields: [ + { + title: "Error message", + value: exception.to_s, + short: false + } + ] + } + ) if ENV['SLACK_WEBHOOK_URL'] + UI.user_error!("#{exception}") +end + +def get_boolean?(input) + if input.nil? + return false + else + bool_input = input.to_s.downcase + return bool_input == "true" || bool_input == "1" + end +end + +platform :android do + desc "Build and distribute the application" + desc "#### Options" + desc " * **`version`**: The version of the application." + desc " * **`build_number`**: The build number of the application." + desc " * **`new_arch_enabled`**: The build number of the application." + desc "" + lane :main do |options| + begin + version = options[:version] + build_number = options[:build_number] + new_arch_enabled = !options[:new_arch_enabled].nil? ? get_boolean?(options[:new_arch_enabled]) : false + UI.message("Distributing #{display_name} #{version} (#{build_number}) 📦") + + modify_gradle_file( + constant: "versionName", + value: version, + ) + + modify_gradle_file( + constant: "versionCode", + value: build_number, + ) + + sh("echo \"#{ENV["SIGNING_CONFIGS"]}\" > #{signing_configs_gradle}") + + modify_gradle_file( + constant: "signingConfig", + value: "signingConfigs.signing", + ) + + modify_gradle_file( + constant: "apply plugin: 'com.facebook.react'", + value: "apply from: 'signing_configs.gradle'", + mode: 'append' + ) + + gradle( + task: "clean assembleDebug", + properties: { + "newArchEnabled" => new_arch_enabled + } + ) + + firebase_app_distribution( + app: ENV["FIREBASE_APP_ID_ANDROID"], + groups: 'developers, internal-testers, presales' + ) + report_on_success("#{display_name} build completed: #{version} (#{build_number}) ✅") + rescue => exception + report_on_error("#{display_name} build failed ❌", exception) + end + end +end diff --git a/android/fastlane/Pluginfile b/android/fastlane/Pluginfile new file mode 100644 index 0000000..b18539b --- /dev/null +++ b/android/fastlane/Pluginfile @@ -0,0 +1,5 @@ +# Autogenerated by fastlane +# +# Ensure this file is checked in to source control! + +gem 'fastlane-plugin-firebase_app_distribution' diff --git a/android/fastlane/README.md b/android/fastlane/README.md new file mode 100644 index 0000000..57fed6f --- /dev/null +++ b/android/fastlane/README.md @@ -0,0 +1,42 @@ +fastlane documentation +---- + +# Installation + +Make sure you have the latest version of the Xcode command line tools installed: + +```sh +xcode-select --install +``` + +For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) + +# Available Actions + +## Android + +### android main + +```sh +[bundle exec] fastlane android main +``` + +Build and distribute the application + +#### Options + + * **`version`**: The version of the application. + + * **`build_number`**: The build number of the application. + + * **`new_arch_enabled`**: The build number of the application. + + + +---- + +This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. + +More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). + +The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools). diff --git a/android/fastlane/actions/modify_gradle_file.rb b/android/fastlane/actions/modify_gradle_file.rb new file mode 100644 index 0000000..28fed00 --- /dev/null +++ b/android/fastlane/actions/modify_gradle_file.rb @@ -0,0 +1,116 @@ +require 'tempfile' +require 'fileutils' + +module Fastlane + module Actions + class ModifyGradleFileAction < Action + def self.run(params) + gradle_file_path ||= params[:gradle_file_path] + constant = params[:constant] + value = params[:value] + mode ||= params[:mode] + + if gradle_file_path != nil + UI.message(" Using gradle file (#{gradle_file_path})!") + modify(gradle_file_path, constant, value, mode) + else + app_folder_name ||= params[:app_folder_name] + UI.message("Using project folder `#{app_folder_name}`!") + + Dir.glob("**/#{app_folder_name}/build.gradle") do |path| + modify(path, constant, value, mode) + end + end + end + + def self.modify(path, constant_name, constant_value, mode) + unless File.file?(path) + raise "No file exist at path: (#{path})!" + end + + begin + temp_file = Tempfile.new('fastlaneModifyGradleFile') + File.open(path, 'r') do |file| + file.each_line do |line| + if line.include? constant_name + if mode == "replace" + components = line.strip.split(' ') + current_value = components[components.length - 1].tr("\"", "") + line.replace line.sub(current_value, constant_value) + temp_file.puts line + elsif mode == "append" + temp_file.puts line + temp_file.puts constant_value + end + else + temp_file.puts line + end + end + file.close + end + temp_file.rewind + temp_file.close + FileUtils.mv(temp_file.path, path) + temp_file.unlink + rescue + raise 'Modifying gradle file failed!' + end + end + + def self.description + "Modify gradle file of your Android project." + end + + def self.available_options + [ + FastlaneCore::ConfigItem.new(key: :app_folder_name, + description: "The name of the application source folder in the Android project (default: app)", + optional: true, + type: String, + default_value: "app"), + FastlaneCore::ConfigItem.new(key: :gradle_file_path, + description: "The relative path to the gradle file containing the constant parameter (default:app/build.gradle)", + optional: true, + type: String, + default_value: nil), + FastlaneCore::ConfigItem.new(key: :constant, + description: "The constant whose value is to be replaced or appended after", + optional: false, + type: String), + FastlaneCore::ConfigItem.new(key: :value, + description: "The new value", + optional: false, + type: String), + FastlaneCore::ConfigItem.new(key: :mode, + description: "The working mode. Possible values are replace or append (default: replace)", + optional: true, + type: String, + default_value: "replace"), + ] + end + + def self.author + "Nevis Security AG" + end + + def self.is_supported?(platform) + [:android].include? platform + end + + def self.example_code + [ + modify_gradle_file( + gradle_file_path: file, + constant: "", + value: "", + mode: "append" + ) + ] + end + + def self.category + :project + end + end + end +end diff --git a/ios/Gemfile b/ios/Gemfile new file mode 100644 index 0000000..dd7b851 --- /dev/null +++ b/ios/Gemfile @@ -0,0 +1,7 @@ +source "https://rubygems.org" + +gem 'cocoapods' +gem "fastlane" + +plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile') +eval_gemfile(plugins_path) if File.exist?(plugins_path) diff --git a/ios/Gemfile.lock b/ios/Gemfile.lock new file mode 100644 index 0000000..f5c40ed --- /dev/null +++ b/ios/Gemfile.lock @@ -0,0 +1,287 @@ +GEM + remote: https://rubygems.org/ + specs: + CFPropertyList (3.0.6) + rexml + activesupport (7.0.8) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + addressable (2.8.5) + public_suffix (>= 2.0.2, < 6.0) + algoliasearch (1.27.5) + httpclient (~> 2.8, >= 2.8.3) + json (>= 1.5.1) + artifactory (3.0.15) + atomos (0.1.3) + aws-eventstream (1.2.0) + aws-partitions (1.828.0) + aws-sdk-core (3.183.1) + aws-eventstream (~> 1, >= 1.0.2) + aws-partitions (~> 1, >= 1.651.0) + aws-sigv4 (~> 1.5) + jmespath (~> 1, >= 1.6.1) + aws-sdk-kms (1.71.0) + aws-sdk-core (~> 3, >= 3.177.0) + aws-sigv4 (~> 1.1) + aws-sdk-s3 (1.136.0) + aws-sdk-core (~> 3, >= 3.181.0) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.6) + aws-sigv4 (1.6.0) + aws-eventstream (~> 1, >= 1.0.2) + babosa (1.0.4) + claide (1.1.0) + cocoapods (1.14.2) + addressable (~> 2.8) + claide (>= 1.0.2, < 2.0) + cocoapods-core (= 1.14.2) + cocoapods-deintegrate (>= 1.0.3, < 2.0) + cocoapods-downloader (>= 2.0) + cocoapods-plugins (>= 1.0.0, < 2.0) + cocoapods-search (>= 1.0.0, < 2.0) + cocoapods-trunk (>= 1.6.0, < 2.0) + cocoapods-try (>= 1.1.0, < 2.0) + colored2 (~> 3.1) + escape (~> 0.0.4) + fourflusher (>= 2.3.0, < 3.0) + gh_inspector (~> 1.0) + molinillo (~> 0.8.0) + nap (~> 1.0) + ruby-macho (>= 2.3.0, < 3.0) + xcodeproj (>= 1.23.0, < 2.0) + cocoapods-core (1.14.2) + activesupport (>= 5.0, < 8) + addressable (~> 2.8) + algoliasearch (~> 1.0) + concurrent-ruby (~> 1.1) + fuzzy_match (~> 2.0.4) + nap (~> 1.0) + netrc (~> 0.11) + public_suffix (~> 4.0) + typhoeus (~> 1.0) + cocoapods-deintegrate (1.0.5) + cocoapods-downloader (2.0) + cocoapods-plugins (1.0.0) + nap + cocoapods-search (1.0.1) + cocoapods-trunk (1.6.0) + nap (>= 0.8, < 2.0) + netrc (~> 0.11) + cocoapods-try (1.2.0) + colored (1.2) + colored2 (3.1.2) + commander (4.6.0) + highline (~> 2.0.0) + concurrent-ruby (1.2.2) + declarative (0.0.20) + 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.8.1) + emoji_regex (3.2.3) + escape (0.0.4) + ethon (0.16.0) + ffi (>= 1.15.0) + excon (0.103.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-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.7) + fastlane (2.216.0) + CFPropertyList (>= 2.3, < 4.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 (~> 4.6) + dotenv (>= 2.1.1, < 3.0.0) + emoji_regex (>= 0.1, < 4.0) + excon (>= 0.71.0, < 1.0.0) + faraday (~> 1.0) + faraday-cookie_jar (~> 0.0.6) + faraday_middleware (~> 1.0) + fastimage (>= 2.1.0, < 3.0.0) + gh_inspector (>= 1.1.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, < 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) + terminal-notifier (>= 2.0.0, < 3.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) + xcodeproj (>= 1.13.0, < 2.0.0) + xcpretty (~> 0.3.0) + xcpretty-travis-formatter (>= 0.0.3) + fastlane-plugin-firebase_app_distribution (0.7.3) + google-apis-firebaseappdistribution_v1 (~> 0.3.0) + ffi (1.16.2) + fourflusher (2.3.1) + fuzzy_match (2.0.4) + gh_inspector (1.1.3) + google-apis-androidpublisher_v3 (0.50.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-core (0.11.1) + addressable (~> 2.5, >= 2.5.1) + googleauth (>= 0.16.2, < 2.a) + httpclient (>= 2.8.1, < 3.a) + mini_mime (~> 1.0) + representable (~> 3.0) + retriable (>= 2.0, < 4.a) + rexml + webrick + google-apis-firebaseappdistribution_v1 (0.3.0) + google-apis-core (>= 0.11.0, < 2.a) + 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.19.0) + google-apis-core (>= 0.9.0, < 2.a) + google-cloud-core (1.6.0) + google-cloud-env (~> 1.0) + google-cloud-errors (~> 1.0) + google-cloud-env (1.6.0) + faraday (>= 0.17.3, < 3.0) + google-cloud-errors (1.3.1) + google-cloud-storage (1.44.0) + addressable (~> 2.8) + digest-crc (~> 0.4) + google-apis-iamcredentials_v1 (~> 0.1) + google-apis-storage_v1 (~> 0.19.0) + google-cloud-core (~> 1.6) + googleauth (>= 0.16.2, < 2.a) + mini_mime (~> 1.0) + googleauth (1.8.1) + faraday (>= 0.17.3, < 3.a) + jwt (>= 1.4, < 3.0) + multi_json (~> 1.11) + os (>= 0.9, < 2.0) + signet (>= 0.16, < 2.a) + highline (2.0.3) + http-cookie (1.0.5) + domain_name (~> 0.5) + httpclient (2.8.3) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + jmespath (1.6.2) + json (2.6.3) + jwt (2.7.1) + mini_magick (4.12.0) + mini_mime (1.1.5) + minitest (5.20.0) + molinillo (0.8.0) + multi_json (1.15.0) + multipart-post (2.3.0) + nanaimo (0.3.0) + nap (1.1.0) + naturally (2.2.1) + netrc (0.11.0) + optparse (0.1.1) + os (1.1.4) + plist (3.7.0) + public_suffix (4.0.7) + rake (13.0.6) + representable (3.2.0) + declarative (< 0.1.0) + trailblazer-option (>= 0.1.1, < 0.2.0) + uber (< 0.2.0) + retriable (3.1.2) + rexml (3.2.6) + rouge (2.0.7) + ruby-macho (2.5.1) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + security (0.1.3) + 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.10) + CFPropertyList + naturally + terminal-notifier (2.0.0) + 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) + typhoeus (1.4.0) + ethon (>= 0.9.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + uber (0.1.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.8.2) + unicode-display_width (2.4.2) + webrick (1.8.1) + word_wrap (1.0.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) + +PLATFORMS + x86_64-darwin-20 + x86_64-darwin-22 + +DEPENDENCIES + cocoapods + fastlane + fastlane-plugin-firebase_app_distribution + +BUNDLED WITH + 2.3.26 diff --git a/ios/Podfile.lock b/ios/Podfile.lock index eb27e01..ee96420 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1323,7 +1323,7 @@ SPEC CHECKSUMS: React-perflogger: e3596db7e753f51766bceadc061936ef1472edc3 React-RCTActionSheet: 17ab132c748b4471012abbcdcf5befe860660485 React-RCTAnimation: 3fe720d2c172de51de8dc19ba091c559d22ebd9b - React-RCTAppDelegate: c4e5b513fdcaf3dc017ee8a98a116d3dcd54c0c7 + React-RCTAppDelegate: 8f895aad77f9fb40d3d66677fe8d0d6530e5fc1e React-RCTBlob: fd752f54ae335c93a36650be8129b352b852185f React-RCTFabric: 36163120563ae0dd36321d6ecacf1cef967c975d React-RCTImage: a99cc31f93f72fe17d0448fd45d7a812fd50388e diff --git a/ios/fastlane/Appfile b/ios/fastlane/Appfile new file mode 100644 index 0000000..4282947 --- /dev/null +++ b/ios/fastlane/Appfile @@ -0,0 +1,6 @@ +# app_identifier("[[APP_IDENTIFIER]]") # The bundle identifier of your app +# apple_id("[[APPLE_ID]]") # Your Apple Developer Portal username + + +# For more information about the Appfile, see: +# https://docs.fastlane.tools/advanced/#appfile diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile new file mode 100644 index 0000000..8442522 --- /dev/null +++ b/ios/fastlane/Fastfile @@ -0,0 +1,137 @@ +## +## Fastlane configuration for the Nevis Mobile Authentication SDK Example App react iOS application. +## See https://docs.fastlane.tools +## + +require 'securerandom' + +default_platform(:ios) + +app_identifier = "ch.nevis.mobile.authentication.sdk.react.example" +display_name = "Nevis Mobile Authentication SDK Example App React iOS" +keychain_password = SecureRandom.base64 +ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "120" + +def ensure_temp_keychain(name, password) + delete_temp_keychain(name) + create_temp_keychain(name, password) +end + +def create_temp_keychain(name, password) + create_keychain( + name: name, + password: password, + unlock: true, + timeout: 0, + lock_when_sleeps: true + ) +end + +def delete_temp_keychain(name) + delete_keychain( + name: name + ) if File.exist? File.expand_path("~/Library/Keychains/#{name}-db") +end + +def report_on_success(message) + slack( + message: "#{message}\nCheck build logs: #{ENV['CURRENT_BUILD_URL']}", + slack_url: ENV['SLACK_WEBHOOK_URL'] + ) if ENV['SLACK_WEBHOOK_URL'] +end + +def report_on_error(message, exception) + slack( + message: "#{message}\nCheck build logs: #{ENV['CURRENT_BUILD_URL']}", + slack_url: ENV['SLACK_WEBHOOK_URL'], + success: false, + attachment_properties: { + fields: [ + { + title: "Error message", + value: exception.to_s, + short: false + } + ] + } + ) if ENV['SLACK_WEBHOOK_URL'] + UI.user_error!("#{exception}") +end + +platform :ios do + desc "Build and distribute the application" + desc "#### Options" + desc " * **`version`**: The version of the application." + desc " * **`build_number`**: The build number of the application." + desc "" + lane :main do |options| + begin + version = options[:version] + build_number = options[:build_number] + + keychain_name = ENV["TEMP_KEYCHAIN_NAME"] + ensure_temp_keychain( + keychain_name, + keychain_password + ) + + UI.message("Distributing #{display_name} #{version} (#{build_number}) 📦") + + increment_version_number( + version_number: version + ) + + increment_build_number( + build_number: build_number + ) + + match( + type: "adhoc", + readonly: true, + app_identifier: app_identifier, + git_url: ENV["MATCH_GIT_URL"], + git_basic_authorization: Base64.strict_encode64(ENV["MATCH_GIT_AUTHORIZATION"]), + keychain_name: keychain_name, + keychain_password: keychain_password + ) + + profile_name = ENV["sigh_#{app_identifier}_adhoc_profile-name"] + update_code_signing_settings( + path: "nevis_mobile_authentication_sdk_example_app_react.xcodeproj", + build_configurations: ["Release"], + use_automatic_signing: false, + team_id: ENV["DEVELOPER_PORTAL_TEAM_ID"], + code_sign_identity: ENV["CODE_SIGNING_IDENTITY"], + profile_name: profile_name, + ) + + gym( + workspace: "nevis_mobile_authentication_sdk_example_app_react.xcworkspace", + scheme: "nevis_mobile_authentication_sdk_example_app_react", + configuration: "Release", + clean: true, + skip_profile_detection: true, + skip_package_dependencies_resolution: true, + export_method: "ad-hoc", + export_options: { + provisioningProfiles: { + app_identifier => ENV["PROVISIONING_PROFILE_SPECIFIER"] + } + }, + xcargs: "OTHER_CODE_SIGN_FLAGS=\"--keychain=#{keychain_name}\"" + ) + + firebase_app_distribution( + app: ENV["FIREBASE_APP_ID_IOS"], + ipa_path: "./nevis_mobile_authentication_sdk_example_app_react.ipa", + groups: "developers, internal-testers, presales" + ) + + delete_temp_keychain(keychain_name) + report_on_success("#{display_name} build completed: #{version} (#{build_number}) ✅") + rescue => exception + delete_temp_keychain(keychain_name) + report_on_error("#{display_name} build failed ❌", exception) + end + end +end diff --git a/ios/fastlane/Pluginfile b/ios/fastlane/Pluginfile new file mode 100644 index 0000000..7652529 --- /dev/null +++ b/ios/fastlane/Pluginfile @@ -0,0 +1,5 @@ +# Autogenerated by fastlane +# +# Ensure this file is checked in to source control! + +gem 'fastlane-plugin-firebase_app_distribution' \ No newline at end of file diff --git a/ios/fastlane/README.md b/ios/fastlane/README.md new file mode 100644 index 0000000..e7c1826 --- /dev/null +++ b/ios/fastlane/README.md @@ -0,0 +1,40 @@ +fastlane documentation +---- + +# Installation + +Make sure you have the latest version of the Xcode command line tools installed: + +```sh +xcode-select --install +``` + +For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane) + +# Available Actions + +## iOS + +### ios main + +```sh +[bundle exec] fastlane ios main +``` + +Build and distribute the application + +#### Options + + * **`version`**: The version of the application. + + * **`build_number`**: The build number of the application. + + + +---- + +This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run. + +More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools). + +The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools). diff --git a/package.json b/package.json index a18bc86..9d296b7 100644 --- a/package.json +++ b/package.json @@ -4,14 +4,12 @@ "private": true, "scripts": { "android": "react-native run-android", - "android:build": "cd android && ./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a", "android:clean": "cd android && rm -rf build/ && rm -rf app/build && rm -rf app/.cxx && ./gradlew clean && cd ..", "android:new": "yarn android:clean && ORG_GRADLE_PROJECT_newArchEnabled=true yarn android", "android:old": "yarn android:clean && ORG_GRADLE_PROJECT_newArchEnabled=false yarn android", "pods:new": "cd ios && RCT_NEW_ARCH_ENABLED=1 USE_FRAMEWORKS=static NO_FLIPPER=1 pod install --repo-update && cd ..", "pods:old": "cd ios && RCT_NEW_ARCH_ENABLED=0 pod install --repo-update && cd ..", "ios": "react-native run-ios", - "ios:build": "cd ios && xcodebuild -workspace nevis_mobile_authentication_sdk_example_app_react.xcworkspace -scheme nevis_mobile_authentication_sdk_example_app_react -configuration Debug -sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO", "ios:clean": "cd ios && rm -rf build/ && cd ..", "ios:new": "RCT_NEW_ARCH_ENABLED=1 USE_FRAMEWORKS=static NO_FLIPPER=1 yarn ios:clean && yarn pods:new && yarn ios", "ios:old": "RCT_NEW_ARCH_ENABLED=0 yarn ios:clean && yarn pods:old && yarn ios", @@ -43,6 +41,7 @@ "@babel/runtime": "^7.23.2", "@react-native/eslint-config": "^0.74.0", "@react-native/metro-config": "^0.74.0", + "@react-native-community/cli": "^11.3.10", "@tsconfig/react-native": "^3.0.2", "@types/jest": "^29.5.7", "@types/react": "^18.2.33", diff --git a/yarn.lock b/yarn.lock index 53d1df7..dfdd347 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1524,6 +1524,16 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@react-native-community/cli-clean@11.3.10": + version "11.3.10" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-11.3.10.tgz#70d14dd998ce8ad532266b36a0e5cafe22d300ac" + integrity sha512-g6QjW+DSqoWRHzmIQW3AH22k1AnynWuOdy2YPwYEGgPddTeXZtJphIpEVwDOiC0L4mZv2VmiX33/cGNUwO0cIA== + dependencies: + "@react-native-community/cli-tools" "11.3.10" + chalk "^4.1.2" + execa "^5.0.0" + prompts "^2.4.0" + "@react-native-community/cli-clean@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-11.3.7.tgz#cb4c2f225f78593412c2d191b55b8570f409a48f" @@ -1534,6 +1544,18 @@ execa "^5.0.0" prompts "^2.4.0" +"@react-native-community/cli-config@11.3.10": + version "11.3.10" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-11.3.10.tgz#753510a80a98b136fec852e1ea5fa655c13dbd17" + integrity sha512-YYu14nm1JYLS6mDRBz78+zDdSFudLBFpPkhkOoj4LuBhNForQBIqFFHzQbd9/gcguJxfW3vlYSnudfaUI7oGLg== + dependencies: + "@react-native-community/cli-tools" "11.3.10" + chalk "^4.1.2" + cosmiconfig "^5.1.0" + deepmerge "^4.3.0" + glob "^7.1.3" + joi "^17.2.1" + "@react-native-community/cli-config@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-11.3.7.tgz#4ce95548252ecb094b576369abebf9867c95d277" @@ -1546,6 +1568,13 @@ glob "^7.1.3" joi "^17.2.1" +"@react-native-community/cli-debugger-ui@11.3.10": + version "11.3.10" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-11.3.10.tgz#b16ebf770ba3cc76bf46580f101d00dacf919824" + integrity sha512-kyitGV3RsjlXIioq9lsuawha2GUBPCTAyXV6EBlm3qlyF3dMniB3twEvz+fIOid/e1ZeucH3Tzy5G3qcP8yWoA== + dependencies: + serve-static "^1.13.1" + "@react-native-community/cli-debugger-ui@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-debugger-ui/-/cli-debugger-ui-11.3.7.tgz#2147b73313af8de3c9b396406d5d344b904cf2bb" @@ -1553,6 +1582,30 @@ dependencies: serve-static "^1.13.1" +"@react-native-community/cli-doctor@11.3.10": + version "11.3.10" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-11.3.10.tgz#161b8fd1b485cd52f7a19b2025696070b9d2b6a1" + integrity sha512-DpMsfCWKZ15L9nFK/SyDvpl5v6MjV+arMHMC1i8kR+DOmf2xWmp/pgMywKk0/u50yGB9GwxBHt3i/S/IMK5Ylg== + dependencies: + "@react-native-community/cli-config" "11.3.10" + "@react-native-community/cli-platform-android" "11.3.10" + "@react-native-community/cli-platform-ios" "11.3.10" + "@react-native-community/cli-tools" "11.3.10" + chalk "^4.1.2" + command-exists "^1.2.8" + envinfo "^7.7.2" + execa "^5.0.0" + hermes-profile-transformer "^0.0.6" + ip "^1.1.5" + node-stream-zip "^1.9.1" + ora "^5.4.1" + prompts "^2.4.0" + semver "^7.5.2" + strip-ansi "^5.2.0" + sudo-prompt "^9.0.0" + wcwidth "^1.0.1" + yaml "^2.2.1" + "@react-native-community/cli-doctor@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-11.3.7.tgz#7d5f5b1aea78134bba713fa97795986345ff1344" @@ -1577,6 +1630,17 @@ wcwidth "^1.0.1" yaml "^2.2.1" +"@react-native-community/cli-hermes@11.3.10": + version "11.3.10" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-11.3.10.tgz#f3d4f069ca472b1d8b4e8132cf9c44097a58ca19" + integrity sha512-vqINuzAlcHS9ImNwJtT43N7kfBQ7ro9A8O1Gpc5TQ0A8V36yGG8eoCHeauayklVVgMZpZL6f6mcoLLr9IOgBZQ== + dependencies: + "@react-native-community/cli-platform-android" "11.3.10" + "@react-native-community/cli-tools" "11.3.10" + chalk "^4.1.2" + hermes-profile-transformer "^0.0.6" + ip "^1.1.5" + "@react-native-community/cli-hermes@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-11.3.7.tgz#091e730a1f8bace6c3729e8744bad6141002e0e8" @@ -1588,6 +1652,17 @@ hermes-profile-transformer "^0.0.6" ip "^1.1.5" +"@react-native-community/cli-platform-android@11.3.10": + version "11.3.10" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-11.3.10.tgz#756dd73ad78bf2f20c678683dfc48cb764b1b590" + integrity sha512-RGu9KuDIXnrcNkacSHj5ETTQtp/D/835L6veE2jMigO21p//gnKAjw3AVLCysGr8YXYfThF8OSOALrwNc94puQ== + dependencies: + "@react-native-community/cli-tools" "11.3.10" + chalk "^4.1.2" + execa "^5.0.0" + glob "^7.1.3" + logkitty "^0.7.1" + "@react-native-community/cli-platform-android@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-11.3.7.tgz#7845bc48258b6bb55df208a23b3690647f113995" @@ -1599,6 +1674,18 @@ glob "^7.1.3" logkitty "^0.7.1" +"@react-native-community/cli-platform-ios@11.3.10": + version "11.3.10" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-11.3.10.tgz#f8a9bca1181802f12ed15714d5a496e60096cbed" + integrity sha512-JjduMrBM567/j4Hvjsff77dGSLMA0+p9rr0nShlgnKPcc+0J4TDy0hgWpUceM7OG00AdDjpetAPupz0kkAh4cQ== + dependencies: + "@react-native-community/cli-tools" "11.3.10" + chalk "^4.1.2" + execa "^5.0.0" + fast-xml-parser "^4.0.12" + glob "^7.1.3" + ora "^5.4.1" + "@react-native-community/cli-platform-ios@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-11.3.7.tgz#87478f907634713b7236c77870446a5ca1f35ff1" @@ -1611,6 +1698,23 @@ glob "^7.1.3" ora "^5.4.1" +"@react-native-community/cli-plugin-metro@11.3.10": + version "11.3.10" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-11.3.10.tgz#6ed67dda2518d3dabae20f3b38f66a0a9bd8e962" + integrity sha512-ZYAc5Hc+QVqJgj1XFbpKnIPbSJ9xKcBnfQrRhR+jFyt2DWx85u4bbzY1GSVc/USs0UbSUXv4dqPbnmOJz52EYQ== + dependencies: + "@react-native-community/cli-server-api" "11.3.10" + "@react-native-community/cli-tools" "11.3.10" + chalk "^4.1.2" + execa "^5.0.0" + metro "0.76.8" + metro-config "0.76.8" + metro-core "0.76.8" + metro-react-native-babel-transformer "0.76.8" + metro-resolver "0.76.8" + metro-runtime "0.76.8" + readline "^1.3.0" + "@react-native-community/cli-plugin-metro@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-11.3.7.tgz#2e8a9deb30b40495c5c1347a1837a824400fa00f" @@ -1628,6 +1732,21 @@ metro-runtime "0.76.8" readline "^1.3.0" +"@react-native-community/cli-server-api@11.3.10": + version "11.3.10" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-11.3.10.tgz#2c4940d921711f2c78f0b61f126e8dbbbef6277c" + integrity sha512-WEwHWIpqx3gA6Da+lrmq8+z78E1XbxxjBlvHAXevhjJj42N4SO417eZiiUVrFzEFVVJSUee9n9aRa0kUR+0/2w== + dependencies: + "@react-native-community/cli-debugger-ui" "11.3.10" + "@react-native-community/cli-tools" "11.3.10" + compression "^1.7.1" + connect "^3.6.5" + errorhandler "^1.5.1" + nocache "^3.0.1" + pretty-format "^26.6.2" + serve-static "^1.13.1" + ws "^7.5.1" + "@react-native-community/cli-server-api@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-11.3.7.tgz#2cce54b3331c9c51b9067129c297ab2e9a142216" @@ -1643,6 +1762,21 @@ serve-static "^1.13.1" ws "^7.5.1" +"@react-native-community/cli-tools@11.3.10": + version "11.3.10" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-11.3.10.tgz#d7bbe3fd8b338004f996f03f53a5373d9caab91c" + integrity sha512-4kCuCwVcGagSrNg9vxMNVhynwpByuC/J5UnKGEet3HuqmoDhQW15m18fJXiehA8J+u9WBvHduefy9nZxO0C06Q== + dependencies: + appdirsjs "^1.2.4" + chalk "^4.1.2" + find-up "^5.0.0" + mime "^2.4.1" + node-fetch "^2.6.0" + open "^6.2.0" + ora "^5.4.1" + semver "^7.5.2" + shell-quote "^1.7.3" + "@react-native-community/cli-tools@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-11.3.7.tgz#37aa7efc7b4a1b7077d541f1d7bb11a2ab7b6ff2" @@ -1658,6 +1792,13 @@ semver "^7.5.2" shell-quote "^1.7.3" +"@react-native-community/cli-types@11.3.10": + version "11.3.10" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-11.3.10.tgz#cb02186cd247108bcea5ff93c4c97bb3c8dd8f22" + integrity sha512-0FHK/JE7bTn0x1y8Lk5m3RISDHIBQqWLltO2Mf7YQ6cAeKs8iNOJOeKaHJEY+ohjsOyCziw+XSC4cY57dQrwNA== + dependencies: + joi "^17.2.1" + "@react-native-community/cli-types@11.3.7": version "11.3.7" resolved "https://registry.yarnpkg.com/@react-native-community/cli-types/-/cli-types-11.3.7.tgz#12fe7cff3da08bd27e11116531b2e001939854b9" @@ -1688,6 +1829,29 @@ prompts "^2.4.0" semver "^7.5.2" +"@react-native-community/cli@^11.3.10": + version "11.3.10" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-11.3.10.tgz#ea88d20982cfc9ed7a5170d04aeedd2abf092348" + integrity sha512-bIx0t5s9ewH1PlcEcuQUD+UnVrCjPGAfjhVR5Gew565X60nE+GTIHRn70nMv9G4he/amBF+Z+vf5t8SNZEWMwg== + dependencies: + "@react-native-community/cli-clean" "11.3.10" + "@react-native-community/cli-config" "11.3.10" + "@react-native-community/cli-debugger-ui" "11.3.10" + "@react-native-community/cli-doctor" "11.3.10" + "@react-native-community/cli-hermes" "11.3.10" + "@react-native-community/cli-plugin-metro" "11.3.10" + "@react-native-community/cli-server-api" "11.3.10" + "@react-native-community/cli-tools" "11.3.10" + "@react-native-community/cli-types" "11.3.10" + chalk "^4.1.2" + commander "^9.4.1" + execa "^5.0.0" + find-up "^4.1.0" + fs-extra "^8.1.0" + graceful-fs "^4.1.3" + prompts "^2.4.0" + semver "^7.5.2" + "@react-native/assets-registry@^0.72.0": version "0.72.0" resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.72.0.tgz#c82a76a1d86ec0c3907be76f7faf97a32bbed05d"