bridgefy-react-native 1.1.2 → 1.1.4

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/README.md CHANGED
@@ -59,10 +59,10 @@ const bridgefy = new Bridgefy();
59
59
  export default function App() {
60
60
  React.useEffect(() => {
61
61
  bridgefy
62
- .initialize(
63
- 'your-api-key-here', // UUID - The license key registered on the Bridgefy developer site.
64
- false, // The logging priority for SDK operations.
65
- )
62
+ .initialize({
63
+ apiKey: 'your-api-key-here', // UUID - The license key registered on the Bridgefy developer site.
64
+ verboseLogging: false, // The logging priority for SDK operations.
65
+ })
66
66
  .catch((error) => {
67
67
  console.error(error);
68
68
  });
@@ -8,7 +8,7 @@ buildscript {
8
8
  }
9
9
 
10
10
  dependencies {
11
- classpath "com.android.tools.build:gradle:8.1.1"
11
+ classpath "com.android.tools.build:gradle:8.5.0"
12
12
  // noinspection DifferentKotlinGradleVersion
13
13
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
14
14
  }
@@ -55,6 +55,15 @@ def getExtOrIntegerDefault(name) {
55
55
  android {
56
56
  compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
57
57
 
58
+ compileOptions {
59
+ sourceCompatibility JavaVersion.VERSION_17
60
+ targetCompatibility JavaVersion.VERSION_17
61
+ }
62
+
63
+ kotlinOptions {
64
+ jvmTarget = '17'
65
+ }
66
+
58
67
  defaultConfig {
59
68
  minSdkVersion getExtOrIntegerDefault("minSdkVersion")
60
69
  targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
@@ -69,12 +78,6 @@ android {
69
78
  lintOptions {
70
79
  disable "GradleCompatible"
71
80
  }
72
-
73
- compileOptions {
74
- sourceCompatibility JavaVersion.VERSION_1_8
75
- targetCompatibility JavaVersion.VERSION_1_8
76
- }
77
-
78
81
  }
79
82
 
80
83
  repositories {
@@ -85,7 +88,7 @@ repositories {
85
88
  def kotlin_version = getExtOrDefault("kotlinVersion")
86
89
 
87
90
  dependencies {
88
- implementation (group: "me.bridgefy", name: "android-sdk", version: "1.1.2", ext: "aar") {
91
+ implementation (group: "me.bridgefy", name: "android-sdk", version: "1.1.4", ext: "aar") {
89
92
  transitive = true
90
93
  }
91
94
  // For < 0.71, this will be from the local maven repo
@@ -1,4 +1,4 @@
1
- BridgefyReactNative_kotlinVersion=1.9.10
1
+ BridgefyReactNative_kotlinVersion=1.9.23
2
2
  BridgefyReactNative_minSdkVersion=21
3
3
  BridgefyReactNative_targetSdkVersion=34
4
4
  BridgefyReactNative_compileSdkVersion=34
@@ -0,0 +1,234 @@
1
+ #!/bin/sh
2
+
3
+ #
4
+ # Copyright © 2015-2021 the original authors.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ ##############################################################################
20
+ #
21
+ # Gradle start up script for POSIX generated by Gradle.
22
+ #
23
+ # Important for running:
24
+ #
25
+ # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
26
+ # noncompliant, but you have some other compliant shell such as ksh or
27
+ # bash, then to run this script, type that shell name before the whole
28
+ # command line, like:
29
+ #
30
+ # ksh Gradle
31
+ #
32
+ # Busybox and similar reduced shells will NOT work, because this script
33
+ # requires all of these POSIX shell features:
34
+ # * functions;
35
+ # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
36
+ # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
37
+ # * compound commands having a testable exit status, especially «case»;
38
+ # * various built-in commands including «command», «set», and «ulimit».
39
+ #
40
+ # Important for patching:
41
+ #
42
+ # (2) This script targets any POSIX shell, so it avoids extensions provided
43
+ # by Bash, Ksh, etc; in particular arrays are avoided.
44
+ #
45
+ # The "traditional" practice of packing multiple parameters into a
46
+ # space-separated string is a well documented source of bugs and security
47
+ # problems, so this is (mostly) avoided, by progressively accumulating
48
+ # options in "$@", and eventually passing that to Java.
49
+ #
50
+ # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
51
+ # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
52
+ # see the in-line comments for details.
53
+ #
54
+ # There are tweaks for specific operating systems such as AIX, CygWin,
55
+ # Darwin, MinGW, and NonStop.
56
+ #
57
+ # (3) This script is generated from the Groovy template
58
+ # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
59
+ # within the Gradle project.
60
+ #
61
+ # You can find Gradle at https://github.com/gradle/gradle/.
62
+ #
63
+ ##############################################################################
64
+
65
+ # Attempt to set APP_HOME
66
+
67
+ # Resolve links: $0 may be a link
68
+ app_path=$0
69
+
70
+ # Need this for daisy-chained symlinks.
71
+ while
72
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
73
+ [ -h "$app_path" ]
74
+ do
75
+ ls=$( ls -ld "$app_path" )
76
+ link=${ls#*' -> '}
77
+ case $link in #(
78
+ /*) app_path=$link ;; #(
79
+ *) app_path=$APP_HOME$link ;;
80
+ esac
81
+ done
82
+
83
+ APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84
+
85
+ APP_NAME="Gradle"
86
+ APP_BASE_NAME=${0##*/}
87
+
88
+ # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89
+ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
90
+
91
+ # Use the maximum available, or set MAX_FD != -1 to use that value.
92
+ MAX_FD=maximum
93
+
94
+ warn () {
95
+ echo "$*"
96
+ } >&2
97
+
98
+ die () {
99
+ echo
100
+ echo "$*"
101
+ echo
102
+ exit 1
103
+ } >&2
104
+
105
+ # OS specific support (must be 'true' or 'false').
106
+ cygwin=false
107
+ msys=false
108
+ darwin=false
109
+ nonstop=false
110
+ case "$( uname )" in #(
111
+ CYGWIN* ) cygwin=true ;; #(
112
+ Darwin* ) darwin=true ;; #(
113
+ MSYS* | MINGW* ) msys=true ;; #(
114
+ NONSTOP* ) nonstop=true ;;
115
+ esac
116
+
117
+ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
118
+
119
+
120
+ # Determine the Java command to use to start the JVM.
121
+ if [ -n "$JAVA_HOME" ] ; then
122
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
123
+ # IBM's JDK on AIX uses strange locations for the executables
124
+ JAVACMD=$JAVA_HOME/jre/sh/java
125
+ else
126
+ JAVACMD=$JAVA_HOME/bin/java
127
+ fi
128
+ if [ ! -x "$JAVACMD" ] ; then
129
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
130
+
131
+ Please set the JAVA_HOME variable in your environment to match the
132
+ location of your Java installation."
133
+ fi
134
+ else
135
+ JAVACMD=java
136
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137
+
138
+ Please set the JAVA_HOME variable in your environment to match the
139
+ location of your Java installation."
140
+ fi
141
+
142
+ # Increase the maximum file descriptors if we can.
143
+ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144
+ case $MAX_FD in #(
145
+ max*)
146
+ MAX_FD=$( ulimit -H -n ) ||
147
+ warn "Could not query maximum file descriptor limit"
148
+ esac
149
+ case $MAX_FD in #(
150
+ '' | soft) :;; #(
151
+ *)
152
+ ulimit -n "$MAX_FD" ||
153
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
154
+ esac
155
+ fi
156
+
157
+ # Collect all arguments for the java command, stacking in reverse order:
158
+ # * args from the command line
159
+ # * the main class name
160
+ # * -classpath
161
+ # * -D...appname settings
162
+ # * --module-path (only if needed)
163
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
164
+
165
+ # For Cygwin or MSYS, switch paths to Windows format before running java
166
+ if "$cygwin" || "$msys" ; then
167
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
168
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
169
+
170
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
171
+
172
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
173
+ for arg do
174
+ if
175
+ case $arg in #(
176
+ -*) false ;; # don't mess with options #(
177
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
178
+ [ -e "$t" ] ;; #(
179
+ *) false ;;
180
+ esac
181
+ then
182
+ arg=$( cygpath --path --ignore --mixed "$arg" )
183
+ fi
184
+ # Roll the args list around exactly as many times as the number of
185
+ # args, so each arg winds up back in the position where it started, but
186
+ # possibly modified.
187
+ #
188
+ # NB: a `for` loop captures its iteration list before it begins, so
189
+ # changing the positional parameters here affects neither the number of
190
+ # iterations, nor the values presented in `arg`.
191
+ shift # remove old arg
192
+ set -- "$@" "$arg" # push replacement arg
193
+ done
194
+ fi
195
+
196
+ # Collect all arguments for the java command;
197
+ # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198
+ # shell script including quotes and variable substitutions, so put them in
199
+ # double quotes to make sure that they get re-expanded; and
200
+ # * put everything else in single quotes, so that it's not re-expanded.
201
+
202
+ set -- \
203
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
204
+ -classpath "$CLASSPATH" \
205
+ org.gradle.wrapper.GradleWrapperMain \
206
+ "$@"
207
+
208
+ # Use "xargs" to parse quoted args.
209
+ #
210
+ # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
211
+ #
212
+ # In Bash we could simply go:
213
+ #
214
+ # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
215
+ # set -- "${ARGS[@]}" "$@"
216
+ #
217
+ # but POSIX shell has neither arrays nor command substitution, so instead we
218
+ # post-process each arg (as a line of input to sed) to backslash-escape any
219
+ # character that might be a shell metacharacter, then use eval to reverse
220
+ # that process (while maintaining the separation between arguments), and wrap
221
+ # the whole thing up as a single "set" statement.
222
+ #
223
+ # This will of course break if any of these variables contains a newline or
224
+ # an unmatched quote.
225
+ #
226
+
227
+ eval "set -- $(
228
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
229
+ xargs -n1 |
230
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
231
+ tr '\n' ' '
232
+ )" '"$@"'
233
+
234
+ exec "$JAVACMD" "$@"
@@ -0,0 +1,89 @@
1
+ @rem
2
+ @rem Copyright 2015 the original author or authors.
3
+ @rem
4
+ @rem Licensed under the Apache License, Version 2.0 (the "License");
5
+ @rem you may not use this file except in compliance with the License.
6
+ @rem You may obtain a copy of the License at
7
+ @rem
8
+ @rem https://www.apache.org/licenses/LICENSE-2.0
9
+ @rem
10
+ @rem Unless required by applicable law or agreed to in writing, software
11
+ @rem distributed under the License is distributed on an "AS IS" BASIS,
12
+ @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ @rem See the License for the specific language governing permissions and
14
+ @rem limitations under the License.
15
+ @rem
16
+
17
+ @if "%DEBUG%" == "" @echo off
18
+ @rem ##########################################################################
19
+ @rem
20
+ @rem Gradle startup script for Windows
21
+ @rem
22
+ @rem ##########################################################################
23
+
24
+ @rem Set local scope for the variables with windows NT shell
25
+ if "%OS%"=="Windows_NT" setlocal
26
+
27
+ set DIRNAME=%~dp0
28
+ if "%DIRNAME%" == "" set DIRNAME=.
29
+ set APP_BASE_NAME=%~n0
30
+ set APP_HOME=%DIRNAME%
31
+
32
+ @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33
+ for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34
+
35
+ @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36
+ set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37
+
38
+ @rem Find java.exe
39
+ if defined JAVA_HOME goto findJavaFromJavaHome
40
+
41
+ set JAVA_EXE=java.exe
42
+ %JAVA_EXE% -version >NUL 2>&1
43
+ if "%ERRORLEVEL%" == "0" goto execute
44
+
45
+ echo.
46
+ echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47
+ echo.
48
+ echo Please set the JAVA_HOME variable in your environment to match the
49
+ echo location of your Java installation.
50
+
51
+ goto fail
52
+
53
+ :findJavaFromJavaHome
54
+ set JAVA_HOME=%JAVA_HOME:"=%
55
+ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56
+
57
+ if exist "%JAVA_EXE%" goto execute
58
+
59
+ echo.
60
+ echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61
+ echo.
62
+ echo Please set the JAVA_HOME variable in your environment to match the
63
+ echo location of your Java installation.
64
+
65
+ goto fail
66
+
67
+ :execute
68
+ @rem Setup the command line
69
+
70
+ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71
+
72
+
73
+ @rem Execute Gradle
74
+ "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75
+
76
+ :end
77
+ @rem End local scope for the variables with windows NT shell
78
+ if "%ERRORLEVEL%"=="0" goto mainEnd
79
+
80
+ :fail
81
+ rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82
+ rem the _cmd.exe /c_ return code!
83
+ if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84
+ exit /b 1
85
+
86
+ :mainEnd
87
+ if "%OS%"=="Windows_NT" endlocal
88
+
89
+ :omega
@@ -0,0 +1,8 @@
1
+ ## This file must *NOT* be checked into Version Control Systems,
2
+ # as it contains information specific to your local configuration.
3
+ #
4
+ # Location of the SDK. This is only used by Gradle.
5
+ # For customization when using a Version Control System, please read the
6
+ # header note.
7
+ #Tue Nov 21 20:31:24 CST 2023
8
+ sdk.dir=/Users/bridgefy/Library/Android/sdk
@@ -2,7 +2,7 @@
2
2
  xmlns:tools="http://schemas.android.com/tools"
