parse-community / Parse-Swift

The Swift SDK for Parse Platform (iOS, macOS, watchOS, tvOS, Linux, Android, Windows)
https://parseplatform.org
MIT License
307 stars 69 forks source link

Saving a Object with an Array of Files holds UI thread #229

Closed dblythy closed 3 years ago

dblythy commented 3 years ago

New Issue Checklist

Issue Description

Saving an object with an array of PFFiles halts UI.

Steps to reproduce

  1. Create a struct with [ParseFile]
  2. Create a new object and set files
  3. Calling object.save will hold the main thread

Here is my code:

        event.images = images
        Utils.loading(message: "Saving event")
        event.save { result in
            switch result {
            case .success(_):
                Utils.done()
            case .failure(let error):
                Utils.error(error: error)
            }
        }

https://user-images.githubusercontent.com/4974769/132307398-37f71f26-d457-45fe-9439-53516befb24e.mov

Actual Outcome

UI thread is held

Expected Outcome

UI not to hold.

Environment

Client

Server

Database

Logs

parse-github-assistant[bot] commented 3 years ago

Thanks for opening this issue!

cbaker6 commented 3 years ago

Tested the patch in Swift playgrounds and it seems to be fixed. If the issue still persists, feel free to reopen.

dblythy commented 3 years ago

Thank you for addressing this quickly @cbaker6! I'll check it out tomorrow. Much appreciated!