@openwallet-foundation/askar-react-native 0.6.1 → 0.7.0-alpha-20261023221824
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +0 -64
- package/ios/Askar.mm +11 -3
- package/package.json +4 -4
package/android/build.gradle
CHANGED
|
@@ -1,17 +1,6 @@
|
|
|
1
1
|
import org.apache.tools.ant.filters.ReplaceTokens
|
|
2
2
|
import java.nio.file.Paths
|
|
3
3
|
|
|
4
|
-
buildscript {
|
|
5
|
-
repositories {
|
|
6
|
-
google()
|
|
7
|
-
mavenCentral()
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
dependencies {
|
|
11
|
-
classpath 'com.android.tools.build:gradle:4.2.2'
|
|
12
|
-
classpath 'de.undercouch:gradle-download-task:4.1.2'
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
4
|
|
|
16
5
|
static def findNodeModules(baseDir) {
|
|
17
6
|
def basePath = baseDir.toPath().normalize()
|
|
@@ -51,7 +40,6 @@ file("$nodeModules/react-native/ReactAndroid/gradle.properties").withInputStream
|
|
|
51
40
|
def REACT_NATIVE_VERSION = reactProperties.getProperty("VERSION_NAME").split("\\.")[1].toInteger()
|
|
52
41
|
|
|
53
42
|
apply plugin: 'com.android.library'
|
|
54
|
-
apply plugin: 'de.undercouch.download'
|
|
55
43
|
|
|
56
44
|
def getExt(name) {
|
|
57
45
|
return rootProject.ext.get(name)
|
|
@@ -126,11 +114,6 @@ android {
|
|
|
126
114
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
127
115
|
}
|
|
128
116
|
|
|
129
|
-
configurations {
|
|
130
|
-
extractHeaders
|
|
131
|
-
extractJNI
|
|
132
|
-
}
|
|
133
|
-
|
|
134
117
|
sourceSets {
|
|
135
118
|
main {
|
|
136
119
|
jniLibs.srcDirs = ['../native/mobile/android']
|
|
@@ -212,50 +195,3 @@ repositories {
|
|
|
212
195
|
dependencies {
|
|
213
196
|
implementation "com.facebook.react:react-android:"
|
|
214
197
|
}
|
|
215
|
-
|
|
216
|
-
def downloadsDir = new File("$buildDir/downloads")
|
|
217
|
-
|
|
218
|
-
task createNativeDepsDirectories {
|
|
219
|
-
doLast {
|
|
220
|
-
downloadsDir.mkdirs()
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
task extractAARHeaders {
|
|
226
|
-
doLast {
|
|
227
|
-
configurations.extractHeaders.files.each {
|
|
228
|
-
def file = it.absoluteFile
|
|
229
|
-
copy {
|
|
230
|
-
from zipTree(file)
|
|
231
|
-
into "$buildDir/$file.name"
|
|
232
|
-
include "**/*.h"
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
extractAARHeaders.mustRunAfter createNativeDepsDirectories
|
|
239
|
-
|
|
240
|
-
task extractJNIFiles {
|
|
241
|
-
doLast {
|
|
242
|
-
configurations.extractJNI.files.each {
|
|
243
|
-
def file = it.absoluteFile
|
|
244
|
-
|
|
245
|
-
copy {
|
|
246
|
-
from zipTree(file)
|
|
247
|
-
into "$buildDir/$file.name"
|
|
248
|
-
include "jni/**/*"
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
extractJNIFiles.mustRunAfter extractAARHeaders
|
|
255
|
-
|
|
256
|
-
tasks.whenTaskAdded { task ->
|
|
257
|
-
if (!task.name.contains('Clean') && (task.name.contains('externalNative') || task.name.contains('CMake'))) {
|
|
258
|
-
task.dependsOn(extractAARHeaders)
|
|
259
|
-
task.dependsOn(extractJNIFiles)
|
|
260
|
-
}
|
|
261
|
-
}
|
package/ios/Askar.mm
CHANGED
|
@@ -10,6 +10,15 @@
|
|
|
10
10
|
|
|
11
11
|
using namespace facebook;
|
|
12
12
|
|
|
13
|
+
// React Native 0.87 removed the legacy bridge, so `RCTCxxBridge` no longer exists and
|
|
14
|
+
// cannot be named. Re-declare just the `runtime` accessor we need and probe for it at
|
|
15
|
+
// runtime instead: only the legacy bridge responds to it, and on 0.87+
|
|
16
|
+
// `+[RCTBridge currentBridge]` is hardcoded to return nil, so the branch is never taken.
|
|
17
|
+
// (`jsCallInvoker` is already declared on RCTBridge by <ReactCommon/RCTTurboModule.h>.)
|
|
18
|
+
@interface RCTBridge (AskarLegacyBridge)
|
|
19
|
+
- (void *)runtime;
|
|
20
|
+
@end
|
|
21
|
+
|
|
13
22
|
@interface Askar () <RCTTurboModule, RCTTurboModuleWithJSIBindings>
|
|
14
23
|
@end
|
|
15
24
|
|
|
@@ -46,9 +55,8 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(install)
|
|
|
46
55
|
// Old Architecture (legacy bridge present): install using the bridge
|
|
47
56
|
// runtime so this keeps working for non-bridgeless apps.
|
|
48
57
|
RCTBridge* bridge = [RCTBridge currentBridge];
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
jsi::Runtime* jsiRuntime = (jsi::Runtime*) cxxBridge.runtime;
|
|
58
|
+
if ([bridge respondsToSelector:@selector(runtime)]) {
|
|
59
|
+
jsi::Runtime* jsiRuntime = (jsi::Runtime*) [bridge runtime];
|
|
52
60
|
if (jsiRuntime != nil) {
|
|
53
61
|
askarTurboModuleUtility::registerTurboModule(*jsiRuntime, bridge.jsCallInvoker);
|
|
54
62
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openwallet-foundation/askar-react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0-alpha-20261023221824",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "React Native wrapper for Askar",
|
|
6
6
|
"main": "build/index",
|
|
@@ -30,16 +30,16 @@
|
|
|
30
30
|
"scripts"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@openwallet-foundation/askar-shared": "0.
|
|
33
|
+
"@openwallet-foundation/askar-shared": "0.7.0-alpha-20261023221824"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"react": "18.2.0",
|
|
37
|
-
"react-native": ">= 0.
|
|
37
|
+
"react-native": ">= 0.77",
|
|
38
38
|
"typescript": "~5.4.5"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"react": ">= 16",
|
|
42
|
-
"react-native": ">= 0.
|
|
42
|
+
"react-native": ">= 0.77"
|
|
43
43
|
},
|
|
44
44
|
"binary": {
|
|
45
45
|
"version": "v0.5.0",
|