JSON Parsing Tutorial - Xcode 4.5 - Top 10 iTunes Albums

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

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

  • @jburt1992
    @jburt1992 12 ปีที่แล้ว

    Thank you for the extremely helpful tutorial. Few appreciative viewers who gain a ton of knowledge watching your videos trumps thousands of people who don't care. Props man!

  • @geordiejohn3703
    @geordiejohn3703 12 ปีที่แล้ว

    Thank you so much, it works for me and I only started working with Xcode a couple of weeks ago! Prior to that I had never done any programming. You have a real talent. I look forward to the next tutorial. Thanks again for sharing your knowledge.

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

    Hey man, I'd like to thank you for making this tutorial - it helped me out so much. Very informative and clear. Liked and subscribed!

  • @mohawklanguage
    @mohawklanguage 12 ปีที่แล้ว

    I just started learning how to develop iOS6 / objective-c since about August this year and really appreciate your video tutorial. Thanks so much for sharing your knowledge.

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

    The only tutorial I could find that made sense. Thanks!

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

    Very good tutorial. Clear and well-paced. And most of all.. it works in the end.

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

    thank you best json tutorial so far

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

    Really good tutorial, friend. Thanks for the tutorial. keep it up.

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

    awesome tutorial! learnt something about parsing and json!

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

    Very Good Tutorial !! Thanks from Argentina!

  • @BradWoodard
    @BradWoodard 12 ปีที่แล้ว

    Nice tutorial. Thank you! Question for you: How can I pull down the entire object associated with "entry" and use the various object variables in the app? For example, I'd also like to pull down the image and display in the table view with the album title, then selecting a row might load a detail view controller with the image, album title, artist name, and release date.

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

    Great tutorial. I got it to work with my own JSON data. Question going forward. You labeled the cells with values in an array. How could you save two values for each entry, (like title and artist) and then for each cell, print the Title and then the artist below it. Maybe just a hint to get me started :)

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

    awesome tutorial man ,, really understandable and a good job ..

  • @amardesai7149
    @amardesai7149 12 ปีที่แล้ว

    This was a very helpful video. Thank you.

  • @sankisstha
    @sankisstha 12 ปีที่แล้ว

    great tutorial.. just what i needed.. thanks

  • @fpskil
    @fpskil 12 ปีที่แล้ว

    this tutorial is exactly what i was looking for, so thank you. one question i have tho, is if you can attach this to a progress bar when you hit the button. also how would you go about implementing a search field so you could manually in the app replace the number 10 with 20, 100, etc.. please help if you can. thanks for your time :D

  • @psp3105
    @psp3105 12 ปีที่แล้ว

    @iffytheperfect1983 thank you very much. Got it working now. Great tutorial by the way, keep up the good work!

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

    Thank You !! :) Good Job From Egypt

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

    Really nice tutorial, thank you sir.

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

    @iffytheperfect1983 Great tutorial really helped me out but how would I add the title to an array and the summary to a different array?
    Thanks for any help

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

    Great tutorial ... really helpful

  • @aleksandrgrey9090
    @aleksandrgrey9090 12 ปีที่แล้ว

    Awesom tuts!!! Thank you so much! How can i connect with you, to ask some question regardin programming?

  • @xCodeSoul
    @xCodeSoul 12 ปีที่แล้ว

    thank you very much
    but what if want do this
    click on row and see in another view the album poster and rating ...
    it's just load the data , but we can't use the data

  • @rhiannasilel
    @rhiannasilel 12 ปีที่แล้ว

    Thanks again, for helping me keep my GPA.:)

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

    Thank you very much .. excellent tutorial .. very much appreciate it.

  • @DanishCoding
    @DanishCoding 12 ปีที่แล้ว

    Hi, thank you for your great video! I have one question, why do you make your storyboard connections weak? is it wrong if i make them strong? thank you! :-)

  • @ElBlueDemos
    @ElBlueDemos 12 ปีที่แล้ว

    great tutorial, i really enjoy the exercise, now i attempt to segue json data to a detailViewController, hope you can suggest a method, thank's for tutorial!

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

    You are my hero! Thank you!

  • @sidewalkgoat
    @sidewalkgoat 12 ปีที่แล้ว

    Awesome tutorial. I have a quick question. I followed your code and I'm able to display one NSString of data how can I display multiple? Here is where my problem is:
    for (NSDictionay *diction in arrayOfEntry) {
    NSString *currDate = [diction objectForKey:@"Current Date"];
    [array addObject:currDate];
    }
    So basically I want to pull in another row in addition to currDate and the rest of my code is exactly the same as yours I know this is where the add has to be but I just can't get it to work.

  • @armchairpenguin
    @armchairpenguin 12 ปีที่แล้ว

    Thanks very much for this tutorial - I'm getting inconstent data too - the problem is with the JSON supplied by itunes being slightly out of date - not your code :)

  • @BradWoodard
    @BradWoodard 12 ปีที่แล้ว

    Ok. Did some work and found a way to pull multiple variables to the device for display. I create a custom class of type NSObject, assign it properties and populate with values from the iTunes query. Here's a sample:
    for (NSDictionary *diction in arrayOfEntry) {
    album *newAlbum = [[album alloc] init];
    NSDictionary *title = [diction objectForKey:@"im:name"];
    newAlbum.title = [title objectForKey:@"label"];
    etc.
    [array addObject:newAlbum];
    This works but is there an easier way?

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

    Great tutorial, it helped a lot lot..
    thank u so much ..

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

    Hi Iffy, nice tutorial, but when run a project is one warring "Unused variable label" and when i tap a button the app connect, but in the tableview I see just the string "label". where am I doing wrong?
    Thanks

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

    Thanks for the tutorial. I would appreciate if you could show how to add images to the tableview as well. So there would be an image and a title in the cell.

  • @cayte3
    @cayte3 12 ปีที่แล้ว

    awesome tutorial, Thank you!

  • @imjustshan
    @imjustshan 12 ปีที่แล้ว

    Hey! Thanks so much for this tut. Quick question... I have modified this so that a user can enter in a domain name via a text box. Once I check an active domain name and get a successful connection, all other domain names entered return the same result. Is there any way to clear out the previous.. basically i am just checking to see if the site returns a status code of 200.. if it doesn't then I want a message that the site is down. I can't reload the table data bc I am not using a table.

  • @iffytheperfect1983
    @iffytheperfect1983  12 ปีที่แล้ว

    I thought that Making it UITableViewCell would fix it.
    can you copy and paste the error message?

  • @TheGlamorous99
    @TheGlamorous99 8 ปีที่แล้ว

    'connectionWithRequest:delegate' is deprecated. "Use NSURLSession"
    any suggestions on this breakpoint?

  • @AlexcForsyth
    @AlexcForsyth 12 ปีที่แล้ว

    Wow! this is great!
    I'm trying to do the same thing but the first JSON starts with "[]"; can you help me figure out what is wrong with this code:
    NSArray *allDataArray = [NSJSONSerialization JSONObjectWithData:webData options:0 error:nil];
    NSDictionary *entryDiction = [allDataArray objectForKey:@"entry"];
    .....
    its exactly the same code as the video... just the JSON starts as an array and not a Dictionary

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

    I'm using this same URI but with help of Eclipse IDE + GWT, i'm getting a null result incoming of the RPC call. Solutions?

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

    I'm having a similar error.
    "Property 'text' cannot be found in forward class object 'UILabel' "
    btw, I'm using Xcode 4.6. Can you help me?

  • @qwewq123456789
    @qwewq123456789 12 ปีที่แล้ว

    How would I reload the data? When I push the button it does nothing - the data only reloads when I kill the app and reload it.

  • @Stisse12
    @Stisse12 12 ปีที่แล้ว

    How is this JSON parsing performance comparing to Jquery mobile? Jquery mobile and JSON is a disaster in performance.
    Is it possible to get the source for this?
    Iam new to xcode and following along almost, Great work! Thanks

  • @emilfroberg
    @emilfroberg 12 ปีที่แล้ว

    I still get the same error messages,: "textLabel not found on any type of UITavbleView" and "expected identifier"... I think it had something to do with "textLabel"...

  • @mlojko7
    @mlojko7 12 ปีที่แล้ว

    I getting this error: No visible @interface for 'NSMutableData declares the selector 'options:error:'
    Any suggestions?
    thanks

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

    Hi Love the tutorial but I think the reason why you had an issue with the data matching in your video it's because you parse the data from JSON object and usually if we don't have an index value for our data the data will display at random so thanks again

  • @webcoderph
    @webcoderph 12 ปีที่แล้ว

    hi im new to objective c :D on connection didReceiveResponse. why did you set the data length to 0? why 0? sorry.im a noob.thanks

  • @prasadsripathi
    @prasadsripathi 12 ปีที่แล้ว

    simple tutorial. was informative

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

    hi this was great tutorial

  • @emilfroberg
    @emilfroberg 12 ปีที่แล้ว

    The last line of code doesn't work. "cell.textLabel.text = [[array objectAtIndex:indexPath.row];"
    I get the errors: Property "textLabel not found on any type of "UITableView *" and Expected identifier..... Help?

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

    How can I go into the NSDictionary 0 or 1 I tried this but it don't works:
    NSDictionary *feed = [allDetailDictionary objectForKey:@"feed"];
    NSArray *arrayOfEntry = [feed objectForKey:@"entry"];
    for (NSDictionary *diction in arrayOfEntry) {
    NSDictionary *rowNumber = [diction objectForKey:@"0"];
    NSDictionary *titel = [rowNumber objectForKey:@"titel"];
    NSString *label = [titel objectForKey:@"label"];
    [self.objects addObject:label];
    }

  • @iffytheperfect1983
    @iffytheperfect1983  12 ปีที่แล้ว

    You can have textfield or something and grab the number entered by the user.. For example: If user entered 20.. replace the
    NSURL *url = [NSURL URLWithString:@"h t t p ://itunes.apple.com/us/rss/topalbums/limit=10/json"];
    With
    NSString *number = @"20"; // number that user entered
    NSString *urlStr = [NSString stringWithFormat:@"h t t p ://itunes.apple.com/us/rss/topalbums/limit=%d/json", [number intValue]];
    NSURL *url = [NSURL URLWithString:urlStr];
    Then from there, everything else is same.

  • @AlexcForsyth
    @AlexcForsyth 12 ปีที่แล้ว

    i keep getting sigabrt! i really cant see what i'm doing wrong, is there any way you could upload the source code?

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

    if i want to load album image to the tableview to the each album title then how to code in this same tutorial ??? +iffytheperfect1983

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

    This still isn't working - would you be able to repost please?

  • @ShravanKumar-dp7mi
    @ShravanKumar-dp7mi 10 ปีที่แล้ว

    Excellent...!

  • @AnishaFatima-dd7hj
    @AnishaFatima-dd7hj 10 ปีที่แล้ว

    nice tutorial, thank you

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

    If i want to load the iTunes albums starts without the top 10 button what can i do?

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

      If you would want to load the data without using the button, put the button code in the viewDidLoad method. Hope this works for you.

  • @deepaksinghnegi9930
    @deepaksinghnegi9930 10 ปีที่แล้ว +1

    thank you :) nice work

  • @xHybridSoul
    @xHybridSoul 12 ปีที่แล้ว

    You rock!!!!!!!!!!!!!!!!!!!!!

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

    thank you for this :)

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

    It's usually good to intialize things to 0 in programming. For example, when he creates the NSMutableData, it's possible that it might be full of garbage to start (at least thats how it would work in C++). He's he's using the method appendData:, we want to make sure there's nothing there. Appending data to garbage is no good. :)

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

    I think I found the problem, I replaced the line with:
    "cell.text = [array objectAtIndex:indexPath.row];"

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

    cell.text is deprecated, use cell.textLabel.text (If you're running iSO 3.0 or higher.

  • @psp3105
    @psp3105 12 ปีที่แล้ว

    Github page doesnt exist for me! Are you sure its public?!

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

    Amazing tutorial, thanks :)
    PS: I wrote if (!connection) and had to re-watch the whole thing :((.

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

    i am getting error in online viewer

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

    Thank you!

  • @iffytheperfect1983
    @iffytheperfect1983  12 ปีที่แล้ว

    Change to UITableViewCell instead of UITableView.
    That should do the trick.
    Hope that fixes it :)

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

    You are getting this error because you probably forgot to change the last query name from xml to json! The last phrase will be /json not /xml

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

    thank you so much

  • @emilfroberg
    @emilfroberg 12 ปีที่แล้ว

    Nope, I still get the same errors :(

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

    Thanks a lot

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

    Thank you

  • @qwewq123456789
    @qwewq123456789 12 ปีที่แล้ว

    Figured it out. Here's the code:
    - (IBAction)nameIn.hFile {
    NSURL *url = [NSURL URLWithString:@"yourURL"];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    connection = [NSURLConnection connectionWithRequest:request delegate:self];
    if (connection)
    {
    webData = [[NSMutableData alloc] init];
    }
    [[self myTableView]setDelegate:self];
    [[self myTableView]setDataSource:self];
    array = [[NSMutableArray alloc] init];
    }

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

    good video but i highly recommend AFNetworking to do this.

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

    Legal!

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

    Same here

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

    You make me nervers. But it's a great Tutorial.

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

    great tutorial ut im getting a sigabrt

  • @maanu58
    @maanu58 8 ปีที่แล้ว

    good one (Y)

  • @iffytheperfect1983
    @iffytheperfect1983  12 ปีที่แล้ว

    Yea, Maybe type it in. I tried copy and pasting and some extra characters came up also. just ignore the htt p s and type in github dot com slash iffytheperfect1983 slash jsonparsingtutorial. That worked for me

  • @iffytheperfect1983
    @iffytheperfect1983  12 ปีที่แล้ว

    Yea, I uploaded the source just now. Check out here
    h t t p s : / / g ithub.com/iffytheperfect1983/j­sonparsingtutorial