In case someone else runs into the same problem, I had no data showing up from my database, and I was able to fix it by simply renaming my php file. It was originally named "test2.php". I guess the number messed it up. I changed it to "json.php". Anyway, these videos are a life saver. Thanks Vishal!
I have to say i find your Tutorials very very useful and the best i have seen, nice to see up to date tutorials. My app is working great apart from that im using storyboards, ive worked out how to pass data, clicking the first item in the tableview works fine, but when i click on any other item/cell, the app crashes. Im guessing its something to do with reading the correct row but i was hoping you could give me a point in the correct direction. Thanks in advance Mark (UK)
Well explained tutorial, Thank you ! Also I was wondering if you have CRUD tutorial on sqlite 3? I couldn't find it in your uploads. If you have time, can you please make a tutorial on that? Your explanations are very clear and easy to understand. Thanks again.
Can you please make a detailed video going over how you created your database? I have mySQL and Aptana Studio 3 for my php but I don't know if I have done it correctly at all. I really need some help. Thank you so much for your in depth videos, they are very helpful.
Sorry, just to add to my last comment, I got the info for using Storyboards from your other tutorial ( master detail one with Star Wars characters) Works fine for the first cell/row but crashes when passing data from second cell/row Many Thanks Mark
Excellent Tutorial and the simplicity of your techniques are fantastic. I have been contemplating using RestKit 2.0 for my project but, it seems to be overkill. Does anyone have any experiences with Restkit 2.0?
Hi, thank you very much for the tutorials. So far it's working pretty good, except a problem with accents ( é, è, à...). Do you have any idea for handling it? Like others i would really appreciate a tutorial about data persistence. Thanks again.
Could be one of two issues: 1. Your JSON is malformed. An extra character could throw off the Objective-C code. 2. Something wrong with your code in the project - You may want to try adding NSLog statements/breakpoints and see what the various values are at various stages of the program.
Hi - great set of tutorials - seen them all. I'm having some difficulties with the navController and viewController in the Appdelegate.m file. Is there any way you could share the project files for this ?
Thanks a lot for this, it really helped me out. I am using MAMP for the sql and php server working on it locally. I had a lot of issues connecting to the server and found out that the php code didn't like "localhost" as a host name. If anyone has issues with this just use 127.0.0.1:8889 instead (or whatever you set your port number to).
Robert - I suspect you will start to see more and more videos that use Storyboards. Seems like Apple really believes that they are the way to go with app developments. That being said - Storyboards aren't a format - They are simply a way to organize your apps view controllers etc. The code etc. should remain the same for the most part.
Hi paraz51, Try to add this line: mysql_set_charset('utf8'); just after this line $connection = mysql_connect($host, $user, $pass); in your PHP file. Cheers!
Great tutorial. Is there a reason why the data doesn't show when using storyboard? I've created 2 projects one that uses storyboard and one that does not, the one that does not works just like the tutorial but the one that does has no errors but displays no info. Do you know the reason why?
Great tutorial! I am using storyboard and I am having troubles getting my events array to pass values to the labels in the detail view. I have no idea why! the screen is just blank but the cells in the table are populating. Do you have any ideas?
Hi, Vishal. First, I want to thank you so much for making these tutorials. They are helping me a lot. Second, I was wondering if you could make a similar tutorial where the user can send an item to a database, putting it in the table view. Thanks in advance.
For some reason when I finished this and ran it, the Detail View was the content for the table cell above it, so my first table cell couldn't be clicked until I selected the cell below it. In other words, the Detail View doesn't match to its previously Table Cell view. It works in the sense that the database is displaying its content in both views but something must be buggy in my code
Great tutorial, many thanks! But i have a little problem: when i'm simulating my app, my tableview is scrolling automatically to the bottom. When i scroll to top, he is goes again to bottom. How can i fix this? Thanks in advance.
I get this annoying Thread 1: signal SIGABRT error. Everything worked fine and it connected to the database and stuff, then i clicked on a table cell and closed the app, when i opened it again this problem happened and stopped me from opening the application. Great tutorials mate, you are a big help and a great teacher! Please help me with this problem if you can :)
Awesome Tutorial I have a question in my App! I use FMDB in my App and database is Sqlite ! I want to update my Sqlite database without submitting App again ? But I also hope data can keep in my app without internet? Can you tell me how to do ? Thanks
Thanks soo much for being so generous with the knowledge! I had a few ideas but was not sure how to make an app interact with a hosted database. By any chance do you know if Apple have any special req for hosted database?
Hi there! When you say hosted database, do you mean a database that is hosted on a web server? If so - No, you can really use whatever you want - Oracle, MySQL, SQL Server. Whatever you have access to is fine - Remember that the database layer is abstracted away from your app - It really will end up working only with whatever web service you create and doesn't care about the underlying database structure. On the other hand, if you are looking to have the database within your app, that's a different topic and yes there are limitations there.
Anthony - Are you using my JSON feed or one of your own? If you are using your own, the first thing I would check is whether or not your JSON is actually valid - You can use a site like jsonlint(dot)com to check the same.
@vishal kurup:-if the data is not hosted in oracle and mysql server but, data is howted on web server(through some link) then how can we parse that data using json parsing?
Wilfred - I don't have any tutorials but doing so should be fairly straightforward: //String representation of the image URL NSString * imageURLString =@"www.mywebsite.com/image.png"; //Convert the above to an NSURL NSURL * imageURL = [NSURL URLWithString:imageURLString]; //Create an NSData object NSData * imageData = [NSData dataWithContentsOfURL:imageURL]; //Set it to an imageView (assuming myImageView exists) myImageView.image = [UIImage imageWithData:imageData];
Andri - Did you remember to reload your table view? Also - Try setting up a breakpoint to make sure you are in fact getting data back correctly from whatever webservice you have that returns the JSON.
Thanks man for the tutorial.. I followed 4 parts of your tutorial series.. My app throws an run time exception in the main() method…It displays this error "Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name 'CTBViewController'' can you help me what is the error
Based on the error you included, it appears like you have some code that is attempting to use a .xib file -- Check your app delegate. Are you actually using xib files in your project? All the new stuff uses storyboards.
One of the best tutorials I've seen so far on implementing JSON in iOS.
Thank you for taking the time in doing these tutorials. You are helping a lot of people!
In case someone else runs into the same problem, I had no data showing up from my database, and I was able to fix it by simply renaming my php file. It was originally named "test2.php". I guess the number messed it up. I changed it to "json.php".
Anyway, these videos are a life saver. Thanks Vishal!
Thanks Marty!
Amazing :) Worth to add maps to each detailed view!
Such a helpful tutorial Vishal! You're the best.
Thanks for the kind words Mathew!
Javier - Thanks for jumping in and helping paraz!
I have to say i find your Tutorials very very useful and the best i have seen, nice to see up to date tutorials. My app is working great apart from that im using storyboards, ive worked out how to pass data, clicking the first item in the tableview works fine, but when i click on any other item/cell, the app crashes. Im guessing its something to do with reading the correct row but i was hoping you could give me a point in the correct direction.
Thanks in advance
Mark (UK)
Awesome tutorial! Keep up doing these tutorials! :)
thanks soo much vishal.............
this is really helpful for me.
Glad I could help Rahul
Well explained tutorial, Thank you !
Also I was wondering if you have CRUD tutorial on sqlite 3? I couldn't find it in your uploads.
If you have time, can you please make a tutorial on that? Your explanations are very clear and easy to understand. Thanks again.
Thanks for the kind words!
Awesome Tutorial
Thanks you very much. it's very useful for me!.Nice tutorial. I hope you will create more more more video useful like this.
I am working on some new videos. Thanks for the kind words!
Can you please make a detailed video going over how you created your database? I have mySQL and Aptana Studio 3 for my php but I don't know if I have done it correctly at all. I really need some help. Thank you so much for your in depth videos, they are very helpful.
Very useful! Thank You!
Sorry, just to add to my last comment, I got the info for using Storyboards from your other tutorial ( master detail one with Star Wars characters) Works fine for the first cell/row but crashes when passing data from second cell/row
Many Thanks
Mark
Excellent Tutorial and the simplicity of your techniques are fantastic. I have been contemplating using RestKit 2.0 for my project but, it seems to be overkill. Does anyone have any experiences with Restkit 2.0?
Hi, thank you very much for the tutorials.
So far it's working pretty good, except a problem with accents ( é, è, à...).
Do you have any idea for handling it?
Like others i would really appreciate a tutorial about data persistence.
Thanks again.
Its really Awesome tutorial Dude: Keep it up: How to make a Database for music apps.
Thanks Barry!
Could be one of two issues:
1. Your JSON is malformed. An extra character could throw off the Objective-C code.
2. Something wrong with your code in the project - You may want to try adding NSLog statements/breakpoints and see what the various values are at various stages of the program.
Hi - great set of tutorials - seen them all. I'm having some difficulties with the navController and viewController in the Appdelegate.m file. Is there any way you could share the project files for this ?
Thanks a lot for this, it really helped me out. I am using MAMP for the sql and php server working on it locally. I had a lot of issues connecting to the server and found out that the php code didn't like "localhost" as a host name. If anyone has issues with this just use 127.0.0.1:8889 instead (or whatever you set your port number to).
Great tutorials! I am learning iOS. Are there any tutorials on storyboards? I am having trouble passing the data in that format.
Robert - I suspect you will start to see more and more videos that use Storyboards. Seems like Apple really believes that they are the way to go with app developments. That being said - Storyboards aren't a format - They are simply a way to organize your apps view controllers etc. The code etc. should remain the same for the most part.
Awesome Tutorial :D
also can you help me with solution for using json where i need to get images from database.
Thanks
Hi paraz51,
Try to add this line:
mysql_set_charset('utf8');
just after this line
$connection = mysql_connect($host, $user, $pass);
in your PHP file.
Cheers!
Tim and qwerty - Try and do an NSLog on the didSelectRowAtIndexPath method and see which row you are actually passing to the detail view controller.
Dat "Deutschland" tho! I liked your German accent :p
LOL. Danke Miro! BTW - You share the same first name as one of my favorite footballers - Klose!
:) lol yeah he is one of my favorites too. :p
Great tutorial.
Is there a reason why the data doesn't show when using storyboard? I've created 2 projects one that uses storyboard and one that does not, the one that does not works just like the tutorial but the one that does has no errors but displays no info. Do you know the reason why?
Great tutorial! I am using storyboard and I am having troubles getting my events array to pass values to the labels in the detail view. I have no idea why! the screen is just blank but the cells in the table are populating. Do you have any ideas?
Thank you, it's working.
Hi, Vishal. First, I want to thank you so much for making these tutorials. They are helping me a lot. Second, I was wondering if you could make a similar tutorial where the user can send an item to a database, putting it in the table view. Thanks in advance.
Hi Kusumahati - So basically you are asking how one would save data from an iOS app into an external database?
***** It does not have to go to an external database other than the PHP file. If it goes to the PHP file and edits it, it would be perfect too.
For some reason when I finished this and ran it, the Detail View was the content for the table cell above it, so my first table cell couldn't be clicked until I selected the cell below it. In other words, the Detail View doesn't match to its previously Table Cell view. It works in the sense that the database is displaying its content in both views but something must be buggy in my code
Great tutorial, many thanks! But i have a little problem: when i'm simulating my app, my tableview is scrolling automatically to the bottom. When i scroll to top, he is goes again to bottom. How can i fix this? Thanks in advance.
Thanks for this awesome tutorial. My first app is ok up to the pushviewcontroller but when I ran the Detailed view is not loaded and no error. :(
I get this annoying Thread 1: signal SIGABRT error.
Everything worked fine and it connected to the database and stuff, then i clicked on a table cell and closed the app, when i opened it again this problem happened and stopped me from opening the application.
Great tutorials mate, you are a big help and a great teacher!
Please help me with this problem if you can :)
Awesome Tutorial
I have a question in my App! I use FMDB in my App and database is Sqlite ! I want to update my Sqlite database without submitting App again ? But I also hope data can keep in my app without internet? Can you tell me how to do ? Thanks
Thank you very much. :)
You are quite welcome Steven!
Thanks soo much for being so generous with the knowledge! I had a few ideas but was not sure how to make an app interact with a hosted database. By any chance do you know if Apple have any special req for hosted database?
Hi there! When you say hosted database, do you mean a database that is hosted on a web server? If so - No, you can really use whatever you want - Oracle, MySQL, SQL Server. Whatever you have access to is fine - Remember that the database layer is abstracted away from your app - It really will end up working only with whatever web service you create and doesn't care about the underlying database structure. On the other hand, if you are looking to have the database within your app, that's a different topic and yes there are limitations there.
Great. thank you, but what if my URL is nil? It's crash, how can i fix it?
Anthony - Are you using my JSON feed or one of your own? If you are using your own, the first thing I would check is whether or not your JSON is actually valid - You can use a site like jsonlint(dot)com to check the same.
Thank you very much... if I want to implement search?
@vishal kurup:-if the data is not hosted in oracle and mysql server but, data is howted on web server(through some link) then how can we parse that data using json parsing?
why i can't display any data only my tableView ?
i have a breakpoint in - (void) retrieveData;
json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil]; I have the breakpoint in here! what can i do?
How I can to download this app ?
Totally agree :D
I have the same problem did anyone find what was wrong with it?
do you have tutorials on displaying image in IOS having MySql backend
Wilfred - I don't have any tutorials but doing so should be fairly straightforward:
//String representation of the image URL
NSString * imageURLString =@"www.mywebsite.com/image.png";
//Convert the above to an NSURL
NSURL * imageURL = [NSURL URLWithString:imageURLString];
//Create an NSData object
NSData * imageData = [NSData dataWithContentsOfURL:imageURL];
//Set it to an imageView (assuming myImageView exists)
myImageView.image = [UIImage imageWithData:imageData];
thanks... for your response and your tutorials.. I've already figured it out... you really helped me bigtime
My table doesn't show up the data from the json, but I use NSLOG for counting array is get the number... please help..
Andri - Did you remember to reload your table view? Also - Try setting up a breakpoint to make sure you are in fact getting data back correctly from whatever webservice you have that returns the JSON.
Thanks man for the tutorial.. I followed 4 parts of your tutorial series.. My app throws an run time exception in the main() method…It displays this error "Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle (loaded)' with name 'CTBViewController'' can you help me what is the error
Based on the error you included, it appears like you have some code that is attempting to use a .xib file -- Check your app delegate. Are you actually using xib files in your project? All the new stuff uses storyboards.
i love your voice
the site replies Valid JSON. I'm using my own json.