bridgefy-react-native 1.1.8 → 1.2.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 (105) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +582 -112
  3. package/android/build.gradle +36 -56
  4. package/android/gradle.properties +4 -4
  5. package/android/src/main/AndroidManifest.xml +1 -11
  6. package/android/src/main/java/me/bridgefy/plugin/react_native/BridgefyReactNativeModule.kt +609 -332
  7. package/android/src/main/java/me/bridgefy/plugin/react_native/BridgefyReactNativePackage.kt +25 -8
  8. package/android/src/main/java/me/bridgefy/plugin/react_native/service/BridgefyService.kt +625 -0
  9. package/android/src/main/java/me/bridgefy/plugin/react_native/util/BridgefyOperationModeManager.kt +193 -0
  10. package/android/src/main/java/me/bridgefy/plugin/react_native/util/BridgefyServiceManager.kt +123 -0
  11. package/android/src/main/java/me/bridgefy/plugin/react_native/util/Utils.kt +172 -0
  12. package/bridgefy-react-native.podspec +5 -25
  13. package/ios/BridgefyReactNativeModule.m +88 -0
  14. package/ios/BridgefyReactNativeModule.swift +524 -0
  15. package/lib/module/NativeBridgefy.js +114 -0
  16. package/lib/module/NativeBridgefy.js.map +1 -0
  17. package/lib/module/index.js +167 -208
  18. package/lib/module/index.js.map +1 -1
  19. package/lib/module/package.json +1 -0
  20. package/lib/typescript/package.json +1 -0
  21. package/lib/typescript/src/NativeBridgefy.d.ts +248 -0
  22. package/lib/typescript/src/NativeBridgefy.d.ts.map +1 -0
  23. package/lib/typescript/src/index.d.ts +140 -0
  24. package/lib/typescript/src/index.d.ts.map +1 -0
  25. package/package.json +77 -74
  26. package/src/NativeBridgefy.ts +317 -0
  27. package/src/index.tsx +270 -226
  28. package/ios/BridgefyReactNative.m +0 -56
  29. package/ios/BridgefyReactNative.swift +0 -368
  30. package/ios/BridgefyReactNative.xcodeproj/project.pbxproj +0 -293
  31. package/ios/BridgefyReactNative.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  32. package/ios/BridgefyReactNative.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  33. package/ios/BridgefyReactNative.xcodeproj/project.xcworkspace/xcuserdata/bridgefy.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  34. package/ios/BridgefyReactNative.xcodeproj/xcuserdata/bridgefy.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  35. package/ios/Frameworks/BridgefySDK.xcframework/Info.plist +0 -48
  36. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/BridgefySDK +0 -0
  37. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Headers/BridgefySDK-Swift.h +0 -317
  38. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Headers/BridgefySDK.h +0 -15
  39. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Info.plist +0 -0
  40. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios.abi.json +0 -5523
  41. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios.private.swiftinterface +0 -116
  42. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  43. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios.swiftinterface +0 -116
  44. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/Modules/module.modulemap +0 -11
  45. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/BridgefySDK.framework/_CodeSignature/CodeResources +0 -190
  46. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/dSYMs/BridgefySDK.framework.dSYM/Contents/Info.plist +0 -20
  47. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/DWARF/BridgefySDK +0 -0
  48. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/Relocations/aarch64/BridgefySDK.yml +0 -12529
  49. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/BridgefySDK +0 -0
  50. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Headers/BridgefySDK-Swift.h +0 -630
  51. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Headers/BridgefySDK.h +0 -15
  52. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Info.plist +0 -0
  53. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios-simulator.abi.json +0 -5523
  54. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +0 -116
  55. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  56. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/arm64-apple-ios-simulator.swiftinterface +0 -116
  57. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/x86_64-apple-ios-simulator.abi.json +0 -5523
  58. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +0 -116
  59. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  60. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/BridgefySDK.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +0 -116
  61. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/Modules/module.modulemap +0 -11
  62. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/BridgefySDK.framework/_CodeSignature/CodeResources +0 -245
  63. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/BridgefySDK.framework.dSYM/Contents/Info.plist +0 -20
  64. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/DWARF/BridgefySDK +0 -0
  65. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/Relocations/aarch64/BridgefySDK.yml +0 -12276
  66. package/ios/Frameworks/BridgefySDK.xcframework/ios-arm64_x86_64-simulator/dSYMs/BridgefySDK.framework.dSYM/Contents/Resources/Relocations/x86_64/BridgefySDK.yml +0 -11932
  67. package/lib/commonjs/index.js +0 -278
  68. package/lib/commonjs/index.js.map +0 -1
  69. package/lib/commonjs/infraestructure/index.js +0 -28
  70. package/lib/commonjs/infraestructure/index.js.map +0 -1
  71. package/lib/commonjs/infraestructure/interfaces/ibridgefy.js +0 -6
  72. package/lib/commonjs/infraestructure/interfaces/ibridgefy.js.map +0 -1
  73. package/lib/commonjs/infraestructure/interfaces/index.js +0 -17
  74. package/lib/commonjs/infraestructure/interfaces/index.js.map +0 -1
  75. package/lib/commonjs/infraestructure/services/bridgefy_service.js +0 -6
  76. package/lib/commonjs/infraestructure/services/bridgefy_service.js.map +0 -1
  77. package/lib/commonjs/infraestructure/services/index.js +0 -17
  78. package/lib/commonjs/infraestructure/services/index.js.map +0 -1
  79. package/lib/module/infraestructure/index.js +0 -3
  80. package/lib/module/infraestructure/index.js.map +0 -1
  81. package/lib/module/infraestructure/interfaces/ibridgefy.js +0 -2
  82. package/lib/module/infraestructure/interfaces/ibridgefy.js.map +0 -1
  83. package/lib/module/infraestructure/interfaces/index.js +0 -2
  84. package/lib/module/infraestructure/interfaces/index.js.map +0 -1
  85. package/lib/module/infraestructure/services/bridgefy_service.js +0 -2
  86. package/lib/module/infraestructure/services/bridgefy_service.js.map +0 -1
  87. package/lib/module/infraestructure/services/index.js +0 -2
  88. package/lib/module/infraestructure/services/index.js.map +0 -1
  89. package/lib/typescript/index.d.ts +0 -219
  90. package/lib/typescript/index.d.ts.map +0 -1
  91. package/lib/typescript/infraestructure/index.d.ts +0 -3
  92. package/lib/typescript/infraestructure/index.d.ts.map +0 -1
  93. package/lib/typescript/infraestructure/interfaces/ibridgefy.d.ts +0 -10
  94. package/lib/typescript/infraestructure/interfaces/ibridgefy.d.ts.map +0 -1
  95. package/lib/typescript/infraestructure/interfaces/index.d.ts +0 -2
  96. package/lib/typescript/infraestructure/interfaces/index.d.ts.map +0 -1
  97. package/lib/typescript/infraestructure/services/bridgefy_service.d.ts +0 -17
  98. package/lib/typescript/infraestructure/services/bridgefy_service.d.ts.map +0 -1
  99. package/lib/typescript/infraestructure/services/index.d.ts +0 -2
  100. package/lib/typescript/infraestructure/services/index.d.ts.map +0 -1
  101. package/src/infraestructure/index.tsx +0 -2
  102. package/src/infraestructure/interfaces/ibridgefy.tsx +0 -10
  103. package/src/infraestructure/interfaces/index.tsx +0 -1
  104. package/src/infraestructure/services/bridgefy_service.tsx +0 -20
  105. package/src/infraestructure/services/index.tsx +0 -1
