Add setDiskSpaceImplementation public API for developer-supplied disk space implementation #12339
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The intent behind this PR is to comply with Apple Privacy Manifests, while also giving developers the option to comply themselves and provide us the
statfs
function implementation.TODO
struct statfs
type, in addition to thestatfs
function, but nothing in their docs says they do. If that's the case, we can add more onus on the developer to implement a function that returns free and total disk space at the time of the crash.API
What's interesting about this API is it introduces a static method, and it must be called before FIRApp configure. I think we could make this more future-proof by making this category of APIs fall under a single method call. See the code comments for why this requirement exists.
Eg. we could call it
[Crashlytics setStartupDependencies:...]
, and it could take a dictionary or NSObject. One of the fields in this dictionary or NSObject could bestatfs
ordiskSpaceFunction
.