-
Notifications
You must be signed in to change notification settings - Fork 712
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
Discussion on Implementing Opt-Out Mechanism for NSFileSystemSize
#491
Comments
@naftaly, from your perspective, does it worth it? |
I see two distinct things here. 1- Splitting the disk info monitor out so it can be opt in/out by users of KSCrash. For #1, I think your options enumerated above seem fine. Or maybe we can add a “privacy manifest” group of monitors. KSCrash isn’t a UI package so adding UI isn’t really an option. In any case, that’s up to the user of the SDK and I don’t think we want to get involved in all the tasks adding UI creates. #2. I’m not sure if we currently use the data in any way other than extra data in the crash reports. One thing that’s interesting is that having this extra data, even if it’s on device only is super helpful. It can help in understanding terminations. For example, on startup, just like when we look for an OOM, we can also add more heuristics and look at the disk space left from the previous sessions. If it’s somewhere in the <= 150MB range, we can expect the app likely was terminated due to lacking disk space to run. So, what I’d do. Add a monitor for disk related data. Add that monitor to a privacy manifest monitor group and document why it’s there. At that point we’ve done our due diligence and compiled with Apple rules, it’ll now be up to SDK users to make their apps comply. I think it’s worth it. |
I think we should go with option 2. More specifically, I think we should expose the moniotr API as part of KSCrash public API. This way we can allow users writing custom crash report enrichment plugins which I think good thing to have in general. And in the context of this task, an additional product(SPM) / subspec(CocoaPods) can be created that will have its own privacy manifest and this extra monitor. And it will be up to a developer to include this library to the app to opt-in to the disk space monitoring. I think implementing opt-out in this case might be really tricky as we don't want this API to be compiled into the app binary and not just "unused". So I would rather go with the opt-in way. I know that such refactoruing might not be that easy, but I believe that it should make the lib API even more clean. |
Maybe we should move this "public" monitor API to a "private" module, like |
Having this in the "extended" API like |
We also have a "tricky" bootTime API. |
We have 2 now: disk space and boot time, right? Let's have 2 monitors in 2 separate modules. I don't think there's going to be too many of such privacy-sensitive monitors and we can easily maintain 2-3 extra modules like this.
Ideally no. We might have a special case for supporting these 2 new monitors in the monitor types and log an error/warning if the implementation is not "registered" (e.g. in |
Less related to this discussion, but maybe we can consider simplifying the startup for the user while whe’re at it. I’ve found it a bit confusing in what order things need to be called. I’d like to see a config object, and then we simply pass that to install.
|
In reference to PR #457, where we addressed the declaration requirement for
NSFileSystemSize
asNSPrivacyAccessedAPICategoryDiskSpace
, it falls under 7D9E.1 as we send this information off the device in crash reports. Apple mandates that this part of the crash report should be optional and requires user approval for the usage of disk space information.To comply with Apple's guidelines and avoid potential issues, we should consider implementing an opt-out mechanism for it. However, enforcing an opt-in UI for crash reporting might not be the best approach for our library users. Therefore, creating a module seems more appropriate.
Proposed Solutions
+load
or__attribute__((constructor))
to automatically inject a "monitor" that supplements crash reports with disk size information.NSFileSystemSize
code. It may not be crucial enough to justify the effort required to implement these systems.The text was updated successfully, but these errors were encountered: