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)
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.
@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.
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.
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"
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.
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'.
@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.
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?
-My app worked exactly as you showed, however, I also opened the old demo of the bank tutorial you did, and typed text into those textFields, to see if leaving would clear the fields and it didn't. So I thought, "hmm, maybe because it's OS 4.0.1" So I double clicked the home button to bring up the running programs, and closed out of both, and then when I opened both of them back up (including the demo we just did) They were both cleared.
@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
Your'e right. He has to double tap the home button and then press the icon on the multitask-thingy and then press the awesome little red dot to terminate it. So he never actually used any of the code he wrote. We could probably do the same thing by simply adding an empty textfield to the nib. But anyway.. I'm sure it works if he actually terminates it. It's just a little confusing.
@iPhpMaster No need to be so rude, He already has made a ton of C++ Tutorials... Use the "Search" function. idiots... probably kids, no 1's that rude or stupid...
@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.
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
ITzBATMAN680 5 months ago
"chicken bounce....chicken bounce.....check it out... our bacon is still there"
These are awesome XD
Tupinambiss 5 months ago
this work on xcode 4.0? :O
CorierPT87 6 months ago
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)
vMattmcd 7 months ago
anyone see a smiley face at 05:48 bottom right conner?
loc87437529 7 months ago
This has been flagged as spam show
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.
brandonthaddeus 9 months ago
its using ios4 multitasking he even said so a few tutorials ago
PieEatinSuicideGrunt 10 months ago
@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.
euphoral 1 year ago
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.
sfeatherston3 1 year ago
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"
PanzrKunst 1 year ago
@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.
SilveZX 1 year ago
@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;
}
PanzrKunst 1 year ago
@PanzrKunst
Alright thanks... I'm going to try it...
SilveZX 1 year ago
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'.
PanzrKunst 1 year ago 2
@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.
Ivultorky 1 year ago
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.
linkfan22 1 year ago
@linkfan22 this was before iOS 4.0 :P
Techn0Junki3 1 year ago
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?
Lamename90210 1 year ago
@Lamename90210 nope, you must quit iPhone simulator and run it again
tongsanba 1 year ago
this is one of the best tutorials in youtube!!!thank you
orguema 1 year ago
Looking forward to your next tutorial - dont stop here! :) You're the best one around.
yocaldk 1 year ago
Bucy's IQ is 10000000000000
He is soo smart!
ScienceTutorials 1 year ago
Bucky, I had one issue that I stumbled across:
-My app worked exactly as you showed, however, I also opened the old demo of the bank tutorial you did, and typed text into those textFields, to see if leaving would clear the fields and it didn't. So I thought, "hmm, maybe because it's OS 4.0.1" So I double clicked the home button to bring up the running programs, and closed out of both, and then when I opened both of them back up (including the demo we just did) They were both cleared.
bigmike4ya2003 1 year ago
@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
LJimbox 1 year ago
wow THANKS bucky
iZenic 1 year ago
GUYS watch this with cc transcribe audio on its HILARIOUS
Cryostasix 1 year ago 12
@Cryostasix Thanks for the suggestion - it's funny!!!
Lamename90210 1 year ago
FINALLY! I watched the whole objective C series and this iPhone development series.. and finally back on track!!! :D
Brandlax 1 year ago
You do not need to save the file as an array. You can write the raw NSString to a file. It's so much easier!!!
macheads101 1 year ago
nice TITS brucky, me mean nice ASS, me mean nice TUTS.
GhostReconx261996 1 year ago
you must be pretty drunk if you added a tag called "windows" to an apple programming tutorial
MyPhoneSDK 1 year ago
PLEASE make a playlist for iPhone App Development please :)
Cryostasix 1 year ago
This has been flagged as spam show
youre too smart for me
linkcart 1 year ago
Hei Bucky! Great tuts.
You are working on iOS4 and have backgrounding enabled for youre app. You never terminated youre app so it never saved...
Also why do you add app to the notification when you dont use it?
Larsjkvegas 1 year ago
@Larsjkvegas
Your'e right. He has to double tap the home button and then press the icon on the multitask-thingy and then press the awesome little red dot to terminate it. So he never actually used any of the code he wrote. We could probably do the same thing by simply adding an empty textfield to the nib. But anyway.. I'm sure it works if he actually terminates it. It's just a little confusing.
Great tutorials.
Stiii 1 year ago
Bucky make C++ videos or i will fuck you mom!
iPhpMaster 1 year ago
@iPhpMaster You obviously didnt look for them. He has a lot
TheStudentCoder 1 year ago
@TheStudentCoder
yea but not win32/QT GUI programming
iPhpMaster 1 year ago
@iPhpMaster eyy keep calm ;-)
Hauserdav 1 year ago
@iPhpMaster O_O after that upload it to youtube
Biohazard000Labs 1 year ago
@iPhpMaster No need to be so rude, He already has made a ton of C++ Tutorials... Use the "Search" function. idiots... probably kids, no 1's that rude or stupid...
TheEBookZone 1 year ago 6
@TheEBookZone I fucked your mom. Now calm down.
TheTIprogrammer 1 year ago
@TheTIprogrammer Yup, definitely kids... God I hate yobo wanna be's. Why dont you make you own tutorials instead of pissing over others?.. looser...
TheEBookZone 1 year ago
@TheEBookZone We did tit again last night... GOOD TIMES
TheTIprogrammer 1 year ago
@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.
MacProgrammar 7 months ago
10th MOTHER FUCKING ALBINO CUNTS
gaztheace 1 year ago
I think that there is a troll? But where? *cough* *cough* Below my post maybe?
WoWFritzz 1 year ago
This has been flagged as spam show
8th Pussy-suckers!
Soggymass 1 year ago
This has been flagged as spam show
7th peer pressure
hungaryfish 1 year ago
This has been flagged as spam show
6th lindsay lohans!
nomaron16 1 year ago
This has been flagged as spam show
5th fuckers
dan007iel 1 year ago
This has been flagged as spam show
4th fags
dan007iel 1 year ago
This has been flagged as spam show
3rd niggers
dan007iel 1 year ago
This has been flagged as spam show
2nd
kanta90 1 year ago
This has been flagged as spam show
1st bitches
5trayProductions 1 year ago