3
3
  package="me.bridgefy.plugin.react_native">
4
4
  <uses-permission-sdk-23 android:name="android.permission.ACCESS_COARSE_LOCATION" android:maxSdkVersion="30" tools:node="replace" />
5
- <uses-permission-sdk-23 android:name="android.permission.ACCESS_FINE_LOCATION" android:maxSdkVersion="33" tools:node="replace" />
5
+ <uses-permission-sdk-23 android:name="android.permission.ACCESS_FINE_LOCATION" tools:node="replace" />
6
6
  <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" android:maxSdkVersion="30" />
7
7
  <uses-permission android:name="android.permission.BLUETOOTH_SCAN" tools:node="replace" />
8
8
  <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
@@ -12,6 +12,7 @@ import com.facebook.react.bridge.WritableMap
12
12
  import com.facebook.react.modules.core.DeviceEventManagerModule
13
13
  import java.util.UUID
14
14
  import me.bridgefy.Bridgefy
15
+ import me.bridgefy.logger.enum.LogType
15
16
  import me.bridgefy.commons.TransmissionMode
16
17
  import me.bridgefy.commons.exception.BridgefyException
17
18
  import me.bridgefy.commons.listener.BridgefyDelegate
@@ -152,7 +153,7 @@ class BridgefyReactNativeModule(reactContext: ReactApplicationContext) :
152
153
  sendEvent(reactApplicationContext, "bridgefyDidStop", null)
