-
Notifications
You must be signed in to change notification settings - Fork 292
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
Create DiagnosticsTracker
#3784
Create DiagnosticsTracker
#3784
Conversation
c2efe3e
to
46d6d84
Compare
46d6d84
to
b718aba
Compare
a2c959a
to
a6746f0
Compare
} | ||
|
||
func track(_ event: DiagnosticsEvent) async { | ||
await diagnosticsFileHandler.appendEvent(diagnosticsEvent: event) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I know DiagnosticsFileHandler
is an actor
, but I think we still need to specify the thread here? We can do this in a separate PR though.
/// Defaults to ``false`` | ||
/// | ||
@available(iOS 15.0, tvOS 15.0, macOS 12.0, watchOS 8.0, *) | ||
@objc internal func with(diagnosticsEnabled: Bool) -> Builder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added new method as internal
for now.
self.diagnosticsFileHandler = diagnosticsFileHandler | ||
} | ||
|
||
func track(_ event: DiagnosticsEvent) async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also add some tests here, just in case. Will do that in follow-up PRs. Nvm, I see we already have tests in the followup PR
**This is an automatic release.** ### New Features * Paywalls: Allow closed button color to be configured (#3805) via Josh Holtz (@joshdholtz) ### Other Changes * Create `DiagnosticsTracker` (#3784) via Cesar de la Vega (@vegaro) * Add DiagnosticsSynchronizer (#3787) via Cesar de la Vega (@vegaro) * Update Package.resolved (#3796) via Cesar de la Vega (@vegaro) --------- Co-authored-by: Toni Rico <antonio.rico.diez@revenuecat.com>
Create
DiagnosticsTracker
and adds it to thePurchases
initialization. I don't expose thediagnosticsEnabled
yet