@saltware/fidbek-react-native 0.1.0

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 (44) hide show
  1. package/README.md +181 -0
  2. package/android/build.gradle +75 -0
  3. package/android/libs/fidbek-android.aar +0 -0
  4. package/android/src/main/AndroidManifest.xml +1 -0
  5. package/android/src/main/java/com/fidbek/reactnative/FidbekBridge.kt +39 -0
  6. package/android/src/newarch/com/fidbek/reactnative/FidbekReactNativeModule.kt +28 -0
  7. package/android/src/newarch/com/fidbek/reactnative/FidbekReactNativePackage.kt +82 -0
  8. package/app.plugin.js +5 -0
  9. package/fidbek-react-native.podspec +30 -0
  10. package/ios/FidbekReactNative.h +10 -0
  11. package/ios/FidbekReactNative.mm +57 -0
  12. package/ios/FidbekReactNativeBridge.swift +20 -0
  13. package/ios/FidbekSDK.xcframework/Info.plist +44 -0
  14. package/ios/FidbekSDK.xcframework/ios-arm64/FidbekSDK.framework/FidbekSDK +0 -0
  15. package/ios/FidbekSDK.xcframework/ios-arm64/FidbekSDK.framework/Info.plist +0 -0
  16. package/ios/FidbekSDK.xcframework/ios-arm64/FidbekSDK.framework/Modules/FidbekSDK.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  17. package/ios/FidbekSDK.xcframework/ios-arm64/FidbekSDK.framework/Modules/FidbekSDK.swiftmodule/arm64-apple-ios.abi.json +805 -0
  18. package/ios/FidbekSDK.xcframework/ios-arm64/FidbekSDK.framework/Modules/FidbekSDK.swiftmodule/arm64-apple-ios.package.swiftinterface +26 -0
  19. package/ios/FidbekSDK.xcframework/ios-arm64/FidbekSDK.framework/Modules/FidbekSDK.swiftmodule/arm64-apple-ios.private.swiftinterface +26 -0
  20. package/ios/FidbekSDK.xcframework/ios-arm64/FidbekSDK.framework/Modules/FidbekSDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  21. package/ios/FidbekSDK.xcframework/ios-arm64/FidbekSDK.framework/Modules/FidbekSDK.swiftmodule/arm64-apple-ios.swiftinterface +26 -0
  22. package/ios/FidbekSDK.xcframework/ios-arm64/FidbekSDK.framework/Modules/module.modulemap +4 -0
  23. package/ios/FidbekSDK.xcframework/ios-arm64_x86_64-simulator/FidbekSDK.framework/FidbekSDK +0 -0
  24. package/ios/FidbekSDK.xcframework/ios-arm64_x86_64-simulator/FidbekSDK.framework/Info.plist +0 -0
  25. package/ios/FidbekSDK.xcframework/ios-arm64_x86_64-simulator/FidbekSDK.framework/Modules/FidbekSDK.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  26. package/ios/FidbekSDK.xcframework/ios-arm64_x86_64-simulator/FidbekSDK.framework/Modules/FidbekSDK.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  27. package/ios/FidbekSDK.xcframework/ios-arm64_x86_64-simulator/FidbekSDK.framework/Modules/FidbekSDK.swiftmodule/arm64-apple-ios-simulator.abi.json +805 -0
  28. package/ios/FidbekSDK.xcframework/ios-arm64_x86_64-simulator/FidbekSDK.framework/Modules/FidbekSDK.swiftmodule/arm64-apple-ios-simulator.package.swiftinterface +26 -0
  29. package/ios/FidbekSDK.xcframework/ios-arm64_x86_64-simulator/FidbekSDK.framework/Modules/FidbekSDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +26 -0
  30. package/ios/FidbekSDK.xcframework/ios-arm64_x86_64-simulator/FidbekSDK.framework/Modules/FidbekSDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  31. package/ios/FidbekSDK.xcframework/ios-arm64_x86_64-simulator/FidbekSDK.framework/Modules/FidbekSDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +26 -0
  32. package/ios/FidbekSDK.xcframework/ios-arm64_x86_64-simulator/FidbekSDK.framework/Modules/FidbekSDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +805 -0
  33. package/ios/FidbekSDK.xcframework/ios-arm64_x86_64-simulator/FidbekSDK.framework/Modules/FidbekSDK.swiftmodule/x86_64-apple-ios-simulator.package.swiftinterface +26 -0
  34. package/ios/FidbekSDK.xcframework/ios-arm64_x86_64-simulator/FidbekSDK.framework/Modules/FidbekSDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +26 -0
  35. package/ios/FidbekSDK.xcframework/ios-arm64_x86_64-simulator/FidbekSDK.framework/Modules/FidbekSDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  36. package/ios/FidbekSDK.xcframework/ios-arm64_x86_64-simulator/FidbekSDK.framework/Modules/FidbekSDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +26 -0
  37. package/ios/FidbekSDK.xcframework/ios-arm64_x86_64-simulator/FidbekSDK.framework/Modules/module.modulemap +4 -0
  38. package/ios/FidbekSDK.xcframework/ios-arm64_x86_64-simulator/FidbekSDK.framework/_CodeSignature/CodeResources +101 -0
  39. package/package.json +53 -0
  40. package/react-native.config.js +11 -0
  41. package/src/NativeFidbekReactNative.ts +10 -0
  42. package/src/NativeFidbekReactNativeModule.js +3 -0
  43. package/src/index.d.ts +17 -0
  44. package/src/index.js +35 -0
