parse-community / Parse-SDK-iOS-OSX

The Apple SDK for Parse Platform (iOS, macOS, watchOS, tvOS)
https://parseplatform.org
Other
2.81k stars 871 forks source link

feat: Add SecureEncoder support to PFFileObject #1768

Open dhoerl opened 9 months ago

dhoerl commented 9 months ago

New Pull Request Checklist

Issue Description

PFFileObjects can be used outside of a PFObject subclass. When archiving them and other objects using the NSSecureEncoder, the encoder now fails with an error that PFFileObjects are not secure coding compliant.

Fine - in Objective-C, I create a class extension to add it. Works fine. However, when I go to change that extension to Swift, the compilation fails with the error that NSSecureCoding cannot be added in a class extension (but must be done by the original class).

Closes: #1736

Approach

Add NSSecureCoding to PFFileObject:

TODOs before merging

parse-github-assistant[bot] commented 9 months ago

Thanks for opening this pull request!

parse-github-assistant[bot] commented 9 months ago

I will reformat the title to use the proper commit message syntax.

mtrezza commented 6 months ago

Would you want to add a test so we can merge this?

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 0% with 15 lines in your changes are missing coverage. Please review.

Project coverage is 3.77%. Comparing base (dd05d41) to head (0d28a0f). Report is 3 commits behind head on master.

:exclamation: Current head 0d28a0f differs from pull request most recent head ea4346d. Consider uploading reports for the commit ea4346d to get more accurate results

Files Patch % Lines
Parse/Parse/Source/PFFileObject.m 0.00% 15 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1768 +/- ## ========================================== - Coverage 64.24% 3.77% -60.48% ========================================== Files 201 155 -46 Lines 23233 17952 -5281 ========================================== - Hits 14926 677 -14249 - Misses 8307 17275 +8968 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.