Skip to content

Commit 318c115

Browse files
committed
React Native Event Source update
1 parent 99c4870 commit 318c115

File tree

21 files changed

+78
-46
lines changed

21 files changed

+78
-46
lines changed

examples/experimental/reactnative/.buckconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
index.js
22
[android]
33
target = Google Inc.:Google APIs:23
44

examples/experimental/reactnative/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default function () {
99
options={{
1010
api: 'https://edge.bullet-train-staging.win/api/v1/',
1111
environmentID: 'AbXqsQqLLAzmfj5SGCm8Ng',
12-
// enableLogs: true,
12+
enableLogs: true,
1313
realtime: true,
1414
}}
1515
flagsmith={flagsmith}>

examples/experimental/reactnative/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ target 'reactnative' do
1616
:path => config[:reactNativePath],
1717
# to enable hermes on iOS, change `false` to `true` and then install pods
1818
:production => production,
19-
:hermes_enabled => flags[:hermes_enabled],
19+
:hermes_enabled => true,
2020
:fabric_enabled => flags[:fabric_enabled],
2121
:flipper_configuration => FlipperConfiguration.enabled,
2222
# An absolute path to your application root.

examples/experimental/reactnative/ios/Podfile.lock

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ PODS:
7373
- FlipperKit/FlipperKitNetworkPlugin
7474
- fmt (6.2.1)
7575
- glog (0.3.5)
76+
- hermes-engine (0.69.4)
7677
- libevent (2.1.12)
7778
- OpenSSL-Universal (1.1.1100)
7879
- RCT-Folly (2021.06.28.00-v2):
@@ -86,6 +87,12 @@ PODS:
8687
- DoubleConversion
8788
- fmt (~> 6.2.1)
8889
- glog
90+
- RCT-Folly/Futures (2021.06.28.00-v2):
91+
- boost
92+
- DoubleConversion
93+
- fmt (~> 6.2.1)
94+
- glog
95+
- libevent
8996
- RCTRequired (0.69.4)
9097
- RCTTypeSafety (0.69.4):
9198
- FBLazyVector (= 0.69.4)
@@ -263,6 +270,17 @@ PODS:
263270
- React-logger (= 0.69.4)
264271
- React-perflogger (= 0.69.4)
265272
- React-runtimeexecutor (= 0.69.4)
273+
- React-hermes (0.69.4):
274+
- DoubleConversion
275+
- glog
276+
- hermes-engine
277+
- RCT-Folly (= 2021.06.28.00-v2)
278+
- RCT-Folly/Futures (= 2021.06.28.00-v2)
279+
- React-cxxreact (= 0.69.4)
280+
- React-jsi (= 0.69.4)
281+
- React-jsiexecutor (= 0.69.4)
282+
- React-jsinspector (= 0.69.4)
283+
- React-perflogger (= 0.69.4)
266284
- React-jsi (0.69.4):
267285
- boost (= 1.76.0)
268286
- DoubleConversion
@@ -384,6 +402,8 @@ DEPENDENCIES:
384402
- FlipperKit/FlipperKitUserDefaultsPlugin (= 0.125.0)
385403
- FlipperKit/SKIOSNetworkPlugin (= 0.125.0)
386404
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
405+
- hermes-engine (from `../node_modules/react-native/sdks/hermes/hermes-engine.podspec`)
406+
- libevent (~> 2.1.12)
387407
- OpenSSL-Universal (= 1.1.1100)
388408
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
389409
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
@@ -397,6 +417,7 @@ DEPENDENCIES:
397417
- React-Core/RCTWebSocket (from `../node_modules/react-native/`)
398418
- React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
399419
- React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
420+
- React-hermes (from `../node_modules/react-native/ReactCommon/hermes`)
400421
- React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
401422
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
402423
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
@@ -445,6 +466,8 @@ EXTERNAL SOURCES:
445466
:path: "../node_modules/react-native/React/FBReactNativeSpec"
446467
glog:
447468
:podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
469+
hermes-engine:
470+
:podspec: "../node_modules/react-native/sdks/hermes/hermes-engine.podspec"
448471
RCT-Folly:
449472
:podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec"
450473
RCTRequired:
@@ -465,6 +488,8 @@ EXTERNAL SOURCES:
465488
:path: "../node_modules/react-native/React/CoreModules"
466489
React-cxxreact:
467490
:path: "../node_modules/react-native/ReactCommon/cxxreact"
491+
React-hermes:
492+
:path: "../node_modules/react-native/ReactCommon/hermes"
468493
React-jsi:
469494
:path: "../node_modules/react-native/ReactCommon/jsi"
470495
React-jsiexecutor:
@@ -519,6 +544,7 @@ SPEC CHECKSUMS:
519544
FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86
520545
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
521546
glog: 3d02b25ca00c2d456734d0bcff864cbc62f6ae1a
547+
hermes-engine: 761a544537e62df2a37189389b9d2654dc1f75af
522548
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
523549
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
524550
RCT-Folly: b9d9fe1fc70114b751c076104e52f3b1b5e5a95a
@@ -531,6 +557,7 @@ SPEC CHECKSUMS:
531557
React-Core: 4d3443a45b67c71d74d7243ddde9569d1e4f4fad
532558
React-CoreModules: 70be25399366b5632ab18ecf6fe444a8165a7bea
533559
React-cxxreact: 822d3794fc0bf206f4691592f90e086dd4f92228
560+
React-hermes: 7f67b8363288258c3b0cd4aef5975cb7f0b9549a
534561
React-jsi: ffa51cbc9a78cc156cf61f79ed52ecb76dc6013b
535562
React-jsiexecutor: a27badbbdbc0ff781813370736a2d1c7261181d4
536563
React-jsinspector: 8a3d3f5dcd23a91e8c80b1bf0e96902cd1dca999
@@ -552,6 +579,6 @@ SPEC CHECKSUMS:
552579
Yoga: ff994563b2fd98c982ca58e8cd9db2cdaf4dda74
553580
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
554581

555-
PODFILE CHECKSUM: cccb7254351e48b2341392132cb3099beb5e38b2
582+
PODFILE CHECKSUM: 0de59b90ecbb25faadd1255a4f63392d30ebf460
556583

557-
COCOAPODS: 1.11.2
584+
COCOAPODS: 1.11.3

examples/experimental/reactnative/ios/reactnative.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@
562562
COPY_PHASE_STRIP = NO;
563563
ENABLE_STRICT_OBJC_MSGSEND = YES;
564564
ENABLE_TESTABILITY = YES;
565-
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
565+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
566566
GCC_C_LANGUAGE_STANDARD = gnu99;
567567
GCC_DYNAMIC_NO_PIC = NO;
568568
GCC_NO_COMMON_BLOCKS = YES;
@@ -634,7 +634,7 @@
634634
COPY_PHASE_STRIP = YES;
635635
ENABLE_NS_ASSERTIONS = NO;
636636
ENABLE_STRICT_OBJC_MSGSEND = YES;
637-
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "";
637+
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386;
638638
GCC_C_LANGUAGE_STANDARD = gnu99;
639639
GCC_NO_COMMON_BLOCKS = YES;
640640
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;

examples/experimental/reactnative/package-lock.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/experimental/reactnative/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
"dependencies": {
1313
"@react-native-async-storage/async-storage": "^1.17.0",
1414
"custom-event-polyfill": "^1.0.7",
15-
"flagsmith": "^3.8.0",
15+
"flagsmith": "^3.8.1-beta.3",
1616
"react": "18.0.0",
1717
"react-native": "0.69.4",
1818
"react-native-event-source": "^1.1.0",
19-
"react-native-flagsmith": "^3.8.0"
19+
"react-native-flagsmith": "^3.8.1-beta.3"
2020
},
2121
"devDependencies": {
2222
"@babel/core": "^7.12.9",

flagsmith-core.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,10 @@ const Flagsmith = class {
482482
resolve(true);
483483
}
484484
})
485-
.catch(error => onError && onError(error));
485+
.catch(error => {
486+
this.log("Error during initialisation ", error)
487+
onError && onError(error)
488+
});
486489
}
487490

488491
getAllFlags() {

flagsmith-es/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flagsmith-es/isomorphic.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)