We use fabrics and crashlytics on the macOS platform. Swift development language is used.
We added Fabric.with([Crashlytics.self])
to the applicationDidFinishLaunching
, but we found that it would upload the user's data by default.
We want to say that we give users a tick option to upload the log data we need when the user agrees, instead of always uploading it by default. Of course, when the user removes the tick option, it stops uploading relevant information.
In other words, how do we start and stop uploading the log information collected by app manually?
You are manually initializing crashlytics with Fabric.with([Crashlytics.self])
in AppDelegate.swift
You can actually have a check in place before the initialization, to it initializes only if the user checks the tick option.
#if user.tick
Fabric.with([Crashlytics.self])
#endif