Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue with UIDocumentInteractionController iOS11 beta 4

Tags:

ios11

I have a set of apps (e.g AppA and AppB). Lets say AppA programmatically sends a zip file to another app. On AppA UIDocumentInteractionController popover is displayed with Copy to AppB icon.

Once I choose AppB it sends the zip file to AppB. The file gets copied in required folder of tht AppB and the control navigates back to AppA.
So this functionality works perfectly fine on iOS 10.3.3.

However, on iOS 11 beta 2 and now on beta 4 too, this feature does not work. The document controller popover opens and then it says unable to load on the top. Even if I click the Copy to AppB icon to copy, it does not do anything. In previous versions I was not getting this Unable to load message on the UIDocumentInteractionController popover on top as highlighted in the image below

Doc controller image.

I have checked that the plist of both apps has the LSApplicationQueriesSchemes

Update 1:

While debugging all the delegate methods do get called viz., willBeginSendingToApplication and didEndSendingToApplication. When I sending this file to another application, I dismiss thedocContoller. So even the documentInteractionControllerDidDismissOpenInMenu also gets called.

So still the docController dismisses and activity indicator Sending load to application is displayed and remains there forever. The AppB is not launched.

New findings on iOS 11 beta 5

The Unable to Load message on the UIDocumentInteractionController is no more present. However, on click of the icon AppB the problem remains.

like image 844
Abhi Sadafale Avatar asked Aug 04 '17 08:08

Abhi Sadafale


1 Answers

I've seen this problem occur where the file to be copied is in the app bundle. With iOS 10 it worked just fine direct from the bundle.

In iOS 11 a file located in the app bundle will copy fine to Apple's own apps but not to third party apps. Copying the file from the bundle to the tmp folder, then using that file and everything works.

like image 114
David Knight Avatar answered Jan 02 '23 12:01

David Knight