I am new to IOS programming. I want to write a C style structure into file and retrieve back.
I am able to write string into file after getting Document directory path. But how to write a structure in that file. Can anyone help?
You'd likely be most interested in the NSCoding protocol, as well as the Creating and Extracting Archives and Encoding and Decoding Objects in the Archives and Serialization guide.
Normal C way of I\O operation worked well, however the to write file in particular location we need permission.
Related
I'm trying to create PropertyHandler shell extension.
What's the best way for embedding properties like (Title,Author,.....) to use the same file in multi computers or devices?
StgCreateStorageEx ? way or there is other ways to do it?
because StgCreateStorageEx dealing with NTFS files only and i'm not sure if the file hold these properties with it if i open it in other device with same PropertyHandler
Is there any way to save properties inside the my file ?
The StgCreateStorageEx function creates a new storage object using the IStorage interface. This allows storing multiple data objects within a single binary file, see for example https://en.wikipedia.org/wiki/COM_Structured_Storage. So, technically, you can save almost anything in this file including embedded properties.
I don't think that this is limited to NTFS: The old Microsoft Office .doc format (and many other Microsoft products) use this storage format and work also with FAT32.
If you want to use this binary file format is a completely different question. As you did not provide any information about the content and format of your file, I cannot recommend anything. One alternative would be to store the content of your file in an xml file. Properties like Title and Author then could be added easily.
I have pick up an old dos system from my friend, and I need to import the data into SQL, but before importing the data, i need to decode it into a readable text file, but I failed to do so. I have try several stuff:
file command in ubuntu terminal, it said "data"
Use online trid and it said macbin(MacBinary 1)
Tried bin2hex, but couldn't unhex it
Tried some online macbin to hex, no luck as well
Tried to open in macOS, but it keep extracting files
bin2hex said, nothing here
stuffitexpander.... Doesn't recognize...
This is the file that i need to decode
https://gofile.io/?c=wdbs6A
Please let me know if you need the original program.
I think they are just some database files.
Use this site for explanations. they even have a file analyzer - showing you the data inside.
You will need to rename the files to .db extension instead of .ocm.
I searched the web for this one and mostly found Obj-C answers or outdated answers so ill simply post the question and hope for the best :)
Im working with a team of Android Developers while im working on IOS. they use XML files for a lot of data. since we want the data between us to stay consistent - we want to be able to have shared XML files to use in our projects.
I know .plist is basically a type of XML, but i want to be able to get the regular shared XML file and turn it into a .plist and then use it in my IOS project.
any known method of doing it at all? if so, is it possible to do it automatically somehow? (script or something of that sort. maybe even do it locally inside the application)
Thanks for the help
A .plist file is a very specific XML file with only a small set of keys allowed. A random XML file will not be convertible to a .plist file.
Try converting your file to JSON first. If you can convert it to JSON you will be able to automatically convert it to a .plist after that using the plutil command with the xml1 or binary1 format.
plutil -convert xml1 -o output.plist input.json
If you can't convert it to JSON, you can keep your XML file as is and parse it in your app using NSXMLParser. XML is harder to parse than .plist or JSON files, but aside from that the difference should be minimal.
Is it possible to generate JSON file from xcdatamodel?
Here's how I imagine it would work: Given a xcdatamodel file, going through some program with some custom logic (will probably be written by me), will generate JSON file for me to use in third-party library. My question: Is this possible? Has anyone ever done it?
The content of xcdatamodel is a content file with xml data and as bin file (no extension) so now it is easy to parse xml to json.
Windows Live Messenger creates a number of files like
C:\Users\USERNAME\AppData\Local\Microsoft\Windows Live Contacts{ae86acef-5a45-4447-bc32-521fc9289e1a}\DBStore\contacts.edb
and stores contacts within. When looking on such files, it is obviouos that they have strict structure. However, I failed to find the description of contacts.edb structure in internet.
Does anybody knows this structure? Or maybe there are some parser sources available? (I do not need a exe for that, I know about NirSoft one).
There is a project called libesedb which might be of use here.
The contacts.edb file is an ESEBD file.