|
|
#1 |
|
Write/Read plist in <data> format
hello,
i would like to create a plist, then write and read <data></data> format for a key in the plist. The rest of keys are in string format. The following code does what i want but it writes and reads all key in <string></string> instead of data format. How can i get it to work? Thanks! write: PHP Code:
PHP Code:
Last edited by dova; Oct 28, 2009 at 10:19 AM. |
|
|
|
0
|
|
|
#2 |
|
What type of object is info? If it's a NSString then it'll get written as a string. You would need to convert (not cast) to NSData to get what you want.
__________________
Sponsor me to cycle 100Km round London in the dark |
|
|
|
0
|
|
|
#3 |
|
The info is a string type (I got it to write and read it).
The next key is idata (setObject:idata forKey:@"data") in the string type, and i would like to convert it to data format for both read and write. but i do not know how. |
|
|
|
0
|
|
|
#4 |
|
Read the documentation.
__________________
Sponsor me to cycle 100Km round London in the dark |
|
|
|
0
|
|
|
#5 |
|
i got it to encode in the data format:
PHP Code:
Thank you |
|
|
|
0
|
|
|
#6 | |
|
Quote:
In all seriousness: if you couldn't see that give up now.
__________________
Sponsor me to cycle 100Km round London in the dark |
||
|
|
0
|
|
|
#7 |
|
Thank you!
i got it to decode: PHP Code:
|
|
|
|
0
|
|
|
#8 |
|
The real question is why? This is not really any more secure than just saving it as a string...
__________________
Sponsor me to cycle 100Km round London in the dark |
|
|
|
0
|
|
|
#9 | ||
|
I use the data format to store the encrypted key using openssl. The key is encrypted as plain text:
Quote:
Quote:
|
|||
|
|
0
|
|
|
#10 |
|
Ah, OK, well that sounds sensible. I would check/ensure that the encoding you are choosing can represent all the characters you have though...
__________________
Sponsor me to cycle 100Km round London in the dark |
|
|
|
0
|
![]() |
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| thread | Thread Starter | Forum | Replies | Last Post |
| Resolved: OS X Lion installed on partition - how to change read/write permissions | JayS90 | Mac OS X | 2 | Oct 4, 2011 11:47 AM |
| problem with plist in tableview | ghousemd | iPhone/iPad Programming | 0 | Jul 6, 2011 05:26 AM |
| Reading and writing files and storage locations xcode | portreathbeach | iPhone/iPad Programming | 1 | Apr 2, 2011 06:22 PM |
| Reading and writing Windows and Linux file formats under Mac OS - what works? | Mr.Bullitt | Mac Basics and Help | 3 | Nov 26, 2009 08:53 AM |
| What format can a Mac write/read and a PC read? | LSUtigers03 | Mac Peripherals | 4 | Jun 16, 2009 10:09 AM |
All times are GMT -5. The time now is 01:32 AM.







Linear Mode

