#1 By: sandeep251986, March 14th, 2013 06:55
in my project i am downloading data from server after that i need to save downloaded data to iphone device memory.
here my problem is how to get device memory path to save the downloaded data.
can any one help me to get iphone device memory path.
#2 By: itlgames, March 14th, 2013 07:29
If you download on memory it means it's stored on a variable, so no path. All download code I have ever implemented on iOS is on memory first then I save wherever I like. Perhaps you want to share that code cos your question is confusing.
#3 By: sandeep251986, March 14th, 2013 07:52
my code is :
char szBuf="hello cocos2d";
const char * path="device sd card path/textFile.txt";
File * fp=fopen("","wb");
from the above code i am trying to create textFile.txt in device sd card.
here my problem is to get sd card path;
how to get path of sd card
#4 By: itlgames, March 14th, 2013 08:38
Uh, sd card? You are posting on the wrong forums, you realise this is cocos2d in objective-c for iOS?
#5 By: sandeep251986, March 14th, 2013 10:23
i know that was c++ code,i just tried with c++ code in cocos2d.
that code is working well in cocos2d
by using that code i created textFile.txt file also in simulator path (/users/.../iphone simulator/..caches/textFile.txt).
#6 By: varedis, March 14th, 2013 10:40
What iOS are you using that has an SD card slot? I think you have picked up some knockoff lPhone
#7 By: sandeep251986, March 14th, 2013 12:37
sorry for wrong framing the question
i am trying to implement things which i implemented in android
in android i downloaded images from the server and saved that to device memory
card and creating folders in memory card.
like that i am trying in iphone also
here i am trying to create folder in device memory(not in project folder) and adding some text file/images
to that folder.
can i create files in device memory through pragmatically?
#8 By: varedis, March 14th, 2013 13:43
Each app runs in its own sandbox. You do not need to create separate folders in device memory to store things. Look in to NSDocuments