I save my datas in plist. Once my app is deleted and reinstalled I planned to get those plist datas through iCloud. I have upload option to send file to cloud and retrieve when app installed new. Once app is deleted/reinstalled the plist data is retrieved with no issue. Now the problem is I save my files like this in a array and write to plist:
Printing description of arrTemp:
<__NSCFArray 0x175f7d90>(
{
Amount = "USD 100.00";
Category = "";
Currency = USD;
Date = "Fri 31 Oct,2014";
DateSort = "2014/10/31";
Merchant = "";
Payment = "";
Purpose = "-";
SubCategory = "";
TimeStamp = "Fri 31 Oct,2014 13:35:07";
Tips = "0.00";
UDDate1 = "Fri 31 Oct,2014";
UDDate2 = "Fri 31 Oct,2014";
UDNumber1 = "0.00";
UDNumber2 = "0.00";
UDNumber3 = "0.00";
UDText1 = "-";
UDText2 = "-";
UDText3 = "-";
Uploaded = upload;
Value = 0;
}
)
When I retrieve from iCloud the plist looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Amount</key>
<string>USD 100.00</string>
<key>Category</key>
<string></string>
<key>Currency</key>
<string>USD</string>
<key>Date</key>
<string>Thu 31 Oct,2014</string>
<key>DateSort</key>
<string>2014/10/31</string>
<key>Merchant</key>
<string></string>
<key>Payment</key>
<string></string>
<key>Purpose</key>
<string>-</string>
<key>SubCategory</key>
<string></string>
<key>TimeStamp</key>
<string>Fri 31 Oct,2014 13:35:07</string>
<key>Tips</key>
<string>0.00</string>
<key>UDDate1</key>
<string>Fri 31 Oct,2014</string>
<key>UDDate2</key>
<string>Fri 31 Oct,2014</string>
<key>UDNumber1</key>
<string>0.00</string>
<key>UDNumber2</key>
<string>0.00</string>
<key>UDNumber3</key>
<string>0.00</string>
<key>UDText1</key>
<string>-</string>
<key>UDText2</key>
<string>-</string>
<key>UDText3</key>
<string>-</string>
<key>Uploaded</key>
<string>upload</string>
<key>Value</key>
<string>0</string>
</dict>
</array>
</plist>
I cannot write this data retrieved from cloud straight to my plist when app is installed new. I have to turn back the plist datas to like the array (posted initially "Printing description of arrTemp:") and write it to my path when my app installed new. How to turn the data from plist to new array should look like I posted initially in "Printing description of arrTemp:" ?? Please Help