1

I have a problem regarding the plugin configuration.I searched but found no answers anywhere. Here is my code

import UIKit
import MobileCoreServices
class ViewController: UIViewController, UIDocumentPickerDelegate,UITextViewDelegate {

@IBOutlet weak var webView: UIWebView!
@IBOutlet weak var emailButton: UIButton!
 @IBOutlet weak var UITextField: UITextView!
override func viewDidLoad() {

    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.

}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.

}

@IBAction func handleImportPickerPressed(sender: AnyObject) {

    let documentPicker = UIDocumentPickerViewController(documentTypes:["public.data", "public.text"],inMode:  UIDocumentPickerMode.Import)
    documentPicker.delegate = self
    documentPicker.modalPresentationStyle = UIModalPresentationStyle.FormSheet
    presentViewController(documentPicker, animated: true, completion: nil)
}

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

  print(url)
    if controller.documentPickerMode == UIDocumentPickerMode.Open{
        print("this is a Open")



    }
    if controller.documentPickerMode == UIDocumentPickerMode.Import{
         print("this is a Import")
    }
    if controller.documentPickerMode == UIDocumentPickerMode.ExportToService{
         print("this is a ExportToService")

    }

    if controller.documentPickerMode == UIDocumentPickerMode.MoveToService{
        print("this is a MoveToService")


    }

    }

    }

and also the output in the console is this is a Import 2017-01-18 10:29:22.968 IBooksTest[442:43393] plugin com.apple.UIKit.fileprovider.default invalidated

what is wrong here or am i going in wrong direction?. i even looked at similar problem Here but still issue is same. Thanks,

Community
  • 1
  • 1
Niroj
  • 1,114
  • 6
  • 29

0 Answers0