Apologies
You must be signed in to watch this lesson.
iTunes Reviews JSON
AppStore JSON APIs
We're almost done with rendering the details regarding the applications that we click into. This lesson will cover how to parse out the review JSON from the available iTunes API. Enjoy.

Comments (6)
Tube
5 years ago
Why not use sections to handle the various cells instead of using cascading if statements?
Brian Voong
5 years ago
Tube
5 years ago
Hmm. I guess you're right. The child vcs have made the collection for a page one dimensional.
romesh
4 years ago
Hi Brian... Strange but the URL doesn't return anything...did apple change something?
Brian Voong
4 years ago
romesh
4 years ago
Strange thing... I copied and pasted the url above on Firefox and gives an empty array. I will try again and let you know... cheers
dclawson
4 years ago
Brian answers this above, but it's not an error, there just aren't any reviews for the search result. This is 8 months later, so you've probably already moved on, but I got the same thing. If you haven't tried this, add the "JSON Viewer" extension in Chrome and then it'll come up just like Brian has it and you can inspect the results of the query. In my case (Early Jan 2020) the results don't have a review. I'm assuming that as I go forward in the lesson, some of the apps that we'll have in the feed will have some available to display.
romesh
4 years ago
thanks a lot... super helpful...I thought I did something wrong
Phsartech
4 years ago
Hi Brain, I got the result of JSON data different from the JSON data in the video. does it has been change?
Brian Voong
4 years ago
dclawson
4 years ago
Also, it could return no reviews.
jdhindsa
4 years ago
Can't you set the UILayoutPriority parameter of the content resistance method to UILayoutPriority.defaultLow? It seems to work. I don't understand what .init(0) means.
dclawson
4 years ago
This article might help: https://medium.com/@dineshk1389/content-hugging-and-compression-resistance-in-ios-35a0e8f19118
dclawson
4 years ago
FWIW, at the end when Brian right-aligns the text: I was curious and put the UIView() back into the UIStackView that has the title label and the author label, and the spacing worked again.
Brian Voong
4 years ago
dclawson
4 years ago
Yeah, looking forward to getting into SwiftUI more. Thanks again.
frankusu
3 years ago
Hey Brian, running your project and changing the "Reviews & Ratings" Label to font 20->24 I get the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values. The relevant UICollectionViewFlowLayout instance is <UICollectionViewFlowLayout: 0x7fdf805a8880>, and it is attached to <UICollectionView: 0x7fdf81910000; frame = (0 0; 414 211.333); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x6000035e82a0>;... I increased the cell height from 280 to 350 and the warning goes away. My questions are how to increase font size without adding extra space to the end of Review Cell? Seems like a waste Also, how do I make use of the 0x7fdf81910000 that Xcode tells me. Where can I look at that element to debug? Thanks Brian!
Brian Voong
3 years ago
frankusu
3 years ago
Cool thanks Brian!
HELP & SUPPORT