You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -179,7 +179,7 @@ In version 2.x.x and later, when assign the timeout (> 0) to the `initializeApp`
179
179
180
180
The callback function assigned with `initializeApp` function will provide the auth process event, debug and error information while authenticating in async and sync modes.
181
181
182
-
In version 2.x.x, the `FirebaseApp` class can also maintain the async tasks that shored in other `AsyncClientClass`s.
182
+
In version 2.x.x, the `FirebaseApp` class can also maintain the async tasks that stored in other `AsyncClientClass`s.
183
183
184
184
The details for all classes used in this library are available. Click the following links for details.
185
185
@@ -693,7 +693,7 @@ Some options can be disabled.
693
693
694
694
-### Predefined Options
695
695
696
-
The predefined options that are already set in [**FirebaseConfig.h**](src/FirebaseConfig.h) are following.
696
+
The predefined options are defined as the following.
697
697
698
698
```cpp
699
699
ENABLE_DATABASE // For RTDB compilation
@@ -722,9 +722,16 @@ ENABLE_ETHERNET_NETWORK
722
722
ENABLE_GSM_NETWORK
723
723
```
724
724
725
+
In version 2.0.4 and newer, the config file `FirebaseCongig.h` and `UserConfig.h` are obsoleted and will not be used in this library.
726
+
727
+
Then in the version 2.0.4 and newer, to save program space by compiling only the options you used, define the following macro and followed by the options that you want to use before including the library header file `FirebaseClient.h`.
728
+
729
+
```cpp
730
+
ENABLE_USER_CONFIG
731
+
```
725
732
-### Optional Options
726
733
727
-
The following options are not yet defined in [**FirebaseConfig.h**](src/FirebaseConfig.h)and can be defined by user.
734
+
The following options are not yet pre-defined and can be defined by user (in your sketch with `ENABLE_USER_CONFIG`).
728
735
729
736
```cpp
730
737
FIREBASE_ETHERNET_MODULE_LIB `"EthernetLibrary.h"` // For the Ethernet library to work with external Ethernet module.
@@ -742,61 +749,6 @@ FIREBASE_PRINTF_PORT // For Firebase.printf debug port class object.
742
749
FIREBASE_PRINTF_BUFFER // Firebase.printf buffer size. The default printf buffer size is 1024 for ESP8266 and SAMD otherwise 4096. Some debug message may be truncated for larger text.
743
750
```
744
751
745
-
You can assign the optional build options using one of the following methods.
746
-
747
-
- By creating user config file `UserConfig.h` in library installed folder and define these optional options.
748
-
749
-
- By adding compiler build flags with `-D name`.
750
-
751
-
- By defined the macros before including the library main header file `FirebaseClient.h`.
752
-
753
-
In PlatformIO IDE, using `build_flags` in PlatformIO IDE's platformio.ini is more convenient
754
-
755
-
```ini
756
-
build_flags = -D DISABLE_STORAGE
757
-
-D FIREBASE_DISABLE_ONBOARD_WIFI
758
-
```
759
-
760
-
For external Ethernet module integation used with function `setEthernetClient`, both `FIREBASE_ETHERNET_MODULE_LIB` and `FIREBASE_ETHERNET_MODULE_CLASS` should be defined.
761
-
762
-
`FIREBASE_ETHERNET_MODULE_LIB` is the Ethernet library name with extension (.h) and should be inside `""` or `<>` e.g. `"Ethernet.h"`.
763
-
764
-
`FIREBASE_ETHERNET_MODULE_CLASS` is the name of static object defined from class e.g. `Ethernet`.
765
-
766
-
`FIREBASE_ETHERNET_MODULE_TIMEOUT` is the timeout in milliseconds to wait for network connection.
767
-
768
-
For disabling predefined options instead of editing the [**FirebaseConfig.h**](src/FirebaseConfig.h) or using `#undef` in `UserConfig.h`, you can define these build flags with these names or macros in `UserConfig.h`.
769
-
770
-
```cpp
771
-
DISABLE_DATABASE // For disabling RTDB support
772
-
DISABLE_FIRESTORE // For disabling Firestore support
773
-
DISABLE_FIRESTORE_QUERY // For Firestore Query feature compilation
774
-
DISABLE_MESSAGING // For disabling Firebase Cloud Messaging support
775
-
DISABLE_STORAGE // For disabling Firebase Storage support
776
-
DISABLE_CLOUD_STORAGE // For disabling Google Cloud Storage support
777
-
DISABLE_FUNCTIONS // For disabling Google Cloud Functions support
778
-
DISABLE_RULESETS // For disabling RuleSets support
779
-
DISABLE_PSRAM // For disabling PSRAM support
780
-
DISABLE_OTA // For disabling OTA updates support
781
-
DISABLE_FS // For disabling filesystem support
782
-
783
-
// For disabling authentication and token
784
-
DISABLE_SERVICE_AUTH
785
-
DISABLE_CUSTOM_AUTH
786
-
DISABLE_USER_AUTH
787
-
DISABLE_ACCESS_TOKEN
788
-
DISABLE_CUSTOM_TOKEN
789
-
DISABLE_ID_TOKEN
790
-
DISABLE_LEGACY_TOKEN
791
-
792
-
FIREBASE_DISABLE_ALL_OPTIONS // For disabling all predefined build options above
793
-
```
794
-
795
-
> [!NOTE]
796
-
> `UserConfig.h` for user config should be placed in the library installed folder inside the `src` folder.
797
-
798
-
This `UserConfig.h` will not change or overwrite when update the library.
799
-
800
752
The library code size is varied from 80k - 110k (WiFi and WiFiClientSecure excluded) depends on the build options.
801
753
802
754
The code size is 170k lesser than ancestor Firebase libraries when perform the same task.
0 commit comments