@synonymdev/react-native-pubky 0.9.0 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +17 -13
- package/android/src/main/java/com/pubky/PubkyModule.kt +1 -1
- package/android/src/main/java/uniffi/{pubkymobile/pubkymobile.kt → pubkycore/pubkycore.kt} +185 -150
- package/android/src/main/jniLibs/arm64-v8a/{libpubkymobile.so → libpubkycore.so} +0 -0
- package/android/src/main/jniLibs/armeabi-v7a/libpubkycore.so +0 -0
- package/android/src/main/jniLibs/x86/{libpubkymobile.so → libpubkycore.so} +0 -0
- package/android/src/main/jniLibs/x86_64/{libpubkymobile.so → libpubkycore.so} +0 -0
- package/ios/Frameworks/{PubkyMobile.xcframework → PubkyCore.xcframework}/Info.plist +8 -8
- package/ios/Frameworks/{PubkyMobile.xcframework → PubkyCore.xcframework}/ios-arm64/Headers/module.modulemap +2 -2
- package/ios/Frameworks/PubkyCore.xcframework/ios-arm64/Headers/pubkycoreFFI.h +297 -0
- package/ios/Frameworks/{PubkyMobile.xcframework/ios-arm64/libpubkymobile.a → PubkyCore.xcframework/ios-arm64/libpubkycore.a} +0 -0
- package/ios/Frameworks/{PubkyMobile.xcframework → PubkyCore.xcframework}/ios-arm64-simulator/Headers/module.modulemap +2 -2
- package/ios/Frameworks/PubkyCore.xcframework/ios-arm64-simulator/Headers/pubkycoreFFI.h +297 -0
- package/ios/Frameworks/{PubkyMobile.xcframework/ios-arm64-simulator/libpubkymobile.a → PubkyCore.xcframework/ios-arm64-simulator/libpubkycore.a} +0 -0
- package/ios/{pubkymobile.swift → pubkycore.swift} +81 -48
- package/lib/typescript/commonjs/src/index.d.ts +9 -10
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +9 -10
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +12 -7
- package/react-native-pubky.podspec +1 -1
- package/src/index.tsx +9 -9
- package/android/src/main/jniLibs/armeabi-v7a/libpubkymobile.so +0 -0
- package/ios/Frameworks/PubkyMobile.xcframework/ios-arm64/Headers/mobileFFI.h +0 -188
- package/ios/Frameworks/PubkyMobile.xcframework/ios-arm64/Headers/pubkymobileFFI.h +0 -292
- package/ios/Frameworks/PubkyMobile.xcframework/ios-arm64/libmobile.a +0 -0
- package/ios/Frameworks/PubkyMobile.xcframework/ios-arm64-simulator/Headers/mobileFFI.h +0 -188
- package/ios/Frameworks/PubkyMobile.xcframework/ios-arm64-simulator/Headers/pubkymobileFFI.h +0 -292
- package/ios/Frameworks/PubkyMobile.xcframework/ios-arm64-simulator/libmobile.a +0 -0
package/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# react-native-pubky
|
2
2
|
|
3
|
-
React Native implementation of [pubky](https://github.com/pubky/pubky)
|
3
|
+
React Native implementation of [pubky-core](https://github.com/pubky/pubky-core)
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -29,10 +29,6 @@ npm install @synonymdev/react-native-pubky
|
|
29
29
|
- [x] [create_recovery_file](#createRecoveryFile): Create a recovery file.
|
30
30
|
- [x] [decrypt_recovery_file](#decryptRecoveryFile): Decrypt a recovery file.
|
31
31
|
|
32
|
-
### Methods to be Implemented
|
33
|
-
- [ ] setProfile: Set profile information for a pubky.
|
34
|
-
- [ ] getProfile: Get profile information for a pubky.
|
35
|
-
|
36
32
|
## Usage
|
37
33
|
### <a name="auth"></a>Auth
|
38
34
|
```js
|
@@ -299,14 +295,6 @@ git clone git@github.com:pubky/react-native-pubky.git && cd react-native-pubky &
|
|
299
295
|
yarn add path/to/react-native-pubky
|
300
296
|
```
|
301
297
|
|
302
|
-
## Update Bindings
|
303
|
-
|
304
|
-
After making changes to any of the Rust files, the bindings will need to be updated. To do this, run the following command:
|
305
|
-
|
306
|
-
```sh
|
307
|
-
npm run update-bindings
|
308
|
-
```
|
309
|
-
|
310
298
|
## Run React Native Example App
|
311
299
|
1. Run Homeserver:
|
312
300
|
```sh
|
@@ -317,6 +305,22 @@ cd rust/pubky/pubky-homeserver && cargo run -- --config=./src/config.toml
|
|
317
305
|
cd example && yarn install && cd ios && pod install && cd ../ && yarn ios
|
318
306
|
```
|
319
307
|
|
308
|
+
## Download Remote Bindings
|
309
|
+
|
310
|
+
This command will download the current bindings from the [SDK repo](https://github.com/pubky/pubky-core-mobile-sdk):
|
311
|
+
|
312
|
+
```sh
|
313
|
+
npm run update-remote-bindings
|
314
|
+
```
|
315
|
+
|
316
|
+
## Setup Local Bindings
|
317
|
+
|
318
|
+
This command will download the entire Rust project if it doesn't exist and set up the bindings locally for faster iteration and testing:
|
319
|
+
|
320
|
+
```sh
|
321
|
+
npm run update-local-bindings
|
322
|
+
```
|
323
|
+
|
320
324
|
Finally, ensure that `PubkyModule.kt`, `Pubky.swift`, `Pubky.mm` & `src/index.tsx` are updated accordingly based on the changes made to the Rust files.
|
321
325
|
|
322
326
|
## License
|
@@ -10,7 +10,7 @@ import kotlinx.coroutines.CoroutineScope
|
|
10
10
|
import kotlinx.coroutines.Dispatchers
|
11
11
|
import kotlinx.coroutines.launch
|
12
12
|
import kotlinx.coroutines.withContext
|
13
|
-
import uniffi.
|
13
|
+
import uniffi.pubkycore.*
|
14
14
|
|
15
15
|
class PubkyModule(reactContext: ReactApplicationContext) :
|
16
16
|
ReactContextBaseJavaModule(reactContext) {
|