iphone - How do I register a custom filetype in iOS -
i creating app in want let user backup files (plist + m4a). zip files , change extension custom 1 (specifically app, "*.mybackup"). user can either export via email or itunes file sharing.
i have read cfbundledocumenttypes didn't had them.
the part stuck @ how associate extension app. if user sends himself email "custom"-zip file he's supposed able open app.
how do , "utexportedtypedeclarations"?
i hope it's okay if dump in part of projects info.plist without further explanation. think it's pretty self-explanatory.
<key>cfbundledocumenttypes</key> <array> <dict> <key>cfbundletypeiconfiles</key> <array> <string>icon-ipad-doc320.png</string> <string>icon-ipad-doc.png</string> </array> <key>cfbundletypename</key> <string>myappname file</string> <key>cfbundletyperole</key> <string>viewer</string> <key>lshandlerrank</key> <string>owner</string> <key>lsitemcontenttypes</key> <array> <!-- app supports files custom extension (see utexportedtypedeclarations) --> <string>com.myurl.myapp.myextension</string> <!-- , csv files. --> <string>public.comma-separated-values-text</string> </array> </dict> </array> <key>utexportedtypedeclarations</key> <array> <dict> <key>uttypeconformsto</key> <array> <string>public.data</string> </array> <key>uttypedescription</key> <string>myappname file</string> <key>uttypeidentifier</key> <string>com.myurl.myapp.myextension</string> <key>uttypetagspecification</key> <dict> <key>public.filename-extension</key> <string>myextension</string> <key>public.mime-type</key> <string>application/octet-stream</string> </dict> </dict> </array>
Comments
Post a Comment