@altcraft/react-native-sdk 0.0.4 → 0.0.5

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 CHANGED
@@ -1,20 +1,48 @@
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.
1
+ EULA
2
+
3
+ END USER LICENSE AGREEMENT
4
+
5
+ Copyright © 2026 Altcraft LLC. All rights reserved.
6
+
7
+ 1. LICENSE GRANT
8
+ This agreement grants you certain rights to use the Altcraft Mobile SDK (hereinafter referred to as the "Software").
9
+ All rights not expressly granted by this agreement remain with the copyright holder.
10
+
11
+ 2. USE
12
+ You are permitted to use and distribute the Software for both commercial and non-commercial purposes.
13
+
14
+ 3. MODIFICATION WITHOUT PUBLICATION
15
+ You may modify the Software for your own internal purposes without any obligation to publish such modifications.
16
+
17
+ 4. MODIFICATION WITH PUBLICATION
18
+ Publication of modified Software requires prior written permission from the copyright holder.
19
+
20
+ 5. DISCLAIMER OF WARRANTIES
21
+ The Software is provided "as is," without any warranties, express or implied, including but not limited to
22
+ warranties of merchantability, fitness for a particular purpose, and non-infringement of third-party rights.
23
+
24
+ 6. LIMITATION OF LIABILITY
25
+ Under no circumstances shall the copyright holder be liable for any direct, indirect, incidental, special,
26
+ punitive, or consequential damages (including but not limited to: procurement of substitute goods or services;
27
+ loss of data, profits, or business interruption) arising in any way from the use of this Software,
28
+ even if the copyright holder has been advised of the possibility of such damages.
29
+
30
+ 7. DISTRIBUTION
31
+ When distributing the Software, you must provide all recipients with a copy of this license agreement.
32
+
33
+ 8. COPYRIGHT AND THIRD-PARTY COMPONENTS
34
+ This Software may include components distributed under other licenses. The full list of such components
35
+ and their respective licenses is provided below:
36
+
37
+ ### Third-party libraries and licenses
38
+
39
+ **Apache License 2.0**
40
+ Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).
41
+ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
42
+
43
+ * [React Native](https://github.com/facebook/react-native)
44
+ * [TypeScript](https://www.typescriptlang.org/)
45
+
46
+ **MIT License**
47
+
48
+ * [React](https://github.com/facebook/react)
package/README.md CHANGED
@@ -30,7 +30,7 @@ Altcraft React Native SDK is a bridge to the native **Altcraft Mobile SDK** for
30
30
 
31
31
  ## Dependency
32
32
 
33
- `react-native-sdk:1.0.0`
33
+ `react-native-sdk:0.0.5`
34
34
 
35
35
  ---
36
36
 
@@ -1,5 +1,6 @@
1
1
  package com.altcraft.sdk
2
2
 
3
+ import android.util.Log
3
4
  import com.facebook.react.bridge.ReactApplicationContext
4
5
  import com.facebook.react.bridge.ReactContextBaseJavaModule
5
6
  import com.facebook.react.bridge.ReactMethod
@@ -18,9 +19,13 @@ class SdkEventEmitter(reactContext: ReactApplicationContext) : ReactContextBaseJ
18
19
 
19
20
  @JvmStatic
20
21
  fun emit(eventName: String, event: Any?) {
21
- instance?.reactApplicationContext?.getJSModule(
22
- DeviceEventManagerModule.RCTDeviceEventEmitter::class.java
23
- )?.emit(eventName, event)
22
+ try {
23
+ instance?.reactApplicationContext?.getJSModule(
24
+ DeviceEventManagerModule.RCTDeviceEventEmitter::class.java
25
+ )?.emit(eventName, event)
26
+ } catch (e: Exception) {
27
+ Log.e("altcraft_lib_android_bridge", "SdkEventEmitter.emit failed: ${e.message}")
28
+ }
24
29
  }
25
30
 
26
31
  @JvmStatic