WeTransfer / Diagnostics

Allow users to easily share Diagnostics with your support team to improve the flow of fixing bugs.
MIT License
933 stars 53 forks source link

Use latest write APIs to prevent a crash when storage is full. #87

Closed AvdLee closed 2 years ago

AvdLee commented 2 years ago

We used to use the write(_:) method which has the following documentation:

This method raises an exception if the file descriptor is closed or is not valid, if the receiver represents an unconnected pipe or socket endpoint, if no free space is left on the file system, or if any other writing error occurs.

This resulted in several crashes for users which storage was full. With this PR, we fix the crash for users on iOS 13.4 and up which seems good enough for now.

wetransferplatform commented 2 years ago
Warnings
:warning: **Sources/DiagnosticsLogger.swift#L143** - It is safer to use weak instead of unowned
:warning: **Sources/DiagnosticsLogger.swift#L186** - It is safer to use weak instead of unowned
Messages
:book: View more details on Bitrise
:book: Diagnostics: Executed 19 tests, with 0 failures (0 unexpected) in 0.310 (0.629) seconds

Diagnostics.framework: Coverage: 77.11

File Coverage
DiagnosticsLogger.swift 62.25%

Generated by :no_entry_sign: Danger Swift against 1baffc901c8d36288108ba93b23c91977cebcec2

wetransferplatform commented 2 years ago

Congratulations! :tada: This was released as part of Release 1.9.1 :rocket:

Generated by GitBuddy