How to associate iPhone application with _every_ file type?

前端 未结 3 1543
天命终不由人
天命终不由人 2021-02-13 02:41

There is iPhone app \"Another Mail Client\" that should be able to open any file to send it as attachment. So, I want to associate this application with any file with any extens

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-13 02:53

    I've made an app with the following setup

    CFBundleDocumentTypes
    
        
            CFBundleTypeIconFiles
            
            CFBundleTypeName
            name
            LSItemContentTypes
            
                public.data
            
        
    
    

    When I try to open a .pdf from Safari, this app shows up in "open in.." list. Can you make a sample app and try it?

    UPD:

    It seems like claim 'public.data' (tried also public.item, public.content) means file, which belongs to set "all known to system UTIs", not any file. So, you will be able to handle 99% of files, which users want to send by email , but not all. Another way would be to export UTI that you think are important, but which are not in system UTIs by default.

提交回复
热议问题