Skip to content

Add FIID and new proto fields to Crashlytics - #10645

Merged
samedson merged 8 commits into
masterfrom
crashlytics-fiid
Jan 9, 2023
Merged

Add FIID and new proto fields to Crashlytics#10645
samedson merged 8 commits into
masterfrom
crashlytics-fiid

Conversation

@samedson

@samedson samedson commented Jan 5, 2023

Copy link
Copy Markdown
Contributor

As part of collaborating with the Sessions SDK, Crashlytics will need Firebase Install IDs for consistency. Crashlytics has its own Installation UUID but it does not align with the FIID.

@google-oss-bot

google-oss-bot commented Jan 5, 2023

Copy link
Copy Markdown
Collaborator

Size Report 1

Affected Products

  • FirebaseCrashlytics

    TypeBase (0b3bf61)Merge (c4b5852)Diff
    CocoaPods?-51.5 kB? (?)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/a8p4G4grc9.html

@samedson
samedson requested a review from themiswang January 5, 2023 19:37
@firebase firebase deleted a comment from google-oss-bot Jan 5, 2023
@samedson samedson added the sessions Changes pertaining to the Firebase Sessions SDK label Jan 5, 2023

@visumickey visumickey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good to me!

// so that the payload has an updated value.
[self.installIDModel regenerateInstallIDIfNeeded];
[self.installIDModel regenerateInstallIDIfNeededWithBlock:^(NSString *_Nonnull newFIID) {
self.fiid = [newFIID copy];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why explicitly copy when the property is already qualified as "Copy"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's kindof a funny thing, but the style guide suggests you copy strings when you don't know where they came from: https://google.github.io/styleguide/objcguide.html#setters-copy-nsstrings. The main thing is to avoid cases of it being mutable under the hood or having different retain semantics than what you expect.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. Surprisingly their example is a on an override setter method which makes it even more weird. Since there is no harm in re-copying, I'm fine with this change.

Comment thread Crashlytics/Crashlytics/Models/Record/FIRCLSReportAdapter.m
Comment thread Crashlytics/ProtoSupport/Protos/crashlytics.proto
Comment thread Crashlytics/Crashlytics/Models/FIRCLSInstallIdentifierModel.m
@samedson
samedson enabled auto-merge (squash) January 9, 2023 19:33
@samedson
samedson merged commit b53486a into master Jan 9, 2023
@samedson
samedson deleted the crashlytics-fiid branch January 9, 2023 19:40
@firebase firebase locked and limited conversation to collaborators Feb 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: crashlytics sessions Changes pertaining to the Firebase Sessions SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants