shahid610169 shahid610169 - 1 year ago 30
iOS Question

iOS and OSX Document Packages cross platform

I have a iOS and OSX application which is document based and i am saving complex folder hierarchy inside the document so i change my UTI type to document package.

But the problem is that according to apple Document Package is just a folder. If i open the document package on windows or linux machine it consider it as folder despite of having a .abc extension. I figured out that one solution to this problem is that i zip the folder while saving. But i don't think that it is a good approach because every time i open up the file i will have to decompress the folder and compress it again on re-saving.

Is there any other solution to this problem?

Answer Source

I found another better solution.

Solution is to use SQLite database as your document as long as you have text to save on the file systems. In my case i also had images, so i created a table for all the images and a table for all the files contents that i used to write on files. So the document will have custom extension(.abc) which will only be opened with your application.