Skip to content

Commit 02719d5

Browse files
authored
Fix ios archive (#91)
* fix: using podspec filter and codegen config * fix: disable new arch ios * chore: updated version * chore: updated android action
1 parent f1a4eff commit 02719d5

File tree

5 files changed

+54
-49
lines changed

5 files changed

+54
-49
lines changed

.github/workflows/android.yml

+26-33
Original file line numberDiff line numberDiff line change
@@ -9,61 +9,54 @@ on:
99

1010
jobs:
1111
e2e:
12-
runs-on: macos-latest
12+
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v3
15-
- uses: actions/cache@v3
15+
- id: yarn-cache
16+
uses: actions/cache@v3
1617
with:
1718
path: |
18-
~/.gradle/caches
19-
~/.gradle/wrapper
20-
key: gradle
21-
- uses: actions/cache@v3
22-
id: avd-cache
23-
with:
24-
path: |
25-
~/.android/avd/*
26-
~/.android/adb*
27-
key: avd
19+
**/node_modules
20+
.yarn/install-state.gz
21+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
22+
restore-keys: |
23+
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
24+
${{ runner.os }}-yarn-
2825
- uses: actions/setup-java@v3
2926
with:
3027
distribution: 'temurin'
31-
java-version: '11'
28+
java-version: '17'
3229
- uses: android-actions/setup-android@v2
33-
- name: Android Deps
34-
run: |
35-
rm -rf ~/Library/Android/sdk/ndk || echo "skipped"
36-
rm -rf ~/Library/Android/sdk/ndk-bundle || echo "skipped"
3730
- uses: nttld/setup-ndk@v1
3831
id: setup-ndk
3932
with:
4033
ndk-version: r21d
41-
- name: Set up Node
42-
run: |
34+
- uses: actions/setup-node@v4
35+
with:
36+
node-version-file: .nvmrc
37+
- run: |
4338
npm install -g detox-cli
4439
npm install -g yarn
45-
- run: yarn
40+
npm install -g node-gyp
41+
- if: steps.yarn-cache.outputs.cache-hit != 'true'
42+
run: yarn install --immutable
43+
shell: bash
4644
- run: yarn example build:android
4745
env:
4846
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
47+
- run: |
48+
rm -rf ~/.gradle
49+
rm -rf /usr/local/lib/android/sdk/ndk/
4950
- run: yarn example start &
5051
timeout-minutes: 10
51-
- if: steps.avd-cache.outputs.cache-hit != 'true'
52-
uses: reactivecircus/android-emulator-runner@v2
53-
with:
54-
api-level: 29
55-
avd-name: PhoneAPI30
56-
arch: x86_64
57-
force-avd-creation: false
58-
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
59-
disable-animations: false
60-
script: echo "Generated AVD snapshot for caching."
52+
- name: Enable KVM
53+
run: |
54+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
55+
sudo udevadm control --reload-rules
56+
sudo udevadm trigger --name-match=kvm
6157
- uses: reactivecircus/android-emulator-runner@v2
6258
with:
6359
api-level: 29
6460
avd-name: PhoneAPI30
65-
arch: x86_64
66-
force-avd-creation: false
67-
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
6861
disable-animations: true
6962
script: yarn example test:android

.github/workflows/ios.yml

+16-8
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,30 @@ jobs:
1212
runs-on: macos-latest
1313
steps:
1414
- uses: actions/checkout@v3
15-
- uses: actions/cache@v3
16-
id: ios-cache
15+
- id: yarn-cache
16+
uses: actions/cache@v3
1717
with:
1818
path: |
19-
example/ios/build/*
20-
example/ios/Pods/*
21-
key: ios
22-
- name: Set up Node
23-
run: |
19+
**/node_modules
20+
.yarn/install-state.gz
21+
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
22+
restore-keys: |
23+
${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
24+
${{ runner.os }}-yarn-
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version-file: .nvmrc
28+
- run: |
2429
npm install -g detox-cli
2530
npm install -g yarn
31+
npm install -g node-gyp
2632
- name: Install Detox
2733
run: |
2834
brew tap wix/brew
2935
brew install applesimutils
30-
- run: yarn
36+
- if: steps.yarn-cache.outputs.cache-hit != 'true'
37+
run: yarn install --immutable
38+
shell: bash
3139
- run: yarn example build:ios
3240
- run: yarn example start &
3341
timeout-minutes: 20

ios/FastRsa.h

-6
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@
22
#import "react-native-fast-rsa.h"
33
#endif
44

5-
#ifdef RCT_NEW_ARCH_ENABLED
6-
#import "RNFastRsaSpec.h"
7-
8-
@interface FastRsa : NSObject <NativeFastRsaSpec>
9-
#else
105
#import <React/RCTBridgeModule.h>
116

127
@interface FastRsa : NSObject <RCTBridgeModule>
138
@property (nonatomic, assign) BOOL setBridgeOnMainQueue;
14-
#endif
159

1610
@end

package.json

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-fast-rsa",
3-
"version": "2.4.3",
3+
"version": "2.4.4",
44
"description": "library for use RSA",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",
@@ -166,5 +166,15 @@
166166
"dependencies": {
167167
"big-integer": "^1.6.51",
168168
"flatbuffers": "2.0.6"
169+
},
170+
"codegenConfig": {
171+
"name": "RNFastRsaSpec",
172+
"type": "modules",
173+
"jsSrcsDir": "src"
174+
},
175+
"create-react-native-library": {
176+
"type": "module-mixed",
177+
"languages": "cpp",
178+
"version": "0.38.2"
169179
}
170180
}

react-native-fast-rsa.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Pod::Spec.new do |s|
1414
s.platforms = { :ios => "11.0" }
1515
s.source = { :git => "https://github.com/jerson/react-native-fast-rsa.git", :tag => "#{s.version}" }
1616

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

0 commit comments

Comments
 (0)