|
42 | 42 | #include "app/src/include/firebase/app.h"
|
43 | 43 | #include "app/src/callback.h"
|
44 | 44 | #include "app/src/include/firebase/internal/mutex.h"
|
| 45 | +#include "app/src/include/firebase/internal/platform.h" |
45 | 46 | #include "app/src/app_common.h"
|
46 | 47 | #include "app/src/log.h"
|
47 | 48 | #include "app/src/util.h"
|
@@ -906,6 +907,8 @@ static firebase::AppOptions* AppOptionsLoadFromJsonConfig(const char* config) {
|
906 | 907 | // fire-(unity|mono)/<github-action-built|custom_built>
|
907 | 908 | RegisterLibraryInternal(
|
908 | 909 | libraryPrefix + "-buildsrc", Firebase.VersionInfo.BuildSource);
|
| 910 | + // Log a heartbeat after all Unity user agents have been registered. |
| 911 | + LogHeartbeatInternal(newProxy); |
909 | 912 | }
|
910 | 913 | // Cache the name so that it can be accessed after the app is disposed.
|
911 | 914 | newProxy.name = newProxy.NameInternal;
|
@@ -1313,6 +1316,15 @@ namespace callback {
|
1313 | 1316 | firebase::App::RegisterLibrary(library, version);
|
1314 | 1317 | }
|
1315 | 1318 |
|
| 1319 | + %csmethodmodifiers LogHeartbeatInternal(App* app) "internal"; |
| 1320 | + static void LogHeartbeatInternal(App* app) { |
| 1321 | +#if FIREBASE_PLATFORM_DESKTOP |
| 1322 | + // Only need to call LogHeartbeat on desktop, since native mobile SDKs |
| 1323 | + // Will handle heartbeat logging internally. |
| 1324 | + app->LogHeartbeat(); |
| 1325 | +#endif // FIREBASE_PLATFORM_DESKTOP |
| 1326 | + } |
| 1327 | + |
1316 | 1328 | %csmethodmodifiers AppSetDefaultConfigPath(const char* path) "internal";
|
1317 | 1329 | static void AppSetDefaultConfigPath(const char* path) {
|
1318 | 1330 | firebase::App::SetDefaultConfigPath(path);
|
|
0 commit comments