This is my submission of a programming test, the features include:
- display top 10 grossing apps from HK iTunes store
- display top 100 free apps from HK iTunes store
- provide search by keyword to filter the displayed apps
Following is a sample screenshot for the running application:
There are 3 iTunes data API used, all data are acquired from the Hong Kong store
- https://itunes.apple.com/hk/rss/topgrossingapplications/limit=10/json
- https://itunes.apple.com/hk/rss/topfreeapplications/limit=100/json
- https://itunes.apple.com/hk/lookup?id=[app_id]
Xcode, tested on Xcode Version 9.2 (9C40b)
iOS 11.2
CocoaPods is required to handle dependencies:
sudo gem install cocoapods
Managed by CocoaPods. Frameworks used are:
- Alamofire: Alamofire 4.6+
- SwiftyJSON: SwiftyJSON 4.0.0+
- Kingfisher: Kingfisher 4.0+
- Cosmos: Cosmos 15.0+
After cloning the project, pods need to be initialized.
pod install
When all dependecies are installed, open AppListing.xcworkspace in Xcode.
Code signing for the target AppListing will need to be updated before the project can be built and run.
Bundle identifier might need to be changed depending on the provisioning profile for code signing.
It seems that there is a difference in the app rating information, between the ones displayed on the iTunes page, and the ones returned by the lookup API (https://itunes.apple.com/hk/lookup?id=[app_id])
Take WhatsApp Messenger (id 310633997) as an example:
are showing different rating information for me.
For the sake of this application, the ratings displayed are the ones from the lookup API.
Rating displayed is the average user rating, and the count is the user rating count.
There was a similar issue a few years ago on the discussion forum.
The problem for the OP was a missing store in the URL, it doesn't seem to be the case for me.