Reputation: 33
saricsarda2[326:15b03] Multi-tasking -> Device: YES, App: YES
saricsarda2[326:15b03] -[CDVFileTransfer download:] [Line 313] File Transfer downloading file...
saricsarda2[326:15b03] File Transfer Finished with response code 200
saricsarda2[326:15b03] -[CDVFileTransferDelegate connectionDidFinishLoading:] [Line 437] Write file file:///Users/Pannako/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/954E4293-9125-43B0-91F4-811C51291CCC/saricsarda2.app/www/data.json
saricsarda2[326:15b03] FileTransferError {
code = 2;
"http_status" = 200;
source = "http://gastromania.hu/images/restaurants/214/mobile/data.json";
target = "file:///Users/Pannako/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/954E4293-9125-43B0-91F4-811C51291CCC/saricsarda2.app/www/data.json";
}
saricsarda2[326:15b03] [LOG] Phonegap - download error source http://gastromania.hu/images/restaurants/214/mobile/data.json
saricsarda2[326:15b03] [LOG] Phonegap - download error target file:///Users/Pannako/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/954E4293-9125-43B0-91F4-811C51291CCC/saricsarda2.app/www/data.json
saricsarda2[326:15b03] [LOG] Phonegap - upload error code2
What's wrong whit this? I tried to find some information on the Internet, bit i couldn't find anything.
Upvotes: 1
Views: 430
Reputation: 5499
In this line:
target = "file:///Users/Pannako/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/954E4293-9125-43B0-91F4-811C51291CCC/saricsarda2.app/www/data.json";
you are trying to write inside the application folder and that is not allowed, instead you should save the info into de Documents folder, in this other question you can see how to get a reference to it, and then change:
file:///Users/Pannako/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/954E4293-9125-43B0-91F4-811C51291CCC/saricsarda2.app
with the path to the Documents directory
Upvotes: 3