Caching Content on iPhone

My iPhone application downloads content from the web. I want to cache some of this content so that it doesn't have to hit the web everytime.
How do I do that? Where would I store the files? I have read that there is the documents folder, how do I get to that? Is that the right place to store the files? Or is there a temporary folder?
Is there some code sample I can use?

Try searching for NSSearchPathForDirectoriesInDomains in your documentation viewer and read the associated guides.
You can also use something like "~/Library/Application Support/Xxx" as your directory and use tilde expansion to get the actual file path. Create this the first time and then use as you wish.

Similar Messages

  • When I connect my iPhone 4 it says iTunes can not read contents of Iphone. Help?

    I recently got a new laptop (windows 7). My non-jailbroken iPhone 4 synced the first time but now when I connect it it says 'iTunes cannot read the contents on (iphone name) please reset to factory settings and try again. I've done that 3 times, I've tried using different USB cables and ports, and I've even tried thet ifunbox file manager and deleted iTunesDB as people say to do. Any ideas?

    Any iTunes plugins installed? Read through this thread:
    https://discussions.apple.com/thread/2464798?start=0&tstart=0

  • I want to back up an Iphone 3G and put all the content into Iphone 4. When Iphone 4 is connected to Itunes I do not get an Option to restore from Iphone 3G. IOS 3G - 4.2.1

    I want to back up an Iphone 3G and put all the content into Iphone 4. After I have backed up the Ipone 3G and then when Iphone 4 is connected to Itunes I do not get an Option to restore back up from Iphone 3G. The only devive is see in the drop down list is my Iphone 4. The IOS on Iphone 3G is 4.2.1 and on Iphone 4 is 4.1.
    Please share if anyone has any solution to such a problem.

    You will first have to update your iPhone 4 in order to restore it from the backup of your 3G. Follow the directions here:
    http://support.apple.com/kb/HT4972
    This is an erase/restore deal, so make sure all of your data is on your computer before you begin. iOS 6.1.2 will be installed on your iPhone 4.
    Once done, on your iPhone 4: Settings>General>Reset>Erase All Content & Settings. You'll now be able to restore your 3G backup to your iPhone 4.

  • Does the Flash Player (Win7 / IE 9+) cache content outside of the browser?

    I have encountered a technical issue using Flash (CC) content in Captivate 7.  I am distributing the content to a customer with approximately 1000 Windows PC's running IE 9 +.  Some of these computers have no issue but a small number experience a problem which prevents them from downloading content after an undetermined point.  There is no apparent pattern to identify either a fault in the content or a fault in the workstation build.
    The problem looks like this:
    The user is able to access the content - sometimes several courses, sometimes only one.
    At some point during a course -it will stop playing (failing to load the next page).
    The user can close the course and reload - but is always stops in the same place it originally failed.
    The user can load previously accessed courses and these work without issue.
    The user is unable to load any new courses (previously un-accessed) - resulting in a blank page.
    No application events are logged when this occurs so there is little to examine when it occurs.  We have anecdotal evidence that the issue can sometimes be resolved by clearing the browser cache - but not always.  Also - we have unconfirmed reports that the problem can "resolve itself" after several weeks.
    From my perspective it looks like one of the following scenarios is causing the problem:
    The Flash Player is caching content in a location other than the browser cache and reaches a limit.  The cache is not overwriting content so then fails to download any new content.
    The Flash Player experiences a problem which prevents it from downloading content (corrupt files, registry issue, or policy restriction).
    We have several other customers who access this content at different sites - and none have reported this specific issue, so we are confident that the delivery mechanism is sound.  The customers workstations are generally new machines with plenty of capacity, and they have a 200 Mb leased line connection to the Internet.  The customer has assured us they do not use a caching proxy server on site, nor any bandwidth optimisation tools so in theory, the client connection is direct to the Internet.  Additionally - the fact that this issue affects isolated workstations suggests the problem lies at the endpoint - not in the transmission path.
    Has anyone encountered this type of issue before - or does anyone have any knowledge of Flash Player caching operations?
    Regards

    IE will roll cache like any other browser. Keep as much as the user allows and start recycling when that gets filled. At no point will IE "fill up" on any single or multiple sites and be unable to download any more content. Downloading is all a browser does and Flash is not excluded from that unlimited party. However if you never remove content properly and continue to download endless content, you could encounter RAM issues. You don't have unlimited RAM so you may be hitting a wall. But as long as you're disposing any content you loaded that you no longer need, that isn't an issue.
    You're going to need to install some custom logging if you really want to debug a clients client. The most popular thing a Flash application will do is fail silently and lock up because you did not provide any failsafe measures for various common issues. From common crossdomain policy issues to flaky connections failing in the middle of a download, you need to handle all these situations and act appropriately. If any content is failing to load in Flash you can be sure if you try {} catch () {} you'll be given a top level chance to send out a log notice to yourself. That's of course assuming you have the standard IOErrorEvent, SecurityErrorEvent, etc already in place to also log.
    If you had access to the offending machines then opening the developer tools in IE and using the network manager would be the easiest way to see what's going on. If you click to load more content and see no network request, the requesting itself has an issue (could be a million reasons). If you see the request go out then you'll either see it fail in the middle or complete. If it fails you should have code to handle that. If it completes and the app still locks up, you probably have ABC that isn't playing nicely and should be "caught" and logged.
    There's just no one way to approach this. Only layers of error handling and logging are your best friends when it comes to debugging this kind of thing.
    Personally I've seen clients boast they have XMbit lines and their network is otherwise perfect, when it had old grade (100mbit) eth cables and the little things that schools and large companies tend to overlook in the long run. It's easy to replace a faulty switch or eth card but in-wall cable, not so often.

  • Need to copy all content from iPhone 3gs to Mac Inc Contacts

    Hi,
    My wife's iPhone 3GS was synced to Windows 7 PC before it crashed, unfortunately i have no backup, so I need to restore all content from iPhone to either a Mac or PC... her iphone was last updated to OS v4.1... need to update it to OS v5..most important is I need to get contacts  and photos off the iphone as well as purchased apps...........HELP!!
    Thanks in advance for your help!!

    First, iTunes will only sync non-purchased media one direction: from computer to phone.  To copy non-purchased media from your phone to your computer (such as ripped CDs, etc.) you will need to purchase 3rd party software such asTouch Copy.  Once you recover this media to your new computer, carefully follow wjosten's directions in this post to migrate other data to your new computer: https://discussions.apple.com/message/13356770#13356770.

  • Iphone 4s coming friday, what is the best way to get the notes content from iphone 4 to 4s without doing a restore? i want the new phone to be totally new but not sure how to get notes content across.

    What is the best way to get the notes content from iphone 4 to 4s without doing a restore? i want the new phone to be totally new but not sure how to get notes content across. If I do a restore as I have when previously from one iphone to another it has shown (in settings, usage) the cumulative usage from previous phones so all the hours of calls on all previous iphones will be displayed even though its brand new. Anyone know how I can get my notes (from standard iphone notes app) to my new iphone 4s without restoring from previous iphone 4. Thanks for any help offered.

    First, if you haven't updated to iTunes 10.5, please update now as you will need it for the iPhone 4S and iOS 5.
    Once you're done installing iTunes 10.5, open it. Connect your iPhone to iTunes using the USB cable. Once your iPhone pops up right click on it. For example: an iPhone will appear and it will say "Ryan's iPhone."
    Right click on it and select "Backup" from the dropdown menu. It will start backing up. This should backup your notes.
    Please tell me if you have any problems with backing up.
    Once you backup and get your iPhone 4S, you must follow these steps. If you don't follow these steps, you will not be able to get your notes on your new iPhone 4S.
    Open up iTunes again then right click on your device (iPhone 4S). Once you do you will see a dropdown menu. It will say "Restore from Backup..." Select this and it'll ask for a backup, select it from the dropdown menu. For example "Ryan's iPhone - October 12, 2011." Pick that and it will restore to your backup. Do this when you get your iPhone 4S so you will not lose anything. Even though you're restoring, you're getting back, since you're getting the previous settings, notes, contacts, mail and other settings from your old iPhone. You'll still have Siri though! So, restore when you first get it. Also frequently backup your device, as it will be worth it. You can restore from a backup if something goes wrong or save your data for a future update.
    Once you do that, you should have your notes on your new iPhone 4S and iOS 5.
    Please tell me if you need any help.
    I hoped I answered your questions and solved your problem!

  • ITunes cannot read the contents of iphone "Teresa Pearcy". Help?

    Everytime I plug in my phone to charge, this is what pops up. "
    ITunes cannot read the contents of the iphone "Teresa Pearcy". Go to the Summary Tab in iphone preferences and click Restore to restore this iphone to factory settings."
    It also says if I do this then I will lose everything that's been put into my phone.
    I've even tried everyway I know to get around iTunes just to get a new ring tone downloaded. I can't get any of my music... I don't want to lose what I have on my phone already by restoring it to factory settings.
    It will transfer photos from iphone to computer. But nothing else.
    I've been struggling with this since I got the phone. Can anyone help me out with this?? Please? It's been very frustrating. Thank you.

    Hi,
    I've the same problem too.
    I had made iPhone sync on my PC in the past. But my HDD went in trouble and I had to buy another and reinstall Windows, so I lost my iTunes library.
    Having no sync was ok, since I was comfortable with the photos, applications and music in my iPhone.
    But yesterday my iPhone went out of disk space, and my problem started. I then needed to sync. I tried to extract my paid applications from iPhone using "transfer purchases from my iPhone". Unsuccessful, since it did not copy every application. I've tried to download the applications again, but iTunes say I need to pay for them. And now, after some unsuccessful purchase transfers and backups, iTunes says "iTunes cannot read the contents of iPhone", so I think I'm forced to restore the original settings.
    What should I do?
    I don't want to pay again for the applications I already purchased.
    I don't want to loose my application data.
    I don't care about my music, photos and videos, cause I can get them elsewhere anyway.
    Is there a way to save my iPhone, applications and data?
    Thanks

  • Itunes- cannot read contents of iPhone! HELP!!!

    Hello I just synced my 2.1 firmware iPhone with itunes yesterday for the first time and everything went fine. I was trying to copy songs from my iPod to iPhone without individually adding them from my music folders so I downloaded a program called 4media iPod to pc to do the transfer not realizing that it had set my iPhone up as a mac. (I have windows xp media center edition). I closed the program and opened up iTunes and got the message "iTunes cannot read the contents of iPhone. Please click on the preferences tab and restore to factory settings". I went back to the program and deleted the songs from the iPhone and connected back to iTunes but got the same message. I don't want to restore because I didn't create any backup. But now the computer only recognizes the phone as a camera. I read about a iTunes_control folder delete but I don't completely understand it. Can someone please help me with a way that doesn't involve restoring??????? Note: my iphone3g is not jailbroken.

    I would do the restore and see if that corrects the issue.

  • Unable to clear the cache content

    Hi
    messages are stuck in queue, so i went smq1 & smq2 and clear the queue. again i processed it while putting the file in ftp.
    In sxi_cache i went and seen it is showing - Unable to clear the cache content. traffic light is in red mode. I know that it should be green....
    thanks

    Hi,
    Please gothrough the same disscussion
    Error in Cache Refresh(Unable to refresh cache contents)
    SXI_CACHE Error:  Unable to refresh cache contents
    Regards
    Seshagiri

  • Cache Contents are Obsolete after activating BPM

    Hello.
    I have made a BPM for a scenario, and after activating it, the SXI_CACHE shows: Cache Contents are Obsolete
    the problem is solved only after I delete the Cache instance in the integration directory, and make a cache connectivity test.
    The version of the PI is 7.0 SP15
    What in BPM development might cause this? or is there an external cause for this (this is the first BPM being made in this server)
    Thanks for anyone who will try to assist.

    Thank you very much.
    I tried to use a simpler BPM (one that receives an interface and immediately sends it) to see if the complexity of the BPM, or just a bug in this specific BPM was causing the problem.
    However - this problem occurs with the new BPM as well...
    I have open an OSS, and waiting to see what they'll suggest.

  • Cache Content is Obsolete in PI 7.31 SP11

    Hello Guys,
    Recently we upgraded SP level from PI 7.31 SP06 to SP11 and found one error in (t.code SXI_CACHE--Delta Monitoring) when executed
    Error: Cache Content is Obsolete
    I checked the t.code SXMB_ADM_BPE and all are green. I didn't found any SAP notes so far.
    Could you please provide me some suggestions on that?
    Thank you.
    Sateesh

    Hello Eoin, Hello SK,
    I didn't seen any error description, and all integration Processes return code is '0'.
    As mentioned above in my previous we upgraded service packs from PI 7.31 SP06 to SP11, was that the reason ? ( mean this Delta cache refresh is obsolete by SP11?)
    (or) any other different reason, because looks my all three systems shown the same issue.
    Thank you.
    Sateesh

  • ITunes cannot read the contents of iPhone/iPod Touch?

    After following these instructions to update iTunes https://discussions.apple.com/message/21853130#21853130 , Whenever i connect my iPod Touch 5th gen i get this message:
    iTunes cannot read the contents of the iPod “(my ipod name)”. Go to the Summary tab in iPod preferences and click Restore to restore this iPod to factory settings.
    i click ok then iTunes says:
    The software required for communicating with the iPod is not installed correctly, and you must manually eject the iPod before each disconnect. Please reinstall iTunes to install the iPod’s software.
    I am NOT restoring my iPod as i know this is iTunes' problem. I went to the apple website and downloaded iTunes for mac and then installed it Installer said it was succuesful but after opening itunes i get the same problem. What do i do?
    I WILL NOT DO ANYTHING IN TERMINAL. I never touch terminal and never will.

    Hi,
    I've the same problem too.
    I had made iPhone sync on my PC in the past. But my HDD went in trouble and I had to buy another and reinstall Windows, so I lost my iTunes library.
    Having no sync was ok, since I was comfortable with the photos, applications and music in my iPhone.
    But yesterday my iPhone went out of disk space, and my problem started. I then needed to sync. I tried to extract my paid applications from iPhone using "transfer purchases from my iPhone". Unsuccessful, since it did not copy every application. I've tried to download the applications again, but iTunes say I need to pay for them. And now, after some unsuccessful purchase transfers and backups, iTunes says "iTunes cannot read the contents of iPhone", so I think I'm forced to restore the original settings.
    What should I do?
    I don't want to pay again for the applications I already purchased.
    I don't want to loose my application data.
    I don't care about my music, photos and videos, cause I can get them elsewhere anyway.
    Is there a way to save my iPhone, applications and data?
    Thanks

  • Itunes cannot read the contents of Iphone after updating to 2.1

    Hi!
    I have the original Iphone and I decided tonight to upgrade to the 2.1. At the end of the process, when it was restoring my iphone contents (pics, contacts etc.), an error came up "ITunes cannot read the contents of the Iphone" and it is telling me to restore to factory settings? My phone now is updated with all the new stuff but in Itunes it is not reading my Iphone. I am trying to make a ringtone from Itunes and I can't do it because of this problem.
    Please help!

    Hi,
    I've the same problem too.
    I had made iPhone sync on my PC in the past. But my HDD went in trouble and I had to buy another and reinstall Windows, so I lost my iTunes library.
    Having no sync was ok, since I was comfortable with the photos, applications and music in my iPhone.
    But yesterday my iPhone went out of disk space, and my problem started. I then needed to sync. I tried to extract my paid applications from iPhone using "transfer purchases from my iPhone". Unsuccessful, since it did not copy every application. I've tried to download the applications again, but iTunes say I need to pay for them. And now, after some unsuccessful purchase transfers and backups, iTunes says "iTunes cannot read the contents of iPhone", so I think I'm forced to restore the original settings.
    What should I do?
    I don't want to pay again for the applications I already purchased.
    I don't want to loose my application data.
    I don't care about my music, photos and videos, cause I can get them elsewhere anyway.
    Is there a way to save my iPhone, applications and data?
    Thanks

  • Error in Cache Refresh(Unable to refresh cache contents)

    Hi All,
    When i am refreshing Cache from the browser using link CPACache/refresh?mode=full it says success.
    When i do from SXI_CACHE it gives an error.
       Error during last attempt to refresh cache
       Unable to refresh cache contents
    So when i run any schenario in message monitoring i get the following error-
    <i>SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="XICACHE">UPDATE</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText>http response does not contain a valid XML root tag</SAP:AdditionalText>
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>An error occurred when refreshing the XI runtime cache</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
      </SAP:Error></i>
    I checked the INTEGRATION_DIRECTORY_HMI connection...
    here the response which im getting is..
    <i> HEADER NAME                HEADER VALUE
    response_line               HTTP/1.0 200
    server_protocol             HTTP/1.0
    status_code                 200
    status_reason
    ragma                       no-cache
    ache-control                no-cache
    ontent-type                 text/html
    ontent-length               87
    HTTP BODY
    TITLE>Error</TITLE>#<BODY>#<H1>Error</H1>#FW-1 at nebula: Unknown WWW s
    rver.</BODY>##
    Time (ms)                                 17</i>
    I believe that is not the right response.
    Everything was working fine yesterday when all of a sudden this error cropped up from no where.
    Regards,
    Rahul

    Hi,
    This is the error it shows there..
    <b>ERROR ID</b>      <i>UPDATE</i>
    <i>http response does not contain a valid XML root tag</i>
    Regards,
    Rahul

  • Cache contents are obsolete

    Hi all,
    I did add one field to data type in Design and activate changes. in sap system when i regenerate the proxy i cant see the new field which i added.
    when i check in sxi_cache in sap system it is red and it is saying "cache contents are obsolete "
    Can any one tell me what could be the problem.
    Kind Regards,
    Kiran

    Hi Kiran,
    1.
    Refer the below weblog:
    /people/sravya.talanki2/blog/2005/11/03/cache-refresh-errors--new-phenomena
    Your : INTEGRATION_DIRECTORY_HMI RFC is working correctly?
    INTEGRATION_DIRECTORY_HMI (HTTP connection, use the XIISUSER to authenticate). Is the
    Path Prefix set to “/dir/CacheRefresh”.
    also check those in exchangeprofile:
    com.sap.aii.integrationserver.serviceuser.name
    com.sap.aii.integrationserver.serviceuser.pwd
    2.  refer this link, this may help
    http://72.14.235.104/search?q=cache:ybo3lXQMIqMJ:https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c00d9465-ea97-2910-deac-f8aa681eef35sxi_cacheobsolute+why%3F&hl=en&ct=clnk&cd=1&gl=in&client=firefox-a
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/44/3a6c6d55e402bfe10000000a11466f/content.htm
    3. Check the RWB cache notifaction status for the AE and IE? these should be green in color...when you run SXI_CACHE it tries to push the data to IS from all side including the AE? but the AE should be sucessfull...
    if any problem in the AR cache will not trun the SXI_Cache sucessfully......so i suggest run the CPA cache completely...make sure all the activiation is done, check the INTEGREATION_DIRECTORY_HMI (checkl the name) destination is properly entered....then try to rerun thec cache from the IR and ID and check the error if any....
    Regards,
    Suraj Kumar
    Edited by: Suraj Pabbathi on Jan 30, 2008 3:43 AM

Maybe you are looking for