filestack / FSPicker

DEPRECATED
MIT License
10 stars 15 forks source link

Unable to present a UIAlertController on pickingDidError Delegate call back #31

Open ghost opened 7 years ago

ghost commented 7 years ago

File: FSPicker/FSPicker/Platforms/iOS/API/FSUploader.m (line 572)

when the file failed to upload, pickingDidError is called for uploadModalDelegate and for pickerDelegate at the same moment. it results that pickerDelegate can not present anything to the current viewController (ex: UIAlertController) because this view is already busy to present a view :

Warning: Attempt to present <UIAlertController: 0x168ec600> on <FSPickerController: 0x1715fc00> while a presentation is in progress!

Solution: pickerDelegate called after the the upload view is dismiss properly

We can make a pull request if needed

ghost commented 7 years ago

In general, fail to send is not handle properly in FSPicker. something should be displayed to tell the user why the upload didn't work.

would be smart to prevent any upload if the app is offline too