@altcraft/react-native-sdk 0.0.2 → 0.0.3
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/LICENSE +20 -20
- package/README.md +5 -2
- package/android/build.gradle +2 -3
- package/android/src/main/java/com/altcraft/sdk/SdkModule.kt +551 -478
- package/android/src/main/java/com/altcraft/sdk/utilities/Converter.kt +164 -0
- package/android/src/main/java/com/altcraft/sdk/utilities/Extension.kt +72 -0
- package/ios/Converter.swift +483 -46
- package/ios/Sdk.mm +83 -271
- package/ios/SdkModule.swift +335 -493
- package/lib/module/NativeSdk.js +35 -0
- package/lib/module/NativeSdk.js.map +1 -1
- package/lib/module/Utilities.js +94 -0
- package/lib/module/Utilities.js.map +1 -0
- package/lib/module/index.js +224 -246
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/NativeSdk.d.ts +107 -31
- package/lib/typescript/src/NativeSdk.d.ts.map +1 -1
- package/lib/typescript/src/Utilities.d.ts +15 -0
- package/lib/typescript/src/Utilities.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +162 -94
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/NativeSdk.ts +135 -44
- package/src/Utilities.ts +116 -0
- package/src/index.tsx +281 -311
- package/android/src/main/java/com/altcraft/sdk/interfaces/RnFCMProvider.kt +0 -26
- package/android/src/main/java/com/altcraft/sdk/interfaces/RnHMSProvider.kt +0 -32
- package/android/src/main/java/com/altcraft/sdk/interfaces/RnJWTProvider.kt +0 -21
- package/android/src/main/java/com/altcraft/sdk/interfaces/RnRustoreProvider.kt +0 -53
- package/ios/protocols/RNAPNSProvider.swift +0 -15
- package/ios/protocols/RNFCMProvider.swift +0 -24
- package/ios/protocols/RNHMSProvider.swift +0 -24
- package/ios/protocols/RNJWTProvider.swift +0 -15
package/LICENSE
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Altcraft
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
in the Software without restriction, including without limitation the rights
|
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
[](#)
|
|
9
9
|
[](#)
|
|
10
10
|
|
|
11
|
-
Altcraft React Native SDK
|
|
11
|
+
Altcraft React Native SDK is a bridge to the native **Altcraft Mobile SDK** for Android.
|
|
12
|
+
It helps manage push subscriptions, tokens, SDK events, and sending mobile events to the Altcraft platform.
|
|
13
|
+
|
|
14
|
+
> This README intentionally covers **Android only** (no iOS setup here).
|
|
12
15
|
|
|
13
16
|
---
|
|
14
17
|
|
|
@@ -34,7 +37,7 @@ Altcraft React Native SDK. It helps manage push subscriptions, tokens, SDK event
|
|
|
34
37
|
- React Native: depends on your RN version and New Architecture setup (TurboModules).
|
|
35
38
|
- Android:
|
|
36
39
|
- `minSdk` and `compileSdk` depend on your app configuration
|
|
37
|
-
- Push provider integrated in the host app (FCM /
|
|
40
|
+
- Push provider integrated in the host app (FCM / HMS / RuStore)
|
|
38
41
|
|
|
39
42
|
---
|
|
40
43
|
|
package/android/build.gradle
CHANGED
|
@@ -10,12 +10,10 @@ buildscript {
|
|
|
10
10
|
|
|
11
11
|
dependencies {
|
|
12
12
|
classpath "com.android.tools.build:gradle:8.7.2"
|
|
13
|
-
// noinspection DifferentKotlinGradleVersion
|
|
14
13
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}"
|
|
15
14
|
}
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
|
|
19
17
|
apply plugin: "com.android.library"
|
|
20
18
|
apply plugin: "kotlin-android"
|
|
21
19
|
|
|
@@ -72,7 +70,8 @@ repositories {
|
|
|
72
70
|
def kotlin_version = getExtOrDefault("kotlinVersion")
|
|
73
71
|
|
|
74
72
|
dependencies {
|
|
73
|
+
api "com.altcraft:android-sdk:1.0.2"
|
|
75
74
|
implementation "com.facebook.react:react-android"
|
|
76
75
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
77
|
-
implementation "
|
|
76
|
+
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3"
|
|
78
77
|
}
|