How do i associate excel file type (xlsx) with iPhone application

后端 未结 3 535
天命终不由人
天命终不由人 2021-02-08 04:27

Hi
i have managed to open .xls files form mail app by adding document type to the project build and set the Types field to \"com.microsoft.excel.xls\" (see screen shot).

3条回答
  •  温柔的废话
    2021-02-08 05:12

    I solved that by defining custom UTI as follows. Try to add these definitions into your info.plist. It works as expected.

    UTExportedTypeDeclarations
    
        
            UTTypeDescription
            XLSX input table document
            UTTypeTagSpecification
            
                public.filename-extension
                xlsx
                public.mime-type
                application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
            
            UTTypeConformsTo
            
                public.data
            
            UTTypeIdentifier
            com.mydomain.myapplication.xlsx
        
    
    

    ....

    CFBundleDocumentTypes
    
    
        
            CFBundleTypeName
            XLSX input table document
            LSHandlerRank
            Owner
            CFBundleTypeRole
            Editor
            LSItemContentTypes
            
                com.mydomain.myapplication.xlsx
            
        
    
    

提交回复
热议问题