2015-06-14 9 views
6

Anytime importować dokument poprzez UIDocumentPickerViewController, widzę komunikat zalogowany do konsoli:dokument Importowanie z UIDocumentPickerViewController ostrzega „wtyczki fileprovider został unieważniony”

TestApp[66587:1550086] plugin com.apple.UIKit.fileprovider.default invalidated 

Czy to znaczy tam coś złego z mojego kodu? A może to tylko oczekiwane ostrzeżenie? Czy mimo to można to powstrzymać?


@IBAction func attachFile(sender: UIButton) { 
    let documentPicker = UIDocumentPickerViewController(documentTypes: ["public.image"], inMode: .Import) 
    documentPicker.delegate = self 
    self.presentViewController(documentPicker, animated: true, completion: nil) 
} 

func documentPicker(controller: UIDocumentPickerViewController, didPickDocumentAtURL url: NSURL) { 
} 
+1

Mam również ten sam problem. – Durgaprasad

+0

Jakiej wersji Xcode i Swift używasz? Czy masz te same ostrzeżenia z Xcode 7 i Swift 2.0? – Carl

Odpowiedz

0

Używam Xcode 8.3.2 i Swift 3.0 ... Tutaj jest mój kod ... to działa well..just zadzwonić openDocumentPicker() Mam nadzieję, że to pomaga

extension AddCaseStep3ViewController : UIDocumentMenuDelegate,UIDocumentPickerDelegate{ 
public func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentAt url: URL) { 
    let url = url as URL 

    //this is the url of your doc you can send enjoy!! 
} 

@available(iOS 8.0, *) 
public func documentMenu(_ documentMenu:  UIDocumentMenuViewController, didPickDocumentPicker documentPicker: UIDocumentPickerViewController) { 

    documentPicker.delegate = self 
    present(documentPicker, animated: true, completion: nil) 

} 

func documentPickerWasCancelled(_ controller: UIDocumentPickerViewController) { 
    //dismiss(animated: true, completion: nil) 
} 

func openDocumentPicker(){ 
    // 
    let documentPicker = UIDocumentPickerViewController(documentTypes: ["public.content","public.data","kUTTypePDF"], in: .import) 
    documentPicker.delegate = self 
    documentPicker.modalPresentationStyle = .formSheet 
    self.present(documentPicker, animated: true, completion: nil) 
}} 
Powiązane problemy