Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FirebaseApp: send Core Diagnostics data on appDidBecomeActive #3437

Merged
merged 6 commits into from Jul 29, 2019

Conversation

@maksymmalyhin
Copy link
Contributor

commented Jul 25, 2019

It is needed to send reliable heartbeats even if an application is not relaunched for a long time.

@googlebot googlebot added the cla: yes label Jul 25, 2019

@maksymmalyhin maksymmalyhin requested review from paulb777 and mikehaney24 Jul 25, 2019

@@ -796,4 +806,31 @@ - (void)sendLogsWithServiceName:(NSString *)serviceName
}
#pragma clang diagnostic pop

#pragma mark - App Life Cycle

This comment has been minimized.

Copy link
@mikehaney24

mikehaney24 Jul 25, 2019

Collaborator

Just FYI, there is some lifecycle code in GDTLifecycle. I'm not sure if you want to adopt that protocol or not.

This comment has been minimized.

Copy link
@maksymmalyhin

maksymmalyhin Jul 26, 2019

Author Contributor

It will be nice to reuse it. Is GoogleDataTransport meant to be a required dependency for FirebaseCore?
cc @paulb777

This comment has been minimized.

Copy link
@mikehaney24

mikehaney24 Jul 26, 2019

Collaborator

GDT won't come in if FirebaseCoreDiagnostics isn't present, so I wouldn't add a hard dependency on it.


- (void)logDiagnostics {
if ([self isDataCollectionDefaultEnabled]) {
[FIRCoreDiagnosticsConnector logConfigureCoreWithOptions:_options];

This comment has been minimized.

Copy link
@mikehaney24

mikehaney24 Jul 25, 2019

Collaborator

Did you want to create a new logging method, or keep as-is?

This comment has been minimized.

Copy link
@maksymmalyhin

maksymmalyhin Jul 26, 2019

Author Contributor

I want to log the same data. Now I think, logConfigureCoreWithOptions can be renamed to something like logCoreDataWithOptions. WDYT?

*
* @param options The options object containing data to log.
*/
+ (void)logConfigureCoreWithOptions:(FIROptions *)options;
+ (void)logCoreDataWithOptions:(FIROptions *)options;

This comment has been minimized.

Copy link
@mikehaney24

mikehaney24 Jul 26, 2019

Collaborator

maybe logCoreTelemetry? CoreData has a pretty specific meaning in iOS.

This comment has been minimized.

Copy link
@maksymmalyhin

maksymmalyhin Jul 26, 2019

Author Contributor

yeah, logCoreTelemetry sounds better, thanks

@maksymmalyhin maksymmalyhin merged commit f2536cf into master Jul 29, 2019

2 checks passed

cla/google All necessary CLAs are signed
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@maksymmalyhin maksymmalyhin deleted the mm/core-heartbeat branch Jul 29, 2019

@wilhuff

This comment has been minimized.

Copy link
Member

commented Jul 29, 2019

FYI, this added a dependency from FirebaseCore to AppKit on macOS (for the symbol _NSApplicationDidBecomeActiveNotification).

This causes Firestore on macOS to fail to link with this error:

Undefined symbols for architecture x86_64:
  "_NSApplicationDidBecomeActiveNotification", referenced from:
      -[FIRApp subscribeForAppDidBecomeActiveNotifications] in FirebaseCore(FIRApp.m.o)

I think the fix is to add AppKit as a macOS dependency to the FirebaseCore pod. Does that seem right?

@wilhuff

This comment has been minimized.

Copy link
Member

commented Jul 29, 2019

Assuming the AppKit dependency is legitimate, #3459 is the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.