uidocumentpickervc

Why Photos app is NOT showing in the Document Provider extensions on the device?

这一生的挚爱 提交于 2019-12-22 10:26:35
问题 I'm working in app to pick photo, I have used UIDocumentMenuViewController to display list of extensions for document provider. This list shows Dropbox, iCloud, GoogleDrive but not the native Photos app, why? Sample of my code: UIDocumentMenuViewController *menuVC = [[UIDocumentMenuViewController alloc] initWithDocumentTypes:@[@"public.image"] inMode:UIDocumentPickerModeImport]; 回答1: I'm not sure if there is another way natively to do this, but I came up with a solution to add a custom option

Swift write/save/move a document file to iCloud drive

纵饮孤独 提交于 2019-12-17 17:58:13
问题 I've been trying for over two days to write a file to iCloud drive. I have tried writing a simple text file directly, locally then moving it, using UIDocumentMenuViewController, etc. I'm not getting any errors with my code and stepping through debugger, it looks successful, but when I check to see if the file exists or at least the iCloud directory, there is nothing there. I tried on both the simulator and my iPhone, triggering iCloud synching, and everything else I can think of. My main goal

UIDocumentPickerExtensionViewController validTypes is always nil

早过忘川 提交于 2019-12-12 02:59:10
问题 Currently I'm creating a 'Document Provider Extension' for my iOS app. I'm using the extension from inside my app, as well as from other apps to get access to some app internal files. When using it internally, I'm creating a 'UIDocumentPickerViewController' for example with the following code: UIDocumentPickerViewController* documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[@"public.image"] inMode:UIDocumentPickerModeImport]; The extension runs fine, with one

How to use Document Provider Extension?

十年热恋 提交于 2019-12-09 11:03:38
问题 I was learning a little more about ios extensions, such as: Today Extension Photo editing Extension Action Extension Custom keyboard Extension In all of them I did not have difficulties in learning, but recently I try to learn the "document provider extension", and to my surprise not found any relevant tutorial on the Internet talking about how to use it (step by step as the others). The only alternative I found was use the documentation, and I learned that he can access shared documents from

Why Photos app is NOT showing in the Document Provider extensions on the device?

两盒软妹~` 提交于 2019-12-05 21:27:59
I'm working in app to pick photo, I have used UIDocumentMenuViewController to display list of extensions for document provider. This list shows Dropbox, iCloud, GoogleDrive but not the native Photos app, why? Sample of my code: UIDocumentMenuViewController *menuVC = [[UIDocumentMenuViewController alloc] initWithDocumentTypes:@[@"public.image"] inMode:UIDocumentPickerModeImport]; I'm not sure if there is another way natively to do this, but I came up with a solution to add a custom option with handler. I added "Photos" option and in the handler I use UIImagePickerViewController :

Swift - Get file size from url

六眼飞鱼酱① 提交于 2019-12-04 16:59:53
问题 i am using documentPicker to get url path of any document and then uploaded to the database. I am choosing file (pdf, txt ..) , the upload is working but i want to limit the size of the file . public func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentAt url: URL) { self.file = url //url self.path = String(describing: self.file!) // url to string self.upload = true //set upload to true self.attachBtn.setImage(UIImage(named: "attachFilled"), for: .normal)//set

UIDocumentPickerViewController - How to set the navigation bar color

一笑奈何 提交于 2019-12-03 17:17:58
问题 I want to set the navigation bar background color of my DocumentPicker to be the same as the rest of my application. let filePicker = UIDocumentPickerViewController(documentTypes: ["public.content"], in: .import) filePicker.delegate = self filePicker.navigationController?.navigationBar.barTintColor = self.theme.navigationBarColor self.present(filePicker, animated: true, completion: nil) doesn't work. Other things I've tried: Use UINavigationBar.appearance().backgroundColor = self.theme

How to use Document Provider Extension?

二次信任 提交于 2019-12-03 13:18:04
I was learning a little more about ios extensions, such as: Today Extension Photo editing Extension Action Extension Custom keyboard Extension In all of them I did not have difficulties in learning, but recently I try to learn the "document provider extension", and to my surprise not found any relevant tutorial on the Internet talking about how to use it (step by step as the others). The only alternative I found was use the documentation, and I learned that he can access shared documents from other applications, and you can also share your own existing documents within your app. The only

How to initialise UIDocumentPickerViewController with all type of UTIs

拥有回忆 提交于 2019-12-03 09:05:01
问题 I want to open UIDocumentPickerViewController and It should allow user to select all type of files. I tried to mention all UTIs in UIDocumentPickerViewController init method still couldnt find valid UTIs for some of files like rar,Visio files,mpp,mpt UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:[MingleUtils allowedUTIs] inMode:UIDocumentPickerModeImport]; and +(NSArray*)allowedUTIs{ return @[@"public.data",@"public.content",@