iOS Tutorial: JSON Part 4 - Loading data from an external database into an app

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ธ.ค. 2024

ความคิดเห็น • 69

  • @barryjulien7489
    @barryjulien7489 11 ปีที่แล้ว

    One of the best tutorials I've seen so far on implementing JSON in iOS.

  • @bsventertainment
    @bsventertainment 11 ปีที่แล้ว

    Thank you for taking the time in doing these tutorials. You are helping a lot of people!

  • @MartyMM
    @MartyMM 10 ปีที่แล้ว

    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!

  • @fengson362
    @fengson362 11 ปีที่แล้ว

    Amazing :) Worth to add maps to each detailed view!

  • @MathewAntony31
    @MathewAntony31 11 ปีที่แล้ว

    Such a helpful tutorial Vishal! You're the best.

    • @VishalKurup
      @VishalKurup  11 ปีที่แล้ว

      Thanks for the kind words Mathew!

  • @VishalKurup
    @VishalKurup  11 ปีที่แล้ว

    Javier - Thanks for jumping in and helping paraz!

  • @markbirkett6618
    @markbirkett6618 11 ปีที่แล้ว

    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)

  • @balestrapatrick
    @balestrapatrick 11 ปีที่แล้ว

    Awesome tutorial! Keep up doing these tutorials! :)

  • @rahulmahajan3135
    @rahulmahajan3135 11 ปีที่แล้ว

    thanks soo much vishal.............
    this is really helpful for me.

    • @VishalKurup
      @VishalKurup  11 ปีที่แล้ว

      Glad I could help Rahul

  • @jonprasetyo
    @jonprasetyo 11 ปีที่แล้ว

    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.

  • @VishalKurup
    @VishalKurup  11 ปีที่แล้ว

    Thanks for the kind words!

  • @irfanucs
    @irfanucs 9 ปีที่แล้ว

    Awesome Tutorial

  • @HoangIT21
    @HoangIT21 11 ปีที่แล้ว

    Thanks you very much. it's very useful for me!.Nice tutorial. I hope you will create more more more video useful like this.

    • @VishalKurup
      @VishalKurup  11 ปีที่แล้ว

      I am working on some new videos. Thanks for the kind words!

  • @EXRaidLeader
    @EXRaidLeader 11 ปีที่แล้ว

    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.

  • @multiplebogey
    @multiplebogey 11 ปีที่แล้ว

    Very useful! Thank You!

  • @markbirkett6618
    @markbirkett6618 11 ปีที่แล้ว

    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

  • @AnthonyDerasmo
    @AnthonyDerasmo 11 ปีที่แล้ว

    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?

  • @paraz51
    @paraz51 11 ปีที่แล้ว

    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.

  • @ThaKurmastersios7
    @ThaKurmastersios7 11 ปีที่แล้ว

    Its really Awesome tutorial Dude: Keep it up: How to make a Database for music apps.

  • @VishalKurup
    @VishalKurup  11 ปีที่แล้ว

    Thanks Barry!

  • @VishalKurup
    @VishalKurup  11 ปีที่แล้ว

    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.

  • @dabeetle
    @dabeetle 11 ปีที่แล้ว

    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 ?

  • @beauclark8593
    @beauclark8593 11 ปีที่แล้ว

    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).

  • @VillageProfileMedia
    @VillageProfileMedia 11 ปีที่แล้ว

    Great tutorials! I am learning iOS. Are there any tutorials on storyboards? I am having trouble passing the data in that format.

    • @VishalKurup
      @VishalKurup  11 ปีที่แล้ว

      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.

  • @siddarthpolishetty
    @siddarthpolishetty 11 ปีที่แล้ว

    Awesome Tutorial :D
    also can you help me with solution for using json where i need to get images from database.
    Thanks

  • @Geekz34
    @Geekz34 11 ปีที่แล้ว

    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!

  • @VishalKurup
    @VishalKurup  11 ปีที่แล้ว

    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.

  • @MiroMarkarian
    @MiroMarkarian 11 ปีที่แล้ว +1

    Dat "Deutschland" tho! I liked your German accent :p

    • @VishalKurup
      @VishalKurup  11 ปีที่แล้ว

      LOL. Danke Miro! BTW - You share the same first name as one of my favorite footballers - Klose!

    • @MiroMarkarian
      @MiroMarkarian 11 ปีที่แล้ว

      :) lol yeah he is one of my favorites too. :p

  • @reatomorris2448
    @reatomorris2448 11 ปีที่แล้ว

    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?

  • @michaelbuckman5676
    @michaelbuckman5676 11 ปีที่แล้ว

    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?

  • @paraz51
    @paraz51 11 ปีที่แล้ว

    Thank you, it's working.

  • @kusumahatitan4558
    @kusumahatitan4558 10 ปีที่แล้ว

    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.

    • @VishalKurup
      @VishalKurup  10 ปีที่แล้ว

      Hi Kusumahati - So basically you are asking how one would save data from an iOS app into an external database?

    • @kusumahatitan4558
      @kusumahatitan4558 10 ปีที่แล้ว

      ***** 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.

  • @qwertydeez17
    @qwertydeez17 11 ปีที่แล้ว

    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

  • @timmakniks4395
    @timmakniks4395 11 ปีที่แล้ว

    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.

  • @an2nymack
    @an2nymack 11 ปีที่แล้ว

    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. :(

  • @LetsPHP
    @LetsPHP 11 ปีที่แล้ว

    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 :)

  • @0805bryan
    @0805bryan 11 ปีที่แล้ว

    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

  • @CaptainPumpkin9
    @CaptainPumpkin9 11 ปีที่แล้ว

    Thank you very much. :)

    • @VishalKurup
      @VishalKurup  11 ปีที่แล้ว

      You are quite welcome Steven!

  • @0dudesome
    @0dudesome 11 ปีที่แล้ว

    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?

    • @VishalKurup
      @VishalKurup  11 ปีที่แล้ว

      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.

  • @rsimenok
    @rsimenok 11 ปีที่แล้ว

    Great. thank you, but what if my URL is nil? It's crash, how can i fix it?

  • @VishalKurup
    @VishalKurup  11 ปีที่แล้ว

    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.

  • @giuseppefigliolia6168
    @giuseppefigliolia6168 11 ปีที่แล้ว

    Thank you very much... if I want to implement search?

  • @manaspathak4914
    @manaspathak4914 10 ปีที่แล้ว

    @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?

  • @yy33k
    @yy33k 11 ปีที่แล้ว

    why i can't display any data only my tableView ?
    i have a breakpoint in - (void) retrieveData;

  • @yy33k
    @yy33k 11 ปีที่แล้ว

    json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil]; I have the breakpoint in here! what can i do?

  • @elektrokote
    @elektrokote 11 ปีที่แล้ว

    How I can to download this app ?

  • @rosscomt5295
    @rosscomt5295 11 ปีที่แล้ว

    Totally agree :D

  • @timmcuk
    @timmcuk 11 ปีที่แล้ว

    I have the same problem did anyone find what was wrong with it?

  • @wilfredvillanueva4052
    @wilfredvillanueva4052 11 ปีที่แล้ว

    do you have tutorials on displaying image in IOS having MySql backend

    • @VishalKurup
      @VishalKurup  11 ปีที่แล้ว

      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];

    • @wilfredvillanueva4052
      @wilfredvillanueva4052 11 ปีที่แล้ว

      thanks... for your response and your tutorials.. I've already figured it out... you really helped me bigtime

  • @AndriAriPratama
    @AndriAriPratama 11 ปีที่แล้ว

    My table doesn't show up the data from the json, but I use NSLOG for counting array is get the number... please help..

    • @VishalKurup
      @VishalKurup  11 ปีที่แล้ว

      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.

  • @andrioid1
    @andrioid1 11 ปีที่แล้ว

    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

    • @VishalKurup
      @VishalKurup  11 ปีที่แล้ว

      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.

  • @Gattomorto12
    @Gattomorto12 11 ปีที่แล้ว

    i love your voice

  • @an2nymack
    @an2nymack 11 ปีที่แล้ว

    the site replies Valid JSON. I'm using my own json.