Skip to content

Conversation

@murki
Copy link
Contributor

@murki murki commented Jun 12, 2025

Allows for users to just call Logger.initFatalIssueReporting() with BuiltIn by default

@murki murki requested review from FranAguilera, Copilot and kattrali and removed request for FranAguilera June 12, 2025 14:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR sets the default crash reporting mechanism to built-in in both Swift and Kotlin APIs and adds documentation for the new parameter.

  • Swift’s initFatalIssueReporting now defaults to .builtIn instead of .customConfig.
  • Kotlin’s initFatalIssueReporting gains a KDoc entry for fatalIssueMechanism and defaults it to BuiltIn.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
platform/swift/source/Capture.swift Changed default IssueReporterType from .customConfig to .builtIn
platform/jvm/capture/src/main/kotlin/io/bitdrift/capture/Capture.kt Added KDoc for fatalIssueMechanism and gave it a BuiltIn default
Comments suppressed due to low confidence (4)

platform/swift/source/Capture.swift:100

  • [nitpick] The doc comment for the type parameter doesn’t mention that .builtIn is now the default; consider updating it to highlight the new default behavior.
public static func initFatalIssueReporting(_ type: IssueReporterType = .builtIn) {

platform/swift/source/Capture.swift:100

  • Add a unit test to verify that calling initFatalIssueReporting() without arguments initializes the built-in reporter correctly.
public static func initFatalIssueReporting(_ type: IssueReporterType = .builtIn) {

platform/jvm/capture/src/main/kotlin/io/bitdrift/capture/Capture.kt:105

  • [nitpick] Consider mentioning in the KDoc that fatalIssueMechanism defaults to BuiltIn when omitted, so users know they can call the method without parameters.
* @param fatalIssueMechanism the [FatalIssueMechanism] to use for crash detection

platform/jvm/capture/src/main/kotlin/io/bitdrift/capture/Capture.kt:115

  • Add a unit or instrumentation test to confirm that invoking initFatalIssueReporting() without specifying a mechanism uses the BuiltIn default.
fatalIssueMechanism: FatalIssueMechanism = FatalIssueMechanism.BuiltIn,

@murki murki enabled auto-merge (squash) June 12, 2025 14:55
@github-actions
Copy link

📦 APK Size Report

Metric Size (KB)
Baseline 3602
Current 3602
Difference 0

✅ APK size unchanged.

@github-actions
Copy link

📦 APK Size Report

Metric Size (KB)
Baseline 3602
Current 3602
Difference 0

✅ APK size unchanged.

@murki murki merged commit b909e59 into main Jun 12, 2025
14 checks passed
@murki murki deleted the murki/clean-up-init branch June 12, 2025 15:41
@github-actions github-actions bot locked and limited conversation to collaborators Jun 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants