Skip to content

Commit

Permalink
Fix ios archive (#91)
Browse files Browse the repository at this point in the history
* fix: using podspec filter and codegen config

* fix: disable new arch ios

* chore: updated version

* chore: updated android action
  • Loading branch information
jerson authored Jul 19, 2024
1 parent f1a4eff commit 02719d5
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 49 deletions.
59 changes: 26 additions & 33 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,61 +9,54 @@ on:

jobs:
e2e:
runs-on: macos-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
- id: yarn-cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle
- uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd
**/node_modules
.yarn/install-state.gz
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
${{ runner.os }}-yarn-
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
java-version: '17'
- uses: android-actions/setup-android@v2
- name: Android Deps
run: |
rm -rf ~/Library/Android/sdk/ndk || echo "skipped"
rm -rf ~/Library/Android/sdk/ndk-bundle || echo "skipped"
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r21d
- name: Set up Node
run: |
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: |
npm install -g detox-cli
npm install -g yarn
- run: yarn
npm install -g node-gyp
- if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
shell: bash
- run: yarn example build:android
env:
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
- run: |
rm -rf ~/.gradle
rm -rf /usr/local/lib/android/sdk/ndk/
- run: yarn example start &
timeout-minutes: 10
- if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
avd-name: PhoneAPI30
arch: x86_64
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
avd-name: PhoneAPI30
arch: x86_64
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: yarn example test:android
24 changes: 16 additions & 8 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,30 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: ios-cache
- id: yarn-cache
uses: actions/cache@v3
with:
path: |
example/ios/build/*
example/ios/Pods/*
key: ios
- name: Set up Node
run: |
**/node_modules
.yarn/install-state.gz
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
restore-keys: |
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
${{ runner.os }}-yarn-
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: |
npm install -g detox-cli
npm install -g yarn
npm install -g node-gyp
- name: Install Detox
run: |
brew tap wix/brew
brew install applesimutils
- run: yarn
- if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --immutable
shell: bash
- run: yarn example build:ios
- run: yarn example start &
timeout-minutes: 20
Expand Down
6 changes: 0 additions & 6 deletions ios/FastRsa.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,9 @@
#import "react-native-fast-rsa.h"
#endif

#ifdef RCT_NEW_ARCH_ENABLED
#import "RNFastRsaSpec.h"

@interface FastRsa : NSObject <NativeFastRsaSpec>
#else
#import <React/RCTBridgeModule.h>

@interface FastRsa : NSObject <RCTBridgeModule>
@property (nonatomic, assign) BOOL setBridgeOnMainQueue;
#endif

@end
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-fast-rsa",
"version": "2.4.3",
"version": "2.4.4",
"description": "library for use RSA",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down Expand Up @@ -166,5 +166,15 @@
"dependencies": {
"big-integer": "^1.6.51",
"flatbuffers": "2.0.6"
},
"codegenConfig": {
"name": "RNFastRsaSpec",
"type": "modules",
"jsSrcsDir": "src"
},
"create-react-native-library": {
"type": "module-mixed",
"languages": "cpp",
"version": "0.38.2"
}
}
2 changes: 1 addition & 1 deletion react-native-fast-rsa.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Pod::Spec.new do |s|
s.platforms = { :ios => "11.0" }
s.source = { :git => "https://github.com/jerson/react-native-fast-rsa.git", :tag => "#{s.version}" }

s.source_files = "ios/**/*.{h,m,mm}", "cpp/**/*.{hpp,cpp,c,h}"
s.source_files = "ios/*.{h,m,mm}", "cpp/**/*.{hpp,cpp,c,h}"
s.vendored_framework = 'ios/Rsa.xcframework'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }

Expand Down

0 comments on commit 02719d5

Please sign in to comment.