Symbol not found: kUTTypeImage

后端 未结 3 1795
醉话见心
醉话见心 2020-12-23 18:54

I copied some bits of code from apple\'s documentation- and I got these 2 errors:

Undefined symbols for architecture i386:
  \"_kUTTypeImage\", referenced f         


        
相关标签:
3条回答
  • 2020-12-23 19:13

    Obligatory Swift answer:

    import MobileCoreServices
    
    0 讨论(0)
  • 2020-12-23 19:16

    Look up the symbol (kUTTypeImage) and locate the image/library it should exist in (MobileCoreServices.framework in this case). Then link your binary with that framework.

    0 讨论(0)
  • 2020-12-23 19:19

    When use with UIDocumentPickerViewController do:

    import MobileCoreServices
    
    let type = String(kUTTypeImage)
    let documentPickerViewController = UIDocumentPickerViewController(documentTypes: [type], in: .import)
    
    0 讨论(0)
提交回复
热议问题