Anand Kore
Anand Kore

Reputation: 1330

How can I enumerate files from Files app without using "UIDocumentPickerViewController"?

I want to access all files from "On my iPhone" tab from "Files App".

Currently, I'm using UIDocumentPickerViewController to select/pick files. I don't want to present any picker to get files same as we use [PHAsset fetchAssetsWithMediaType:options:] to get the photos from Photos App.

or can I use NSFileProviderManager to achieve this? Any idea??

Upvotes: 0

Views: 202

Answers (1)

Boris Ch.F
Boris Ch.F

Reputation: 156

By definition files from On My Phone tab are located outside your app sandbox and as far as i know you cannot go and walk outside your app sandbox (or app groups).

UIDocumentPickerViewController is a view controller that provides access to documents or destinations outside your app’s sandbox. Ok but thought their private APIs

maybe you´re missing something or you should rethink your app behaviour.

On the other hand PHAsset is a class that grant access to Photo Library that every app can access or modify but requires explicit authorization from the user.

So Apple is very clear in the ecosystem of apps, please refer to this page for more information.

Hope it help clarify your mind.

Upvotes: 2

Related Questions