Re: UIDocumentBrowserViewController and file package documents
Re: UIDocumentBrowserViewController and file package documents
- Subject: Re: UIDocumentBrowserViewController and file package documents
- From: Jonathan Hull <email@hidden>
- Date: Wed, 21 Jun 2017 14:08:12 -0700
That part is really confusing me as well (I am also using a package document).
I started by using the documents directory, but I keep getting an error that
the browser doesn’t have access. Then I switched to the temp directory, and
now it works part of the time, and the other times I still get the same error.
Where are we supposed to create our package? Does the browser copy it to a
specific place? or do we need to copy it?
Here is the error:
[ERROR] Could not get attribute values for item file:<File Path Here>. Error:
Error Domain=NSFileProviderInternalErrorDomain Code=1 "The reader is not
permitted to access the URL."
Thanks,
Jon
> On Jun 21, 2017, at 5:41 AM, email@hidden wrote:
>
>>
>> On Jun 20, 2017, at 5:29 PM, Kyle Sluder <email@hidden> wrote:
>>
>> On Tue, Jun 20, 2017, at 03:40 PM, email@hidden wrote:
>>> I'm trying out the new UIDocumentBrowserViewController in iOS 11 (using
>>> the iPad simulator). I can get it to create a new document (which is a
>>> file package) for my app, but tapping on the document in the
>>> UIDocumentBrowserViewController does not cause the delegate method
>>> documentBrowser(_ controller: UIDocumentBrowserViewController,
>>> didPickDocumentURLs documentURLs: [URL]) to get called.
>>>
>>> It does get called for another document type that is a flat file (not a
>>> file package), but it doesn't work with the file package document created
>>> by NSFileWrapper.
>>>
>>> Am I doing something wrong or is this a bug with file packages?
>>
>> Please file a bug report and send me the number so I can ensure the
>> correct team sees it.
>>
>> Thanks,
>> --Kyle
>>
>>>
>>> Thanks,
>>> Dave
>
> I have one more idea to try and then if that doesn't work, I'll try to make a
> small sample project today and submit the bug report (and I'll email you the
> #).
>
> The one thing I'm not certain about is the WWDC video shows making an empty
> file and adding it to the project as a resource and then copying it when the
> new document button is pressed. Do I just need to make an empty directory for
> that? My idea was to create an empty document with my app (in the simulator)
> and then copy that empty document directory to the Xcode project. Are there
> any special flags/attributes that need to be set on that directory to make it
> a correct package?
>
> Thanks,
> Dave Reed
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden