Français
  • iPhone Development Tutorial - 36 - Loading the Files


    Added on Wednesday 07 July 2010 20:55:33
    by thenewboston
    17165 Views
    4.6 / 5
    12345
    52 rates
    Send this video to your friends
    Get embed code of video

    Buy my app!!!
    http://itunes.apple.com/us/app/testyourbrainpower/id377656444?mt=8

    My forum http://thenewboston.com/forum/

    Ask me all questions there as well as view source code for the tutorials!



    facebook
  • Write your comment here...
  • ITzBATMAN680

    I laughed my ass off when you said chicken bounce over and over, and then the chicken is looking at you like help me 0.o Hahahaha
    Sunday 18 September 2011 22:33:20
  • Tupinambiss

    "chicken bounce....chicken bounce.....check it out... our bacon is still there" These are awesome XD
    Wednesday 07 September 2011 01:55:22
  • CorierPT87

    this work on xcode 4.0? :O
    Thursday 04 August 2011 17:31:30
  • vMattmcd

    hey does anybody know if you actually need to do this in ios 4? I was pretty sure that the text would stay in there with multitasking, but when i actually terminated my application and restarted it, it had an error (SIGKILL)
    Friday 22 July 2011 20:51:33
  • loc87437529

    anyone see a smiley face at 05:48 bottom right conner?
    Monday 18 July 2011 08:22:53
  • MacProgrammar

    @iPhpMaster Bucky already made ton's of tutorials, he is doing it for free and if you want a tutorial about win32 search youtube, there are other people that teach it to. But leave bucky alone.
    Friday 08 July 2011 13:39:43
  • brandonthaddeus

    Email me at brandoncthompson7@yahoo.com and put the subject as "Pre-Paid Legal" to hear about the company I am with now and they have been around for 40 years and millions of people are making serious money with us. I have proof and tools of how to make it work and I also have contacts that have been VERY successful with this company. thank you, Brandon.
    Tuesday 17 May 2011 14:29:35
  • PieEatinSuicideGrunt

    its using ios4 multitasking he even said so a few tutorials ago
    Wednesday 06 April 2011 15:27:46
  • euphoral

    @PanzrKunst thanks for pointing out that you needed that extra '/' in the file path format. I found that it would work fine in the simulator without it, but I needed to add it in order for it to work on my actual phone.
    Wednesday 02 March 2011 23:12:17
  • sfeatherston3

    I've seen all your iPhone dev tutorials so far and I must say that this one left me in the dust. I guess my poor Obj-C knowledge has finally caught up with me. I must also say that this seems like a whole lot of work just to save and recall a single string. Please tell me it's easier than this.
    Monday 21 February 2011 16:02:12
  • Ivultorky

    @PanzrKunst If you run this on a device without multi-tasking (I'm using ipod touch 2nd gen) the origional code works fine (with exception to adding the / for the file path) otherwise i'm not sure which method is called if you double tap the menu button and terminate the application that way.
    Tuesday 08 February 2011 07:15:00
  • SilveZX

    @PanzrKunst Alright thanks... I'm going to try it...
    Thursday 27 January 2011 15:44:15
  • PanzrKunst

    @SilveZX NSError *errorReading; NSString *fileContents = [NSString stringWithContentsOfFile:filePath encoding:NSUnicodeStringEncoding error:&errorReading]; if (fileContents == nil) { NSLog(@"Error reading file '%@\n%@'", filePath, [errorReading localizedFailureReason]); } else { textField1.text = fileContents; }
    Thursday 27 January 2011 06:55:49
  • SilveZX

    @PanzrKunst I couldn't enter this code....I'm getting an error saying that errorReading is not declared. I think it's because of the '&' you placed there despite removing that, it didn't work for me.
    Wednesday 26 January 2011 02:19:21
  • PanzrKunst

    Second bug: There is a slash missing then you initialize the file path. It should be '[docsFolder stringByAppendingFormat:@"/myFile.plist"]' Third bug: reading the file content as you do didn't work in my setup. I used 'NSString *fileContents = [NSString stringWithContentsOfFile:filePath encoding:NSUnicodeStringEncoding error:&errorReading]' instead. But this wasn't enough: if the file is a pList, it's still read incorrectly that way. Don't use any extension, or maybe "txt", but not "plist"
    Wednesday 12 January 2011 16:37:49
  • PanzrKunst

    First, thank you Bucky for all those iPhone dev tutorials, I've been following them all and so I know iPhone dev thanks to you :) But there are bugs in this tutorial. First bug: since iPhone multitasking, 'applicationWillTerminate' won't be triggered when you click the home btn. So 'applicationWillResignActive' must be used instead. Similarly, 'viewDidLoad' is only triggered "the first time". You therefore need to read the file content on 'ApplicationDidBecomeActive'.
    Wednesday 12 January 2011 16:31:14
  • tongsanba

    @Lamename90210 nope, you must quit iPhone simulator and run it again
    Saturday 20 November 2010 06:44:10
  • Techn0Junki3

    @linkfan22 this was before iOS 4.0 :P
    Wednesday 27 October 2010 19:12:34
  • linkfan22

    Bucky all you did to demonstrate this was making the app enter the background instead of actually closing it out and opening it back up.
    Saturday 23 October 2010 19:26:01
  • Lamename90210

    Can we view the file that we saved, when working with the simulator? ie: can we see the contents of the applications document folder without writing an app to do this?
    Friday 22 October 2010 22:56:42
  • Lamename90210

    @Cryostasix Thanks for the suggestion - it's funny!!!
    Friday 22 October 2010 22:52:25
  • orguema

    this is one of the best tutorials in youtube!!!thank you
    Sunday 29 August 2010 06:50:20
  • LJimbox

    @bigmike4ya2003 I am having the same results are you are. I think 4.0 saves users states automatically now but Im trying ti figure out how exactly to save info for when the application is completely terminated so I can save highscores
    Monday 16 August 2010 13:35:12
  • yocaldk

    Looking forward to your next tutorial - dont stop here! :) You're the best one around.
    Tuesday 03 August 2010 09:21:55
  • ScienceTutorials

    Bucy's IQ is 10000000000000 He is soo smart!
    Monday 02 August 2010 22:54:45
ADVERTISEMENT
Supplements
Social Network
Tag cloud