From 3479fdf5b8f78813dc649eff23a63b07fc4dc37f Mon Sep 17 00:00:00 2001 From: Milos Vasic Date: Wed, 29 Sep 2021 15:31:23 +0300 Subject: [PATCH 1/9] FFM-1424 - Working on SSE support. --- .gitignore | 2 +- README.md | 9 +- android/.idea/gradle.xml | 3 +- android/.idea/jarRepositories.xml | 15 + android/.idea/modules.xml | 8 - android/build.gradle | 70 +++- .../com/clientsdk/ClientNativeModule.java | 152 +++++-- .../com/clientsdk/ClientNativePackage.java | 13 +- index.ts | 373 ++++++++++-------- ios/ReactNativePlugin.swift | 29 +- package.json | 2 +- 11 files changed, 420 insertions(+), 256 deletions(-) delete mode 100644 android/.idea/modules.xml diff --git a/.gitignore b/.gitignore index 94520e0..0965f31 100644 --- a/.gitignore +++ b/.gitignore @@ -319,4 +319,4 @@ Temporary Items .idea package-lock.json -.DS_Store +yarn.lock diff --git a/README.md b/README.md index b365716..eecf8b6 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,10 @@ To sign up, https://app.harness.io/auth/#/signup/ ## _Setup_ To install SDK, declare a dependency to project's `package.json` file: -```JSON -"ff-react-native-client-sdk": "1.0.0", ``` +"ff-react-native-client-sdk": "1.0.0" +``` + Or using npm install: ```shell $ npm install --save ff-react-native-client-sdk @@ -76,7 +77,7 @@ The Public API exposes a few methods that you can utilize: * `jsonVariation(evalutionId: string, defaultValue: any)` -* `registerEventsListener(listener: (type: string, flags: any) => void) ` +* `registerListener(listener: (type: string, flags: any) => void) ` * `unregisterListener(listener: (type: string, flags: any) => void)` @@ -116,7 +117,7 @@ let jsonEvaluation = await client.jsonVariation("demo_json_evaluation", {}); This method provides a way to register a listener for different events that might be triggered by SDK, indicating specific change in SDK itself. ```JavaScript - client.registerEventsListener((type, flags) => { + client.registerListener((type, flags) => { }); ``` diff --git a/android/.idea/gradle.xml b/android/.idea/gradle.xml index c2acdd9..a996a1b 100644 --- a/android/.idea/gradle.xml +++ b/android/.idea/gradle.xml @@ -4,7 +4,7 @@ diff --git a/android/.idea/jarRepositories.xml b/android/.idea/jarRepositories.xml index f822c49..b0230ae 100644 --- a/android/.idea/jarRepositories.xml +++ b/android/.idea/jarRepositories.xml @@ -51,5 +51,20 @@