@@ -0,0 +1,26 @@
1
+ // swift-interface-format-version: 1.0
2
+ // swift-compiler-version: Apple Swift version 6.2.4 effective-5.10 (swiftlang-6.2.4.1.4 clang-1700.6.4.2)
3
+ // swift-module-flags: -target x86_64-apple-ios14.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -module-name FidbekSDK -package-name source_ios
4
+ // swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2.4
5
+ import CoreMotion
6
+ import Foundation
7
+ import PencilKit
8
+ import Swift
9
+ import UIKit
10
+ import _Concurrency
11
+ import _StringProcessing
12
+ import _SwiftConcurrencyShims
13
+ import os
14
+ @_hasMissingDesignatedInitializers final public class Fidbek {
15
+ public static let shared: FidbekSDK.Fidbek
16
+ final public func configure(_ configuration: FidbekSDK.FidbekConfiguration)
17
+ final public func configure(token: Swift.String, shakeToOpenEnabled: Swift.Bool = true)
18
+ final public func present()
19
+ final public func stop()
20
+ @objc deinit
21
+ }
22
+ public struct FidbekConfiguration {
23
+ public let token: Swift.String
24
+ public let shakeToOpenEnabled: Swift.Bool
25
+ public init(token: Swift.String, shakeToOpenEnabled: Swift.Bool = true)
26
+ }
@@ -0,0 +1,26 @@
1
+ // swift-interface-format-version: 1.0
2
+ // swift-compiler-version: Apple Swift version 6.2.4 effective-5.10 (swiftlang-6.2.4.1.4 clang-1700.6.4.2)
3
+ // swift-module-flags: -target x86_64-apple-ios14.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -module-name FidbekSDK -package-name source_ios
4
+ // swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2.4
5
+ import CoreMotion
6
+ import Foundation
7
+ import PencilKit
8
+ import Swift
9
+ import UIKit
10
+ import _Concurrency
11
+ import _StringProcessing
12
+ import _SwiftConcurrencyShims
13
+ import os
14
+ @_hasMissingDesignatedInitializers final public class Fidbek {
15
+ public static let shared: FidbekSDK.Fidbek
16
+ final public func configure(_ configuration: FidbekSDK.FidbekConfiguration)
17
+ final public func configure(token: Swift.String, shakeToOpenEnabled: Swift.Bool = true)
18
+ final public func present()
19
+ final public func stop()
20
+ @objc deinit
21
+ }
22
+ public struct FidbekConfiguration {
23
+ public let token: Swift.String
24
+ public let shakeToOpenEnabled: Swift.Bool
25
+ public init(token: Swift.String, shakeToOpenEnabled: Swift.Bool = true)
26
+ }
@@ -0,0 +1,26 @@
1
+ // swift-interface-format-version: 1.0
2
+ // swift-compiler-version: Apple Swift version 6.2.4 effective-5.10 (swiftlang-6.2.4.1.4 clang-1700.6.4.2)
3
+ // swift-module-flags: -target x86_64-apple-ios14.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-experimental-feature DebugDescriptionMacro -module-name FidbekSDK -package-name source_ios
4
+ // swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.2.4
5
+ import CoreMotion
6
+ import Foundation
7
+ import PencilKit
8
+ import Swift
9
+ import UIKit
10
+ import _Concurrency
11
+ import _StringProcessing
12
+ import _SwiftConcurrencyShims
13
+ import os
14
+ @_hasMissingDesignatedInitializers final public class Fidbek {
15
+ public static let shared: FidbekSDK.Fidbek
16
+ final public func configure(_ configuration: FidbekSDK.FidbekConfiguration)
17
+ final public func configure(token: Swift.String, shakeToOpenEnabled: Swift.Bool = true)
18
+ final public func present()
19
+ final public func stop()
20
+ @objc deinit
21
+ }
22
+ public struct FidbekConfiguration {
23
+ public let token: Swift.String
24
+ public let shakeToOpenEnabled: Swift.Bool
25
+ public init(token: Swift.String, shakeToOpenEnabled: Swift.Bool = true)
26
+ }
@@ -0,0 +1,4 @@
1
+ module FidbekSDK {
2
+ header "FidbekSDK-Swift.h"
3
+ export *
4
+ }
@@ -0,0 +1,101 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>files</key>
6
+ <dict>
7
+ <key>Info.plist</key>
8
+ <data>
9
+ D17QFI4oDmZhWHj6bo6wdyPYbyM=
10
+ </data>
11
+ </dict>
12
+ <key>files2</key>
13
+ <dict/>
14
+ <key>rules</key>
15
+ <dict>
16
+ <key>^.*</key>
17
+ <true/>
18
+ <key>^.*\.lproj/</key>
19
+ <dict>
20
+ <key>optional</key>
21
+ <true/>
22
+ <key>weight</key>
23
+ <real>1000</real>
24
+ </dict>
25
+ <key>^.*\.lproj/locversion.plist$</key>
26
+ <dict>
27
+ <key>omit</key>
28
+ <true/>
29
+ <key>weight</key>
30
+ <real>1100</real>
31
+ </dict>
32
+ <key>^Base\.lproj/</key>
33
+ <dict>
34
+ <key>weight</key>
35
+ <real>1010</real>
36
+ </dict>
37
+ <key>^version.plist$</key>
38
+ <true/>
39
+ </dict>
40
+ <key>rules2</key>
41
+ <dict>
42
+ <key>.*\.dSYM($|/)</key>
43
+ <dict>
44
+ <key>weight</key>
45
+ <real>11</real>
46
+ </dict>
47
+ <key>^(.*/)?\.DS_Store$</key>
48
+ <dict>
49
+ <key>omit</key>
50
+ <true/>
51
+ <key>weight</key>
52
+ <real>2000</real>
53
+ </dict>
54
+ <key>^.*</key>
55
+ <true/>
56
+ <key>^.*\.lproj/</key>
57
+ <dict>
58
+ <key>optional</key>
59
+ <true/>
60
+ <key>weight</key>
61
+ <real>1000</real>
62
+ </dict>
63
+ <key>^.*\.lproj/locversion.plist$</key>
64
+ <dict>
65
+ <key>omit</key>
66
+ <true/>
67
+ <key>weight</key>
68
+ <real>1100</real>
69
+ </dict>
70
+ <key>^Base\.lproj/</key>
71
+ <dict>
72
+ <key>weight</key>
73
+ <real>1010</real>
74
+ </dict>
75
+ <key>^Info\.plist$</key>
76
+ <dict>
77
+ <key>omit</key>
78
+ <true/>
79
+ <key>weight</key>
80
+ <real>20</real>
81
+ </dict>
82
+ <key>^PkgInfo$</key>
83
+ <dict>
84
+ <key>omit</key>
85
+ <true/>
86
+ <key>weight</key>
87
+ <real>20</real>
88
+ </dict>
89
+ <key>^embedded\.provisionprofile$</key>
90
+ <dict>
91
+ <key>weight</key>
92
+ <real>20</real>
93
+ </dict>
94
+ <key>^version\.plist$</key>
95
+ <dict>
96
+ <key>weight</key>
97
+ <real>20</real>
98
+ </dict>
99
+ </dict>
100
+ </dict>
101
+ </plist>
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@saltware/fidbek-react-native",
3
+ "version": "0.1.0",
4
+ "description": "React Native TurboModule bridge for Fidbek mobile SDK (New Architecture only)",
5
+ "main": "src/index.js",
6
+ "types": "src/index.d.ts",
7
+ "react-native": "src/index.js",
8
+ "source": "src/index.js",
9
+ "files": [
10
+ "src",
11
+ "android/build.gradle",
12
+ "android/libs",
13
+ "android/src",
14
+ "ios/FidbekReactNative.h",
15
+ "ios/FidbekReactNative.mm",
16
+ "ios/FidbekReactNativeBridge.swift",
17
+ "ios/FidbekSDK.xcframework",
18
+ "fidbek-react-native.podspec",
19
+ "react-native.config.js",
20
+ "app.plugin.js"
21
+ ],
22
+ "keywords": [
23
+ "fidbek",
24
+ "react-native",
25
+ "expo",
26
+ "turbomodule",
27
+ "jsi"
28
+ ],
29
+ "license": "UNLICENSED",
30
+ "homepage": "https://fidbek.com",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/Saltware-Tech/fidbek-react-native.git"
34
+ },
35
+ "peerDependencies": {
36
+ "expo": ">=51.0.0",
37
+ "react": ">=18.0.0",
38
+ "react-native": ">=0.75.0"
39
+ },
40
+ "peerDependenciesMeta": {
41
+ "expo": {
42
+ "optional": true
43
+ }
44
+ },
45
+ "codegenConfig": {
46
+ "name": "RNFidbekReactNativeSpec",
47
+ "type": "modules",
48
+ "jsSrcsDir": "src",
49
+ "android": {
50
+ "javaPackageName": "com.fidbek.reactnative"
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,11 @@
1
+ module.exports = {
2
+ dependency: {
3
+ platforms: {
4
+ android: {
5
+ packageImportPath:
6
+ 'import com.fidbek.reactnative.FidbekReactNativePackage;',
7
+ packageInstance: 'new FidbekReactNativePackage()',
8
+ },
9
+ },
10
+ },
11
+ };
@@ -0,0 +1,10 @@
1
+ import type { TurboModule } from 'react-native';
2
+ import { TurboModuleRegistry } from 'react-native';
3
+
4
+ export interface Spec extends TurboModule {
5
+ configure(token: string, shakeToOpenEnabled: boolean): Promise<void>;
6
+ open(): Promise<void>;
7
+ shutdown(): Promise<void>;
8
+ }
9
+
10
+ export default TurboModuleRegistry.getEnforcing<Spec>('FidbekReactNative');
@@ -0,0 +1,3 @@
1
+ import { TurboModuleRegistry } from 'react-native';
2
+
3
+ export default TurboModuleRegistry.getEnforcing('FidbekReactNative');
package/src/index.d.ts ADDED
@@ -0,0 +1,17 @@
1
+ export interface FidbekConfigureOptions {
2
+ token: string;
3
+ shakeToOpenEnabled?: boolean;
4
+ }
5
+
6
+ export interface FidbekModule {
7
+ configure(options: FidbekConfigureOptions): Promise<void>;
8
+ open(): Promise<void>;
9
+ shutdown(): Promise<void>;
10
+ }
11
+
12
+ export declare function configure(options: FidbekConfigureOptions): Promise<void>;
13
+ export declare function open(): Promise<void>;
14
+ export declare function shutdown(): Promise<void>;
15
+
16
+ declare const Fidbek: FidbekModule;
17
+ export default Fidbek;
package/src/index.js ADDED
@@ -0,0 +1,35 @@
1
+ import NativeFidbekReactNative from './NativeFidbekReactNativeModule';
2
+
3
+ function assertToken(token) {
4
+ if (typeof token !== 'string' || token.trim().length === 0) {
5
+ throw new Error('token is required');
6
+ }
7
+ }
8
+
9
+ export async function configure(options) {
10
+ const token = options?.token;
11
+ assertToken(token);
12
+
13
+ const shakeToOpenEnabled =
14
+ typeof options?.shakeToOpenEnabled === 'boolean'
15
+ ? options.shakeToOpenEnabled
16
+ : true;
17
+
18
+ return NativeFidbekReactNative.configure(token, shakeToOpenEnabled);
19
+ }
20
+
21
+ export function open() {
22
+ return NativeFidbekReactNative.open();
23
+ }
24
+
25
+ export function shutdown() {
26
+ return NativeFidbekReactNative.shutdown();
27
+ }
28
+
29
+ const Fidbek = {
30
+ configure,
31
+ open,
32
+ shutdown,
33
+ };
34
+
35
+ export default Fidbek;