Skip to content
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
8 changes: 6 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ runs:
using: composite
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

- name: Enable Corepack
run: corepack enable
shell: bash

- name: Cache dependencies
id: yarn-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
**/node_modules
Expand Down
53 changes: 35 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup
Expand All @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup
Expand All @@ -42,7 +42,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup
Expand All @@ -56,13 +56,13 @@ jobs:
TURBO_CACHE_DIR: .turbo/android
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Cache turborepo for Android
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }}
Expand All @@ -79,7 +79,7 @@ jobs:

- name: Install JDK
if: env.turbo_cache_hit != 1
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
Expand All @@ -91,7 +91,7 @@ jobs:

- name: Cache Gradle
if: env.turbo_cache_hit != 1
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.gradle/wrapper
Expand All @@ -102,23 +102,26 @@ jobs:

- name: Build example for Android
env:
JAVA_OPTS: "-XX:MaxHeapSize=6g"
JAVA_OPTS: '-XX:MaxHeapSize=6g'
run: |
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"

build-ios:
runs-on: macos-14
runs-on: macos-15
env:
TURBO_CACHE_DIR: .turbo/ios
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup

- name: Install xcbeautify
run: brew install xcbeautify

- name: Cache turborepo for iOS
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.TURBO_CACHE_DIR }}
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }}
Expand All @@ -133,25 +136,39 @@ jobs:
echo "turbo_cache_hit=1" >> $GITHUB_ENV
fi

- name: Cache cocoapods
- name: Cache CocoaPods
if: env.turbo_cache_hit != 1
id: cocoapods-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
**/ios/Pods
path: example/ios/Pods
key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-cocoapods-

- name: Install cocoapods
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
# React Native 0.76+ requires pod install to run even when Pods are cached,
# because it generates ReactAppDependencyProvider.podspec in build/generated/ios/.
# Skipping pod install on cache hit causes "No podspec found" errors.
- name: Install CocoaPods
if: env.turbo_cache_hit != 1
run: |
cd example/ios
pod install
env:
NO_FLIPPER: 1

- name: Build example for iOS
if: env.turbo_cache_hit != 1
run: |
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
cd example/ios
xcodebuild \
-workspace MsdkReactNativeExample.xcworkspace \
-scheme MsdkReactNativeExample \
-configuration Debug \
-sdk iphonesimulator \
-destination "platform=iOS Simulator,name=iPhone 16,OS=latest" \
-derivedDataPath ~/DerivedData \
COMPILER_INDEX_STORE_ENABLE=NO \
CLANG_ENABLE_MODULE_DEBUGGING=NO \
build > xcodebuild.log 2>&1 || (cat xcodebuild.log | xcbeautify && exit 1)
cat xcodebuild.log | xcbeautify
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ example/vendor/
# node.js
#
node_modules/
example/node_modules/
npm-debug.log
yarn-debug.log
yarn-error.log
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18
v20
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
## [0.2.1] Update internal SDK libraries to android 3.8.8 and iOS 3.8.5
## [0.2.2] Update internal SDK libraries to android 3.8.9 and iOS 3.8.8. Upgrade React Native version
## [0.3.0] Update internal SDK libraries to android 3.9.1 and iOS 4.0.0. Change ios integration to SPM
## [0.3.1] Update internal SDK libraries to android 3.10.2 and iOS 4.0.7
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def kotlin_version = getExtOrDefault("kotlinVersion")

dependencies {
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.3")
implementation "com.ecommpay:msdk-ui:3.9.1"
implementation "com.ecommpay:msdk-ui:3.10.2"

implementation "com.facebook.react:react-native:+"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
Expand Down
1 change: 1 addition & 0 deletions example/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ ruby ">= 2.6.10"
# Exclude problematic versions of cocoapods and activesupport that causes build failures.
gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem 'nkf'
2 changes: 1 addition & 1 deletion example/ios/.xcode.env.local
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export NODE_BINARY=/opt/homebrew/bin/node
export NODE_BINARY=/Users/satiryc/.nvm/versions/node/v20.20.2/bin/node

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/ios/MsdkReactNativeExample/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>RCTNewArchEnabled</key>
<true/>
<false/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
Expand Down
16 changes: 13 additions & 3 deletions example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require Pod::Executable.execute_command('node', ['-p',

platform :ios, 16.6
prepare_react_native_project!
ENV['RCT_NEW_ARCH_ENABLED'] = '1'
ENV['RCT_NEW_ARCH_ENABLED'] = '0'

linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Expand All @@ -25,12 +25,22 @@ target 'MsdkReactNativeExample' do
)

post_install do |installer|
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false,
# :ccache_enabled => true
)

installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
if target.name == 'fmt'
config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17'
else
config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++20'
end

config.build_settings['CLANG_ENABLE_MODULE_DEBUGGING'] = 'NO'
end
end
end
end
1 change: 0 additions & 1 deletion example/node_modules

This file was deleted.

6 changes: 3 additions & 3 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"build:ios": "react-native build-ios --scheme MsdkReactNativeExample --mode Debug --extra-params \"-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\""
},
"dependencies": {
"react": "19.1.0",
"react-native": "^0.81.3",
"msdk-react-native": "*"
"msdk-react-native": "*",
"react": "19.1.4",
"react-native": "^0.81.3"
},
"devDependencies": {
"@babel/core": "^7.20.0",
Expand Down
Loading
Loading