@@ -1,116 +0,0 @@
1
- // swift-interface-format-version: 1.0
2
- // swift-compiler-version: Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)
3
- // swift-module-flags: -target arm64-apple-ios13.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-bare-slash-regex -module-name BridgefySDK
4
- // swift-module-flags-ignorable: -no-verify-emitted-module-interface
5
- @_exported import BridgefySDK
6
- import CommonCrypto
7
- import CoreBluetooth
8
- import CryptoKit
9
- import Foundation
10
- import Swift
11
- import UIKit
12
- import _Concurrency
13
- import _StringProcessing
14
- import _SwiftConcurrencyShims
15
- public class Bridgefy {
16
- public init(withApiKey apiKey: Swift.String, delegate: any BridgefySDK.BridgefyDelegate, verboseLogging: Swift.Bool = false) throws
17
- @objc deinit
18
- public func start(withUserId userId: Foundation.UUID? = nil, andPropagationProfile propagationProfile: BridgefySDK.PropagationProfile = .standard)
19
- public func stop()
20
- public func destroySession()
21
- public func send(_ data: Foundation.Data, using transmissionMode: BridgefySDK.TransmissionMode) throws -> Foundation.UUID
22
- public func establishSecureConnection(with userId: Foundation.UUID)
23
- public func fingerprint(for userId: Foundation.UUID) throws -> BridgefySDK.BridgefyFingerprint?
24
- public func isFingerprintValid(_ fingerprintData: Foundation.Data, for userId: Foundation.UUID) throws -> Swift.Bool
25
- public static var isInitialized: Swift.Bool {
26
- get
27
- }
28
- public static var isStarted: Swift.Bool {
29
- get
30
- }
31
- public var currentUserId: Foundation.UUID? {
32
- get
33
- }
34
- public var connectedPeers: [Foundation.UUID]? {
35
- get
36
- }
37
- public var licenseExpirationDate: Foundation.Date? {
38
- get
39
- }
40
- }
41
- public enum BridgefyError : Swift.Error {
42
- case simulatorIsNotSupported
43
- case inconsistentUserId
44
- case notStarted
45
- case alreadyInstantiated
46
- case startInProgress
47
- case alreadyStarted
48
- case stopInProgress
49
- case destroySessionInProgress
50
- case serviceNotStarted
51
- case invalidApiKey
52
- case missingBundleID
53
- case internetConnectionRequired
54
- case sessionError
55
- case expiredLicense
56
- case inconsistentDeviceTime
57
- case BLEUsageNotGranted
58
- case BLEUsageRestricted
59
- case BLEPoweredOff
60
- case BLEUnsupported
61
- case BLEUnknownError
62
- case inconsistentConnection
63
- case connectionIsAlreadySecure
64
- case cannotCreateSecureConnection
65
- case dataLengthExceeded
66
- case dataValueIsEmpty
67
- case peerIsNotConnected
68
- case internalError
69
- case licenseError(code: Swift.Int)
70
- case storageError(code: Swift.Int)
71
- case encodingError(code: Swift.Int)
72
- case encryptionError(code: Swift.Int)
73
- }
74
- extension BridgefySDK.BridgefyError : Foundation.LocalizedError {
75
- public var errorDescription: Swift.String? {
76
- get
77
- }
78
- }
79
- public enum PropagationProfile {
80
- case standard
81
- case highDensityNetwork
82
- case sparseNetwork
83
- case longReach
84
- case shortReach
85
- public static func == (a: BridgefySDK.PropagationProfile, b: BridgefySDK.PropagationProfile) -> Swift.Bool
86
- public func hash(into hasher: inout Swift.Hasher)
87
- public var hashValue: Swift.Int {
88
- get
89
- }
90
- }
91
- public enum TransmissionMode {
92
- case p2p(userId: Foundation.UUID)
93
- case mesh(userId: Foundation.UUID)
94
- case broadcast(senderId: Foundation.UUID)
95
- }
96
- public protocol BridgefyDelegate : AnyObject {
97
- func bridgefyDidStart(with userId: Foundation.UUID)
98
- func bridgefyDidFailToStart(with error: BridgefySDK.BridgefyError)
99
- func bridgefyDidStop()
100
- func bridgefyDidFailToStop(with error: BridgefySDK.BridgefyError)
101
- func bridgefyDidDestroySession()
102
- func bridgefyDidFailToDestroySession(with error: BridgefySDK.BridgefyError)
103
- func bridgefyDidConnect(with userId: Foundation.UUID)
104
- func bridgefyDidDisconnect(from userId: Foundation.UUID)
105
- func bridgefyDidEstablishSecureConnection(with userId: Foundation.UUID)
106
- func bridgefyDidFailToEstablishSecureConnection(with userId: Foundation.UUID, error: BridgefySDK.BridgefyError)
107
- func bridgefyDidSendMessage(with messageId: Foundation.UUID)
108
- func bridgefyDidFailSendingMessage(with messageId: Foundation.UUID, withError error: BridgefySDK.BridgefyError)
109
- func bridgefyDidReceiveData(_ data: Foundation.Data, with messageId: Foundation.UUID, using transmissionMode: BridgefySDK.TransmissionMode)
110
- }
111
- public struct BridgefyFingerprint {
112
- public let displayable: Swift.String
113
- public let scannable: Foundation.Data
114
- }
115
- extension BridgefySDK.PropagationProfile : Swift.Equatable {}
116
- extension BridgefySDK.PropagationProfile : Swift.Hashable {}
@@ -1,116 +0,0 @@
1
- // swift-interface-format-version: 1.0
2
- // swift-compiler-version: Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)
3
- // swift-module-flags: -target arm64-apple-ios13.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -enable-bare-slash-regex -module-name BridgefySDK
4
- // swift-module-flags-ignorable: -no-verify-emitted-module-interface
5
- @_exported import BridgefySDK
6
- import CommonCrypto
7
- import CoreBluetooth
8
- import CryptoKit
9
- import Foundation
10
- import Swift
11
- import UIKit
12
- import _Concurrency
13
- import _StringProcessing
14
- import _SwiftConcurrencyShims
15
- public class Bridgefy {
16
- public init(withApiKey apiKey: Swift.String, delegate: any BridgefySDK.BridgefyDelegate, verboseLogging: Swift.Bool = false) throws
17
- @objc deinit
18
- public func start(withUserId userId: Foundation.UUID? = nil, andPropagationProfile propagationProfile: BridgefySDK.PropagationProfile = .standard)
19
- public func stop()
20
- public func destroySession()
21
- public func send(_ data: Foundation.Data, using transmissionMode: BridgefySDK.TransmissionMode) throws -> Foundation.UUID
22
- public func establishSecureConnection(with userId: Foundation.UUID)
23
- public func fingerprint(for userId: Foundation.UUID) throws -> BridgefySDK.BridgefyFingerprint?
24
- public func isFingerprintValid(_ fingerprintData: Foundation.Data, for userId: Foundation.UUID) throws -> Swift.Bool
25
- public static var isInitialized: Swift.Bool {
26
- get
27
- }
28
- public static var isStarted: Swift.Bool {
29
- get
30
- }
31
- public var currentUserId: Foundation.UUID? {
32
- get
33
- }
34
- public var connectedPeers: [Foundation.UUID]? {
35
- get
36
- }
37
- public var licenseExpirationDate: Foundation.Date? {
38
- get
39
- }
40
- }
41
- public enum BridgefyError : Swift.Error {
42
- case simulatorIsNotSupported
43
- case inconsistentUserId
44
- case notStarted
45
- case alreadyInstantiated
46
- case startInProgress
47
- case alreadyStarted
48
- case stopInProgress
49
- case destroySessionInProgress
50
- case serviceNotStarted
51
- case invalidApiKey
52
- case missingBundleID
53
- case internetConnectionRequired
54
- case sessionError
55
- case expiredLicense
56
- case inconsistentDeviceTime
57
- case BLEUsageNotGranted
58
- case BLEUsageRestricted
59
- case BLEPoweredOff
60
- case BLEUnsupported
61
- case BLEUnknownError
62
- case inconsistentConnection
63
- case connectionIsAlreadySecure
64
- case cannotCreateSecureConnection
65
- case dataLengthExceeded
66
- case dataValueIsEmpty
67
- case peerIsNotConnected
68
- case internalError
69
- case licenseError(code: Swift.Int)
70
- case storageError(code: Swift.Int)
71
- case encodingError(code: Swift.Int)
72
- case encryptionError(code: Swift.Int)
73
- }
74
- extension BridgefySDK.BridgefyError : Foundation.LocalizedError {
75
- public var errorDescription: Swift.String? {
76
- get
77
- }
78
- }
79
- public enum PropagationProfile {
80
- case standard
81
- case highDensityNetwork
82
- case sparseNetwork
83
- case longReach
84
- case shortReach
85
- public static func == (a: BridgefySDK.PropagationProfile, b: BridgefySDK.PropagationProfile) -> Swift.Bool
86
- public func hash(into hasher: inout Swift.Hasher)
87
- public var hashValue: Swift.Int {
88
- get
89
- }
90
- }
91
- public enum TransmissionMode {
92
- case p2p(userId: Foundation.UUID)
93
- case mesh(userId: Foundation.UUID)
94
- case broadcast(senderId: Foundation.UUID)
95
- }
96
- public protocol BridgefyDelegate : AnyObject {
97
- func bridgefyDidStart(with userId: Foundation.UUID)
98
- func bridgefyDidFailToStart(with error: BridgefySDK.BridgefyError)
99
- func bridgefyDidStop()
100
- func bridgefyDidFailToStop(with error: BridgefySDK.BridgefyError)
101
- func bridgefyDidDestroySession()
102
- func bridgefyDidFailToDestroySession(with error: BridgefySDK.BridgefyError)
103
- func bridgefyDidConnect(with userId: Foundation.UUID)
104
- func bridgefyDidDisconnect(from userId: Foundation.UUID)
105
- func bridgefyDidEstablishSecureConnection(with userId: Foundation.UUID)
106
- func bridgefyDidFailToEstablishSecureConnection(with userId: Foundation.UUID, error: BridgefySDK.BridgefyError)
107
- func bridgefyDidSendMessage(with messageId: Foundation.UUID)
108
- func bridgefyDidFailSendingMessage(with messageId: Foundation.UUID, withError error: BridgefySDK.BridgefyError)
109
- func bridgefyDidReceiveData(_ data: Foundation.Data, with messageId: Foundation.UUID, using transmissionMode: BridgefySDK.TransmissionMode)
110
- }
111
- public struct BridgefyFingerprint {
112
- public let displayable: Swift.String
113
- public let scannable: Foundation.Data
114
- }
115
- extension BridgefySDK.PropagationProfile : Swift.Equatable {}
116
- extension BridgefySDK.PropagationProfile : Swift.Hashable {}