153
154
  }
154
155
  },
155
- if (verboseLogging) Log.DEBUG else 1
156
+ if (verboseLogging) LogType.ConsoleLogger(Log.DEBUG) else LogType.None,
156
157
  )
157
158
  promise.resolve(null)
158
159
  } catch (error: BridgefyException) {
@@ -235,7 +236,7 @@ class BridgefyReactNativeModule(reactContext: ReactApplicationContext) :
235
236
  }
236
237
 
237
238
  @ReactMethod
238
- fun currentUserID(promise: Promise) {
239
+ fun currentUserId(promise: Promise) {
239
240
  assert(bridgefy.isInitialized) { "Bridgefy SDK isn't initialized" }
240
241
  assert(bridgefy.isStarted) { "Bridgefy SDK isn't started" }
241
242
  val userId = bridgefy.currentUserId().getOrThrow()
@@ -4,7 +4,7 @@
4
4
  @interface RCT_EXTERN_MODULE(BridgefyReactNative, RCTEventEmitter)
5
5
 
6
6
  RCT_EXTERN_METHOD(initialize:(NSString *)apiKey
7
- propagationProfile:(NSString *)propagationProfile
7
+ verboseLogging:(BOOL)verboseLogging
8
8
  resolve:(RCTPromiseResolveBlock)resolve
9
9
  reject:(RCTPromiseRejectBlock)reject)
10
10
 
@@ -11,7 +11,7 @@ class BridgefyReactNative: RCTEventEmitter, BridgefyDelegate {
11
11
  BridgefyReactNative.emitter = self
12
12
  }
13
13
 
14
- @objc(initialize:propagationProfile:resolve:reject:)
14
+ @objc(initialize:verboseLogging:resolve:reject:)
15
15
  func initialize(apiKey: String,
16
16
  verboseLogging: Bool,
17
17
  resolve: RCTPromiseResolveBlock,
@@ -64,14 +64,21 @@ class BridgefyReactNative: RCTEventEmitter, BridgefyDelegate {
64
64
 
65
65
  @objc(connectedPeers:reject:)
66
66
  func connectedPeers(resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void {
67
- resolve(["connectedPeers": bridgefy!.connectedPeers!.map({ uuid in
68
- uuid.uuidString
69
- })])
67
+ guard let connectedPeers = bridgefy?.connectedPeers else {
68
+ resolve(["connectedPeers": []])
69
+ return
70
+ }
71
+ let peerUUIDs = connectedPeers.compactMap { $0.uuidString }
72
+ resolve(["connectedPeers": peerUUIDs])
70
73
  }
71
74
 
72
75
  @objc(currentUserId:reject:)
73
76
  func currentUserId(resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void {
74
- resolve(["userId": bridgefy!.currentUserId!.uuidString])
77
+ if let currentUserId = bridgefy?.currentUserId?.uuidString {
78
+ resolve(["userId": currentUserId])
79
+ } else {
80
+ resolve(["userId": nil])
81
+ }
75
82
  }
76
83
 
77
84
  @objc(establishSecureConnection:resolve:reject:)
@@ -95,7 +102,7 @@ class BridgefyReactNative: RCTEventEmitter, BridgefyDelegate {
95
102
 
96
103
  @objc(destroySession:reject:)
97
104
  func destroySession(resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void {
98
- bridgefy!.destroySession()
105
+ bridgefy?.destroySession()
99
106
  resolve(nil)
100
107
  }
101
108
 
@@ -198,7 +205,7 @@ class BridgefyReactNative: RCTEventEmitter, BridgefyDelegate {
198
205
  let mode = transmissionModeDictionary(from: transmissionMode)
199
206
  BridgefyReactNative.emitter.sendEvent(withName: "bridgefyDidReceiveData",
200
207
  body: [
201
- "data": data,
208
+ "data": String(decoding: data, as: UTF8.self),
202
209
  "messageId": messageId.uuidString,
203
210
  "transmissionMode": mode
204
211
  ] as [String : Any])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bridgefy-react-native",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Bridgefy React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -85,7 +85,6 @@
85
85
  "engines": {
86
86
  "node": ">= 16.0.0"
87
87
  },
88
- "packageManager": "^yarn@1.22.15",
89
88
  "jest": {
90
89
  "preset": "react-native",
91
90
  "modulePathIgnorePatterns": [
package/src/index.tsx CHANGED
@@ -1,4 +1,5 @@
1
1
  import { NativeModules, Platform } from 'react-native';
2
+ import type { BridgefyService, IInitializeIn, IStartIn } from './infraestructure';
2
3
 
3
4
  const LINKING_ERROR =
4
5
  `The package 'bridgefy-react-native' doesn't seem to be linked. Make sure: \n\n` +
@@ -185,34 +186,33 @@ export enum BridgefyEvents {
185
186
  /**
186
187
  * Bridgefy
187
188
  */
188
- export class Bridgefy {
189
- /**
189
+ export class Bridgefy implements BridgefyService {
190
+ /**
190
191
  * Initialize the SDK
191
192
  * @param apiKey API key
192
193
  * @param verboseLogging The log level.
193
194
  */
194
- async initialize(
195
- apiKey: string,
196
- verboseLogging: boolean
197
- ): Promise<void> {
198
- return BridgefyReactNative.initialize(apiKey, verboseLogging);
195
+ async initialize({
196
+ apiKey,
197
+ verboseLogging = false,
198
+ }: IInitializeIn): Promise<void> {
199
+ await BridgefyReactNative.initialize(apiKey, verboseLogging);
199
200
  }
200
201
 
201
202
  /**
202
203
  * Start Bridgefy SDK operations
203
204
  */
204
- async start(
205
- userId?: string,
206
- propagationProfile: BridgefyPropagationProfile = BridgefyPropagationProfile.standard
207
- ): Promise<void> {
208
- return BridgefyReactNative.start(userId, propagationProfile);
205
+ async start(params?: IStartIn): Promise<void> {
206
+ const userId = params?.userId ?? null;
207
+ const propagationProfile = params?.propagationProfile ?? BridgefyPropagationProfile.standard;
208
+ return await BridgefyReactNative.start(userId, propagationProfile);
209
209
  }
210
210
 
211
211
  /**
212
212
  * Stop Bridgefy SDK operations
213
213
  */
214
214
  async stop(): Promise<void> {
215
- return BridgefyReactNative.stop();
215
+ return await BridgefyReactNative.stop();
216
216
  }
217
217
 
218
218
  /**
@@ -257,7 +257,7 @@ export class Bridgefy {
257
257
  * @returns User Id
258
258
  */
259
259
  async currentUserId(): Promise<string> {
260
- const result = BridgefyReactNative.currentUserId();
260
+ const result = await BridgefyReactNative.currentUserId();
261
261
  return result.userId;
262
262
  }
263
263
 
@@ -266,7 +266,7 @@ export class Bridgefy {
266
266
  * @returns List of connected peers
267
267
  */
268
268
  async connectedPeers(): Promise<string[]> {
269
- const result = BridgefyReactNative.connectedPeers();
269
+ const result = await BridgefyReactNative.connectedPeers();
270
270
  return result.connectedPeers;
271
271
  }
272
272
 
@@ -275,12 +275,12 @@ export class Bridgefy {
275
275
  * @returns Expiration date
276
276
  */
277
277
  async licenseExpirationDate(): Promise<Date> {
278
- const result = BridgefyReactNative.licenseExpirationDate();
279
- return new Date(result.licenseExpirationDate);
278
+ const result = await BridgefyReactNative.licenseExpirationDate();
279
+ return new Date(result.licenseExpirationDate as number);
280
280
  }
281
281
 
282
282
  async isInitialized(): Promise<boolean> {
283
- return BridgefyReactNative.isInitialized();
283
+ return await BridgefyReactNative.isInitialized();
284
284
  }
285
285
 
286
286
  async isStarted(): Promise<boolean> {
@@ -0,0 +1,2 @@
1
+ export * from './interfaces';
2
+ export * from './services';
@@ -0,0 +1,10 @@
1
+ import type { BridgefyPropagationProfile } from "../../index";
2
+
3
+ export interface IInitializeIn {
4
+ apiKey: string;
5
+ verboseLogging?: boolean;
6
+ }
7
+ export interface IStartIn {
8
+ userId?: string;
9
+ propagationProfile?: BridgefyPropagationProfile
10
+ }
@@ -0,0 +1 @@
1
+ export * from './ibridgefy';
@@ -0,0 +1,20 @@
1
+ import type { BridgefyTransmissionMode } from "bridgefy-react-native";
2
+ import type { IInitializeIn, IStartIn } from "../interfaces";
3
+
4
+ export interface BridgefyService {
5
+ initialize(params: IInitializeIn): Promise<void>;
6
+ start(params?: IStartIn): Promise<void>;
7
+ stop(): Promise<void>;
8
+ destroySession(): Promise<void>;
9
+ updateLicense(): Promise<void>;
10
+ send(
11
+ data: string,
12
+ transmissionMode: BridgefyTransmissionMode,
13
+ ): Promise<string>;
14
+ establishSecureConnection(userId: string): Promise<void>;
15
+ currentUserId(): Promise<string>;
16
+ connectedPeers(): Promise<string[]>;
17
+ licenseExpirationDate(): Promise<Date>;
18
+ isInitialized(): Promise<boolean>;
19
+ isStarted(): Promise<boolean>;
20
+ }
@@ -0,0 +1 @@
1
+ export * from './bridgefy_service';
@@ -1,196 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.BridgefyTransmissionModeType = exports.BridgefyPropagationProfile = exports.BridgefyEvents = exports.BridgefyErrorType = exports.Bridgefy = void 0;
7
- var _reactNative = require("react-native");
8
- const LINKING_ERROR = `The package 'bridgefy-react-native' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
9
- ios: "- You have run 'pod install'\n",
10
- default: ''
11
- }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
12
- const BridgefyReactNative = _reactNative.NativeModules.BridgefyReactNative ? _reactNative.NativeModules.BridgefyReactNative : new Proxy({}, {
13
- get() {
14
- throw new Error(LINKING_ERROR);
15
- }
16
- });
17
-
18
- /** Profile that defines a series of properties and rules for the propagation of messages. */
19
- let BridgefyPropagationProfile = /*#__PURE__*/function (BridgefyPropagationProfile) {
20
- BridgefyPropagationProfile["standard"] = "standard";
21
- BridgefyPropagationProfile["highDensityNetwork"] = "highDensityNetwork";
22
- BridgefyPropagationProfile["sparseNetwork"] = "sparseNetwork";
23
- BridgefyPropagationProfile["longReach"] = "longReach";
24
- BridgefyPropagationProfile["shortReach"] = "shortReach";
25
- return BridgefyPropagationProfile;
26
- }({});
27
- /** The mode used to propagate a message through nearby devices. */
28
- exports.BridgefyPropagationProfile = BridgefyPropagationProfile;
29
- let BridgefyTransmissionModeType = /*#__PURE__*/function (BridgefyTransmissionModeType) {
30
- BridgefyTransmissionModeType["p2p"] = "p2p";
31
- BridgefyTransmissionModeType["mesh"] = "mesh";
32
- BridgefyTransmissionModeType["broadcast"] = "broadcast";
33
- return BridgefyTransmissionModeType;
34
- }({});
35
- exports.BridgefyTransmissionModeType = BridgefyTransmissionModeType;
36
- /** Describes errors in the Bridgefy error domain. */
37
- let BridgefyErrorType = /*#__PURE__*/function (BridgefyErrorType) {
38
- BridgefyErrorType["simulatorIsNotSupported"] = "simulatorIsNotSupported";
39
- BridgefyErrorType["alreadyStarted"] = "alreadyStarted";
40
- BridgefyErrorType["invalidAPIKey"] = "invalidAPIKey";
41
- BridgefyErrorType["expiredLicense"] = "expiredLicense";
42
- BridgefyErrorType["sessionError"] = "sessionError";
43
- BridgefyErrorType["notStarted"] = "notStarted";
44
- BridgefyErrorType["alreadyInstantiated"] = "alreadyInstantiated";
45
- BridgefyErrorType["startInProgress"] = "startInProgress";
46
- BridgefyErrorType["serviceNotStarted"] = "serviceNotStarted";
47
- BridgefyErrorType["missingBundleID"] = "missingBundleID";
48
- BridgefyErrorType["internetConnectionRequired"] = "internetConnectionRequired";
49
- BridgefyErrorType["inconsistentDeviceTime"] = "inconsistentDeviceTime";
50
- BridgefyErrorType["BLEUsageNotGranted"] = "BLEUsageNotGranted";
51
- BridgefyErrorType["BLEUsageRestricted"] = "BLEUsageRestricted";
52
- BridgefyErrorType["BLEPoweredOff"] = "BLEPoweredOff";
53
- BridgefyErrorType["BLEUnsupported"] = "BLEUnsupported";
54
- BridgefyErrorType["BLEUnknownError"] = "BLEUnknownError";
55
- BridgefyErrorType["inconsistentConnection"] = "inconsistentConnection";
56
- BridgefyErrorType["connectionIsAlreadySecure"] = "connectionIsAlreadySecure";
57
- BridgefyErrorType["cannotCreateSecureConnection"] = "cannotCreateSecureConnection";
58
- BridgefyErrorType["dataLengthExceeded"] = "dataLengthExceeded";
59
- BridgefyErrorType["dataValueIsEmpty"] = "dataValueIsEmpty";
60
- BridgefyErrorType["peerIsNotConnected"] = "peerIsNotConnected";
61
- BridgefyErrorType["internalError"] = "internalError";
62
- BridgefyErrorType["licenseError"] = "licenseError";
63
- BridgefyErrorType["storageError"] = "storageError";
64
- BridgefyErrorType["encodingError"] = "encodingError";
65
- BridgefyErrorType["encryptionError"] = "encryptionError";
66
- BridgefyErrorType["missingApplicationId"] = "missingApplicationId";
67
- BridgefyErrorType["permissionException"] = "permissionException";
68
- BridgefyErrorType["registrationException"] = "registrationException";
69
- BridgefyErrorType["sizeLimitExceeded"] = "sizeLimitExceeded";
70
- BridgefyErrorType["deviceCapabilities"] = "deviceCapabilities";
71
- BridgefyErrorType["genericException"] = "genericException";
72
- BridgefyErrorType["inconsistentDeviceTimeException"] = "inconsistentDeviceTimeException";
73
- BridgefyErrorType["internetConnectionRequiredException"] = "internetConnectionRequiredException";
74
- BridgefyErrorType["unknownException"] = "unknownException";
75
- return BridgefyErrorType;
76
- }({});
77
- /**
78
- * These events are available via subscriptions to the `NativeEventEmitter` using the
79
- * `NativeModules.BridgefyReactNative` component. See README for further instructions.
80
- */
81
- exports.BridgefyErrorType = BridgefyErrorType;
82
- let BridgefyEvents = /*#__PURE__*/function (BridgefyEvents) {
83
- BridgefyEvents["bridgefyDidStart"] = "bridgefyDidStart";
84
- BridgefyEvents["bridgefyDidFailToStart"] = "bridgefyDidFailToStart";
85
- BridgefyEvents["bridgefyDidStop"] = "bridgefyDidStop";
86
- BridgefyEvents["bridgefyDidFailToStop"] = "bridgefyDidFailToStop";
87
- BridgefyEvents["bridgefyDidDestroySession"] = "bridgefyDidDestroySession";
88
- BridgefyEvents["bridgefyDidFailToDestroySession"] = "bridgefyDidFailToDestroySession";
89
- BridgefyEvents["bridgefyDidConnect"] = "bridgefyDidConnect";
90
- BridgefyEvents["bridgefyDidDisconnect"] = "bridgefyDidDisconnect";
91
- BridgefyEvents["bridgefyDidEstablishSecureConnection"] = "bridgefyDidEstablishSecureConnection";
92
- BridgefyEvents["bridgefyDidFailToEstablishSecureConnection"] = "bridgefyDidFailToEstablishSecureConnection";
93
- BridgefyEvents["bridgefyDidSendMessage"] = "bridgefyDidSendMessage";
94
- BridgefyEvents["bridgefyDidFailSendingMessage"] = "bridgefyDidFailSendingMessage";
95
- BridgefyEvents["bridgefyDidReceiveData"] = "bridgefyDidReceiveData";
96
- BridgefyEvents["bridgefyDidSendDataProgress"] = "bridgefyDidSendDataProgress";
97
- return BridgefyEvents;
98
- }({});
99
- /**
100
- * Bridgefy
101
- */
102
- exports.BridgefyEvents = BridgefyEvents;
103
- class Bridgefy {
104
- /**
105
- * Initialize the SDK
106
- * @param apiKey API key
107
- * @param verboseLogging The log level.
108
- */
109
- async initialize(apiKey, verboseLogging) {
110
- return BridgefyReactNative.initialize(apiKey, verboseLogging);
111
- }
112
-
113
- /**
114
- * Start Bridgefy SDK operations
115
- */
116
- async start(userId) {
117
- let propagationProfile = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : BridgefyPropagationProfile.standard;
118
- return BridgefyReactNative.start(userId, propagationProfile);
119
- }
120
-
121
- /**
122
- * Stop Bridgefy SDK operations
123
- */
124
- async stop() {
125
- return BridgefyReactNative.stop();
126
- }
127
-
128
- /**
129
- * Destroy current session
130
- */
131
- async destroySession() {
132
- return BridgefyReactNative.destroySession();
133
- }
134
-
135
- /**
136
- * Update license
137
- */
138
- async updateLicense() {
139
- return BridgefyReactNative.updateLicense();
140
- }
141
-
142
- /**
143
- * Function used to send data using a ``TransmissionMode``. This method returns a UUID to identify
144
- * the message sent.
145
- * @param data The message data
146
- * @param transmissionMode The mode used to propagate a message through nearby devices.
147
- * @returns The id of the message that was sent.
148
- */
149
- async send(data, transmissionMode) {
150
- const result = await BridgefyReactNative.send(data, transmissionMode);
151
- return result.messageId;
152
- }
153
-
154
- /**
155
- * Establishes a secure connection with the specified user
156
- * @param userId The UUID of the user with whom a secure connection should be established.
157
- */
158
- async establishSecureConnection(userId) {
159
- return BridgefyReactNative.establishSecureConnection(userId);
160
- }
161
-
162
- /**
163
- * Get current user Id
164
- * @returns User Id
165
- */
166
- async currentUserId() {
167
- const result = BridgefyReactNative.currentUserId();
168
- return result.userId;
169
- }
170
-
171
- /**
172
- * Returns connected peers
173
- * @returns List of connected peers
174
- */
175
- async connectedPeers() {
176
- const result = BridgefyReactNative.connectedPeers();
177
- return result.connectedPeers;
178
- }
179
-
180
- /**
181
- * Returns license expiration date
182
- * @returns Expiration date
183
- */
184
- async licenseExpirationDate() {
185
- const result = BridgefyReactNative.licenseExpirationDate();
186
- return new Date(result.licenseExpirationDate);
187
- }
188
- async isInitialized() {
189
- return BridgefyReactNative.isInitialized();
190
- }
191
- async isStarted() {
192
- return BridgefyReactNative.isStarted();
193
- }
194
- }
195
- exports.Bridgefy = Bridgefy;
196
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","LINKING_ERROR","Platform","select","ios","default","BridgefyReactNative","NativeModules","Proxy","get","Error","BridgefyPropagationProfile","exports","BridgefyTransmissionModeType","BridgefyErrorType","BridgefyEvents","Bridgefy","initialize","apiKey","verboseLogging","start","userId","propagationProfile","arguments","length","undefined","standard","stop","destroySession","updateLicense","send","data","transmissionMode","result","messageId","establishSecureConnection","currentUserId","connectedPeers","licenseExpirationDate","Date","isInitialized","isStarted"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,MAAMC,aAAa,GAChB,gFAA+E,GAChFC,qBAAQ,CAACC,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,mBAAmB,GAAGC,0BAAa,CAACD,mBAAmB,GACzDC,0BAAa,CAACD,mBAAmB,GACjC,IAAIE,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACT,aAAa,CAAC;EAChC;AACF,CACF,CAAC;;AAEL;AAAA,IACYU,0BAA0B,0BAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAAA,OAA1BA,0BAA0B;AAAA;AAQtC;AAAAC,OAAA,CAAAD,0BAAA,GAAAA,0BAAA;AAAA,IACYE,4BAA4B,0BAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAAA,OAA5BA,4BAA4B;AAAA;AAAAD,OAAA,CAAAC,4BAAA,GAAAA,4BAAA;AAcxC;AAAA,IACYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAj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AA,EAAqB;IAClC,OAAOnC,mBAAmB,CAACmC,SAAS,CAAC,CAAC;EACxC;AACF;AAAC7B,OAAA,CAAAI,QAAA,GAAAA,QAAA"}
@@ -1,188 +0,0 @@
1
- import { NativeModules, Platform } from 'react-native';
2
- const LINKING_ERROR = `The package 'bridgefy-react-native' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
3
- ios: "- You have run 'pod install'\n",
4
- default: ''
5
- }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
6
- const BridgefyReactNative = NativeModules.BridgefyReactNative ? NativeModules.BridgefyReactNative : new Proxy({}, {
7
- get() {
8
- throw new Error(LINKING_ERROR);
9
- }
10
- });
11
-
12
- /** Profile that defines a series of properties and rules for the propagation of messages. */
13
- export let BridgefyPropagationProfile = /*#__PURE__*/function (BridgefyPropagationProfile) {
14
- BridgefyPropagationProfile["standard"] = "standard";
15
- BridgefyPropagationProfile["highDensityNetwork"] = "highDensityNetwork";
16
- BridgefyPropagationProfile["sparseNetwork"] = "sparseNetwork";
17
- BridgefyPropagationProfile["longReach"] = "longReach";
18
- BridgefyPropagationProfile["shortReach"] = "shortReach";
19
- return BridgefyPropagationProfile;
20
- }({});
21
-
22
- /** The mode used to propagate a message through nearby devices. */
23
- export let BridgefyTransmissionModeType = /*#__PURE__*/function (BridgefyTransmissionModeType) {
24
- BridgefyTransmissionModeType["p2p"] = "p2p";
25
- BridgefyTransmissionModeType["mesh"] = "mesh";
26
- BridgefyTransmissionModeType["broadcast"] = "broadcast";
27
- return BridgefyTransmissionModeType;
28
- }({});
29
- /** Describes errors in the Bridgefy error domain. */
30
- export let BridgefyErrorType = /*#__PURE__*/function (BridgefyErrorType) {
31
- BridgefyErrorType["simulatorIsNotSupported"] = "simulatorIsNotSupported";
32
- BridgefyErrorType["alreadyStarted"] = "alreadyStarted";
33
- BridgefyErrorType["invalidAPIKey"] = "invalidAPIKey";
34
- BridgefyErrorType["expiredLicense"] = "expiredLicense";
35
- BridgefyErrorType["sessionError"] = "sessionError";
36
- BridgefyErrorType["notStarted"] = "notStarted";
37
- BridgefyErrorType["alreadyInstantiated"] = "alreadyInstantiated";
38
- BridgefyErrorType["startInProgress"] = "startInProgress";
39
- BridgefyErrorType["serviceNotStarted"] = "serviceNotStarted";
40
- BridgefyErrorType["missingBundleID"] = "missingBundleID";
41
- BridgefyErrorType["internetConnectionRequired"] = "internetConnectionRequired";
42
- BridgefyErrorType["inconsistentDeviceTime"] = "inconsistentDeviceTime";
43
- BridgefyErrorType["BLEUsageNotGranted"] = "BLEUsageNotGranted";
44
- BridgefyErrorType["BLEUsageRestricted"] = "BLEUsageRestricted";
45
- BridgefyErrorType["BLEPoweredOff"] = "BLEPoweredOff";
46
- BridgefyErrorType["BLEUnsupported"] = "BLEUnsupported";
47
- BridgefyErrorType["BLEUnknownError"] = "BLEUnknownError";
48
- BridgefyErrorType["inconsistentConnection"] = "inconsistentConnection";
49
- BridgefyErrorType["connectionIsAlreadySecure"] = "connectionIsAlreadySecure";
50
- BridgefyErrorType["cannotCreateSecureConnection"] = "cannotCreateSecureConnection";
51
- BridgefyErrorType["dataLengthExceeded"] = "dataLengthExceeded";
52
- BridgefyErrorType["dataValueIsEmpty"] = "dataValueIsEmpty";
53
- BridgefyErrorType["peerIsNotConnected"] = "peerIsNotConnected";
54
- BridgefyErrorType["internalError"] = "internalError";
55
- BridgefyErrorType["licenseError"] = "licenseError";
56
- BridgefyErrorType["storageError"] = "storageError";
57
- BridgefyErrorType["encodingError"] = "encodingError";
58
- BridgefyErrorType["encryptionError"] = "encryptionError";
59
- BridgefyErrorType["missingApplicationId"] = "missingApplicationId";
60
- BridgefyErrorType["permissionException"] = "permissionException";
61
- BridgefyErrorType["registrationException"] = "registrationException";
62
- BridgefyErrorType["sizeLimitExceeded"] = "sizeLimitExceeded";
63
- BridgefyErrorType["deviceCapabilities"] = "deviceCapabilities";
64
- BridgefyErrorType["genericException"] = "genericException";
65
- BridgefyErrorType["inconsistentDeviceTimeException"] = "inconsistentDeviceTimeException";
66
- BridgefyErrorType["internetConnectionRequiredException"] = "internetConnectionRequiredException";
67
- BridgefyErrorType["unknownException"] = "unknownException";
68
- return BridgefyErrorType;
69
- }({});
70
-
71
- /**
72
- * These events are available via subscriptions to the `NativeEventEmitter` using the
73
- * `NativeModules.BridgefyReactNative` component. See README for further instructions.
74
- */
75
- export let BridgefyEvents = /*#__PURE__*/function (BridgefyEvents) {
76
- BridgefyEvents["bridgefyDidStart"] = "bridgefyDidStart";
77
- BridgefyEvents["bridgefyDidFailToStart"] = "bridgefyDidFailToStart";
78
- BridgefyEvents["bridgefyDidStop"] = "bridgefyDidStop";
79
- BridgefyEvents["bridgefyDidFailToStop"] = "bridgefyDidFailToStop";
80
- BridgefyEvents["bridgefyDidDestroySession"] = "bridgefyDidDestroySession";
81
- BridgefyEvents["bridgefyDidFailToDestroySession"] = "bridgefyDidFailToDestroySession";
82
- BridgefyEvents["bridgefyDidConnect"] = "bridgefyDidConnect";
83
- BridgefyEvents["bridgefyDidDisconnect"] = "bridgefyDidDisconnect";
84
- BridgefyEvents["bridgefyDidEstablishSecureConnection"] = "bridgefyDidEstablishSecureConnection";
85
- BridgefyEvents["bridgefyDidFailToEstablishSecureConnection"] = "bridgefyDidFailToEstablishSecureConnection";
86
- BridgefyEvents["bridgefyDidSendMessage"] = "bridgefyDidSendMessage";
87
- BridgefyEvents["bridgefyDidFailSendingMessage"] = "bridgefyDidFailSendingMessage";
88
- BridgefyEvents["bridgefyDidReceiveData"] = "bridgefyDidReceiveData";
89
- BridgefyEvents["bridgefyDidSendDataProgress"] = "bridgefyDidSendDataProgress";
90
- return BridgefyEvents;
91
- }({});
92
-
93
- /**
94
- * Bridgefy
95
- */
96
- export class Bridgefy {
97
- /**
98
- * Initialize the SDK
99
- * @param apiKey API key
100
- * @param verboseLogging The log level.
101
- */
102
- async initialize(apiKey, verboseLogging) {
103
- return BridgefyReactNative.initialize(apiKey, verboseLogging);
104
- }
105
-
106
- /**
107
- * Start Bridgefy SDK operations
108
- */
109
- async start(userId) {
110
- let propagationProfile = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : BridgefyPropagationProfile.standard;
111
- return BridgefyReactNative.start(userId, propagationProfile);
112
- }
113
-
114
- /**
115
- * Stop Bridgefy SDK operations
116
- */
117
- async stop() {
118
- return BridgefyReactNative.stop();
119
- }
120
-
121
- /**
122
- * Destroy current session
123
- */
124
- async destroySession() {
125
- return BridgefyReactNative.destroySession();
126
- }
127
-
128
- /**
129
- * Update license
130
- */
131
- async updateLicense() {
132
- return BridgefyReactNative.updateLicense();
133
- }
134
-
135
- /**
136
- * Function used to send data using a ``TransmissionMode``. This method returns a UUID to identify
137
- * the message sent.
138
- * @param data The message data
139
- * @param transmissionMode The mode used to propagate a message through nearby devices.
140
- * @returns The id of the message that was sent.
141
- */
142
- async send(data, transmissionMode) {
143
- const result = await BridgefyReactNative.send(data, transmissionMode);
144
- return result.messageId;
145
- }
146
-
147
- /**
148
- * Establishes a secure connection with the specified user
149
- * @param userId The UUID of the user with whom a secure connection should be established.
150
- */
151
- async establishSecureConnection(userId) {
152
- return BridgefyReactNative.establishSecureConnection(userId);
153
- }
154
-
155
- /**
156
- * Get current user Id
157
- * @returns User Id
158
- */
159
- async currentUserId() {
160
- const result = BridgefyReactNative.currentUserId();
161
- return result.userId;
162
- }
163
-
164
- /**
165
- * Returns connected peers
166
- * @returns List of connected peers
167
- */
168
- async connectedPeers() {
169
- const result = BridgefyReactNative.connectedPeers();
170
- return result.connectedPeers;
171
- }
172
-
173
- /**
174
- * Returns license expiration date
175
- * @returns Expiration date
176
- */
177
- async licenseExpirationDate() {
178
- const result = BridgefyReactNative.licenseExpirationDate();
179
- return new Date(result.licenseExpirationDate);
180
- }
181
- async isInitialized() {
182
- return BridgefyReactNative.isInitialized();
183
- }
184
- async isStarted() {
185
- return BridgefyReactNative.isStarted();
186
- }
187
- }
188
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","BridgefyReactNative","Proxy","get","Error","BridgefyPropagationProfile","BridgefyTransmissionModeType","BridgefyErrorType","BridgefyEvents","Bridgefy","initialize","apiKey","verboseLogging","start","userId","propagationProfile","arguments","length","undefined","standard","stop","destroySession","updateLicense","send","data","transmissionMode","result","messageId","establishSecureConnection","currentUserId","connectedPeers","licenseExpirationDate","Date","isInitialized","isStarted"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAEtD,MAAMC,aAAa,GAChB,gFAA+E,GAChFD,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,mBAAmB,GAAGN,aAAa,CAACM,mBAAmB,GACzDN,aAAa,CAACM,mBAAmB,GACjC,IAAIC,KAAK,CACP,CAAC,CAAC,EACF;EACEC,GAAGA,CAAA,EAAG;IACJ,MAAM,IAAIC,KAAK,CAACP,aAAa,CAAC;EAChC;AACF,CACF,CAAC;;AAEL;AACA,WAAYQ,0BAA0B,0BAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAA1BA,0BAA0B;EAAA,OAA1BA,0BAA0B;AAAA;;AAQtC;AACA,WAAYC,4BAA4B,0BAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAA5BA,4BAA4B;EAAA,OAA5BA,4BAA4B;AAAA;AAcxC;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAA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CAACiC,SAAS,CAAC,CAAC;EACxC;AACF"}
@@ -1,218 +0,0 @@
1
- /** Profile that defines a series of properties and rules for the propagation of messages. */
2
- export declare enum BridgefyPropagationProfile {
3
- standard = "standard",
4
- highDensityNetwork = "highDensityNetwork",
5
- sparseNetwork = "sparseNetwork",
6
- longReach = "longReach",
7
- shortReach = "shortReach"
8
- }
9
- /** The mode used to propagate a message through nearby devices. */
10
- export declare enum BridgefyTransmissionModeType {
11
- /** Deliver a message to a specific recipient only if there's an active connection with it. */
12
- p2p = "p2p",
13
- /** Deliver a message to a specific recipient using nearby devices to propagate it. */
14
- mesh = "mesh",
15
- /** Propagate a message readable by every device that receives it. */
16
- broadcast = "broadcast"
17
- }
18
- export interface BridgefyTransmissionMode {
19
- type: BridgefyTransmissionModeType;
20
- uuid: string;
21
- }
22
- /** Describes errors in the Bridgefy error domain. */
23
- export declare enum BridgefyErrorType {
24
- /** The Bridgefy SDK cannot run in the simulator */
25
- simulatorIsNotSupported = "simulatorIsNotSupported",
26
- /** The Bridgefy SDK is already running */
27
- alreadyStarted = "alreadyStarted",
28
- /** The provided API key is not valid */
29
- invalidAPIKey = "invalidAPIKey",
30
- /** The license is expired */
31
- expiredLicense = "expiredLicense",
32
- /** An error occurred while creating the session */
33
- sessionError = "sessionError",
34
- /** (iOS) The Bridgefy SDK hasn't been started */
35
- notStarted = "notStarted",
36
- /** (iOS) A Bridgefy SDK instance already exists */
37
- alreadyInstantiated = "alreadyInstantiated",
38
- /** (iOS) The Bridgefy SDK is performing the start process */
39
- startInProgress = "startInProgress",
40
- /** (iOS) The Bridgefy SDK service is not started */
41
- serviceNotStarted = "serviceNotStarted",
42
- /** (iOS) Cannot get app's bundle id */
43
- missingBundleID = "missingBundleID",
44
- /** (iOS) An internet connection is required to validate the license */
45
- internetConnectionRequired = "internetConnectionRequired",
46
- /** (iOS) The device's time has been modified */
47
- inconsistentDeviceTime = "inconsistentDeviceTime",
48
- /** (iOS) The user does not allow the use of BLE */
49
- BLEUsageNotGranted = "BLEUsageNotGranted",
50
- /** (iOS) The use of BLE in this device is restricted */
51
- BLEUsageRestricted = "BLEUsageRestricted",
52
- /** (iOS) The BLE antenna has been turned off */
53
- BLEPoweredOff = "BLEPoweredOff",
54
- /** (iOS) The usage of BLE is not supported in the device */
55
- BLEUnsupported = "BLEUnsupported",
56
- /** (iOS) BLE usage failed with an unknown error */
57
- BLEUnknownError = "BLEUnknownError",
58
- /** (iOS) Inconsistent connection */
59
- inconsistentConnection = "inconsistentConnection",
60
- /** (iOS) Connection is already secure */
61
- connectionIsAlreadySecure = "connectionIsAlreadySecure",
62
- /** (iOS) Cannot create secure connection */
63
- cannotCreateSecureConnection = "cannotCreateSecureConnection",
64
- /** (iOS) The length of the data exceed the maximum limit */
65
- dataLengthExceeded = "dataLengthExceeded",
66
- /** (iOS) The data to send is empty */
67
- dataValueIsEmpty = "dataValueIsEmpty",
68
- /** (iOS) The requested peer is not connected */
69
- peerIsNotConnected = "peerIsNotConnected",
70
- /** (iOS) An internal error occurred */
71
- internalError = "internalError",
72
- /** (iOS) An error occurred while validating the license */
73
- licenseError = "licenseError",
74
- /** (iOS) An error occurred while storing data */
75
- storageError = "storageError",
76
- /** (iOS) An error occurred while encoding the message */
77
- encodingError = "encodingError",
78
- /** (iOS) An error occurred while encrypting the message */
79
- encryptionError = "encryptionError",
80
- /** (Android) Missing application ID */
81
- missingApplicationId = "missingApplicationId",
82
- /** (Android) Permission exception */
83
- permissionException = "permissionException",
84
- /** (Android) Registration exception */
85
- registrationException = "registrationException",
86
- /** (Android) Size limit exceeded */
87
- sizeLimitExceeded = "sizeLimitExceeded",
88
- /** (Android) Device capabilities error */
89
- deviceCapabilities = "deviceCapabilities",
90
- /** (Android) Generic exception */
91
- genericException = "genericException",
92
- /** (Android) Inconsistent device time */
93
- inconsistentDeviceTimeException = "inconsistentDeviceTimeException",
94
- /** (Android) Internet connection required */
95
- internetConnectionRequiredException = "internetConnectionRequiredException",
96
- /** (Android) Unknown exception */
97
- unknownException = "unknownException"
98
- }
99
- /**
100
- * These events are available via subscriptions to the `NativeEventEmitter` using the
101
- * `NativeModules.BridgefyReactNative` component. See README for further instructions.
102
- */
103
- export declare enum BridgefyEvents {
104
- /**
105
- * This function is called when the BridgefySDK has been started.
106
- */
107
- bridgefyDidStart = "bridgefyDidStart",
108
- /**
109
- * This function is called when an error occurred while starting the BridgefySDK.
110
- */
111
- bridgefyDidFailToStart = "bridgefyDidFailToStart",
112
- /**
113
- * This function is called when the BridgefySDK has been stopped.
114
- */
115
- bridgefyDidStop = "bridgefyDidStop",
116
- /**
117
- * This function is called when an error occurred while stopping the BridgefySDK.
118
- */
119
- bridgefyDidFailToStop = "bridgefyDidFailToStop",
120
- /**
121
- * The current session was destroyed
122
- */
123
- bridgefyDidDestroySession = "bridgefyDidDestroySession",
124
- /**
125
- * An error occurred while destroying the current session
126
- */
127
- bridgefyDidFailToDestroySession = "bridgefyDidFailToDestroySession",
128
- /**
129
- * This function is called to notify a new connection.
130
- */
131
- bridgefyDidConnect = "bridgefyDidConnect",
132
- /**
133
- * This function is called to notify a disconnection.
134
- */
135
- bridgefyDidDisconnect = "bridgefyDidDisconnect",
136
- /**
137
- * This function is called to notify when an on-demand secure connection was established.
138
- */
139
- bridgefyDidEstablishSecureConnection = "bridgefyDidEstablishSecureConnection",
140
- /**
141
- * This function is called to notify when an on-demand secure connection could not be established.
142
- */
143
- bridgefyDidFailToEstablishSecureConnection = "bridgefyDidFailToEstablishSecureConnection",
144
- /**
145
- * This function is called when you confirm the sending of the message
146
- */
147
- bridgefyDidSendMessage = "bridgefyDidSendMessage",
148
- /**
149
- * This function is called when the message could not be sent
150
- */
151
- bridgefyDidFailSendingMessage = "bridgefyDidFailSendingMessage",
152
- /**
153
- * This function is called when a new message is received
154
- */
155
- bridgefyDidReceiveData = "bridgefyDidReceiveData",
156
- /**
157
- * (Android) Called when there is progress while transmitting data.
158
- */
159
- bridgefyDidSendDataProgress = "bridgefyDidSendDataProgress"
160
- }
161
- /**
162
- * Bridgefy
163
- */
164
- export declare class Bridgefy {
165
- /**
166
- * Initialize the SDK
167
- * @param apiKey API key
168
- * @param verboseLogging The log level.
169
- */
170
- initialize(apiKey: string, verboseLogging: boolean): Promise<void>;
171
- /**
172
- * Start Bridgefy SDK operations
173
- */
174
- start(userId?: string, propagationProfile?: BridgefyPropagationProfile): Promise<void>;
175
- /**
176
- * Stop Bridgefy SDK operations
177
- */
178
- stop(): Promise<void>;
179
- /**
180
- * Destroy current session
181
- */
182
- destroySession(): Promise<void>;
183
- /**
184
- * Update license
185
- */
186
- updateLicense(): Promise<void>;
187
- /**
188
- * Function used to send data using a ``TransmissionMode``. This method returns a UUID to identify
189
- * the message sent.
190
- * @param data The message data
191
- * @param transmissionMode The mode used to propagate a message through nearby devices.
192
- * @returns The id of the message that was sent.
193
- */
194
- send(data: string, transmissionMode: BridgefyTransmissionMode): Promise<string>;
195
- /**
196
- * Establishes a secure connection with the specified user
197
- * @param userId The UUID of the user with whom a secure connection should be established.
198
- */
199
- establishSecureConnection(userId: string): Promise<void>;
200
- /**
201
- * Get current user Id
202
- * @returns User Id
203
- */
204
- currentUserId(): Promise<string>;
205
- /**
206
- * Returns connected peers
207
- * @returns List of connected peers
208
- */
209
- connectedPeers(): Promise<string[]>;
210
- /**
211
- * Returns license expiration date
212
- * @returns Expiration date
213
- */
214
- licenseExpirationDate(): Promise<Date>;
215
- isInitialized(): Promise<boolean>;
216
- isStarted(): Promise<boolean>;
217
- }
218
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAmBA,6FAA6F;AAC7F,oBAAY,0BAA0B;IACpC,QAAQ,aAAa;IACrB,kBAAkB,uBAAuB;IACzC,aAAa,kBAAkB;IAC/B,SAAS,cAAc;IACvB,UAAU,eAAe;CAC1B;AAED,mEAAmE;AACnE,oBAAY,4BAA4B;IACtC,8FAA8F;IAC9F,GAAG,QA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