objectiveccoder001
objectiveccoder001

Reputation: 3031

Reading/writing data to encrypted custom file type

I'd like to create a custom file type, say, .cstm, and be able to create .cstm files on the mac, and read them on the iPhone.

I want the .cstm file to contain XML data. Currently I've got the mac app to successfully make .xml files and the iPhone app to successfully read .xml files, but I'd like to create a proprietary custom file type.

How would I go about doing this? I know how to allow the iPhone app to open a custom file type, but that's as far as I know.

Thanks!

Upvotes: 1

Views: 109

Answers (1)

Fruity Geek
Fruity Geek

Reputation: 7381

You don't need anything special per se. You can just save and load to the URL with the ctsm extension. To support your app automatically launching as an editor of that extension in OSX, you will want to add an entry to your Info.plist file CFBundleDocumentTypes array entry declaring your app as an editor of that extension

https://developer.apple.com/library/mac/#documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/TP40009249-101685-TPXREF107

Upvotes: 1

Related Questions