@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.
Files changed (33) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +5 -2
  3. package/android/build.gradle +2 -3
  4. package/android/src/main/java/com/altcraft/sdk/SdkModule.kt +551 -478
  5. package/android/src/main/java/com/altcraft/sdk/utilities/Converter.kt +164 -0
  6. package/android/src/main/java/com/altcraft/sdk/utilities/Extension.kt +72 -0
  7. package/ios/Converter.swift +483 -46
  8. package/ios/Sdk.mm +83 -271
  9. package/ios/SdkModule.swift +335 -493
  10. package/lib/module/NativeSdk.js +35 -0
  11. package/lib/module/NativeSdk.js.map +1 -1
  12. package/lib/module/Utilities.js +94 -0
  13. package/lib/module/Utilities.js.map +1 -0
  14. package/lib/module/index.js +224 -246
  15. package/lib/module/index.js.map +1 -1
  16. package/lib/typescript/src/NativeSdk.d.ts +107 -31
  17. package/lib/typescript/src/NativeSdk.d.ts.map +1 -1
  18. package/lib/typescript/src/Utilities.d.ts +15 -0
  19. package/lib/typescript/src/Utilities.d.ts.map +1 -0
  20. package/lib/typescript/src/index.d.ts +162 -94
  21. package/lib/typescript/src/index.d.ts.map +1 -1
  22. package/package.json +2 -2
  23. package/src/NativeSdk.ts +135 -44
  24. package/src/Utilities.ts +116 -0
  25. package/src/index.tsx +281 -311
  26. package/android/src/main/java/com/altcraft/sdk/interfaces/RnFCMProvider.kt +0 -26
  27. package/android/src/main/java/com/altcraft/sdk/interfaces/RnHMSProvider.kt +0 -32
  28. package/android/src/main/java/com/altcraft/sdk/interfaces/RnJWTProvider.kt +0 -21
  29. package/android/src/main/java/com/altcraft/sdk/interfaces/RnRustoreProvider.kt +0 -53
  30. package/ios/protocols/RNAPNSProvider.swift +0 -15
  31. package/ios/protocols/RNFCMProvider.swift +0 -24
  32. package/ios/protocols/RNHMSProvider.swift +0 -24
  33. package/ios/protocols/RNJWTProvider.swift +0 -15
package/LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- # END-USER LICENSE AGREEMENT
2
-
3
- Copyright © 2024 Altcraft LLC. All rights reserved.
4
-
5
- 1. **GRANT OF LICENSE**: This document grants you certain rights to use the Altcraft Mobile SDK (hereinafter referred to as the "Software"). All rights not expressly granted are reserved by the copyright holder.
6
-
7
- 2. **USE**: You have the right to use and distribute the Software for both commercial and non-commercial purposes.
8
-
9
- 3. **MODIFICATION WITHOUT PUBLICATION**: You may modify the Software for your own use without the obligation to publish these modifications.
10
-
11
- 4. **MODIFICATION WITH PUBLICATION**: Any publication of modified Software requires prior written permission from the copyright holder.
12
-
13
- 5. **DISCLAIMER OF WARRANTY**: The Software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement.
14
-
15
- 6. **LIMITATION OF LIABILITY**: In no event shall the copyright holder be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this Software, even if advised of the possibility of such damage.
16
-
17
- 7. **DISTRIBUTION**: When distributing the Software, you must provide all recipients with a copy of this license agreement.
18
-
19
- 8. **COPYRIGHT NOTICE AND THIRD-PARTY COMPONENTS**:
20
- This Software may include components released under other licenses. A complete list of these components and their respective licenses is provided below:
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
  [![Platforms](https://img.shields.io/badge/Platform-Android-green?style=flat-square)](#)
9
9
  [![Push](https://img.shields.io/badge/Push-Firebase%20FCM%20%7C%20Huawei%20HMS%20%7C%20RuStore-green?style=flat-square)](#)
10
10
 
11
- Altcraft React Native SDK. It helps manage push subscriptions, tokens, SDK events, and sending mobile events to the Altcraft platform.
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 / APNS/ HMS / RuStore)
40
+ - Push provider integrated in the host app (FCM / HMS / RuStore)
38
41
 
39
42
  ---
40
43
 
@@ -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 "com.altcraft:android-sdk:0.0.4"
76
+ implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3"
78
77
  }