How to download app icon from web?

Discussion in 'iOS Programming' started by mikezang, Apr 17, 2012.

  1. mikezang macrumors 6502a

    Joined:
    May 22, 2010
    Location:
    Tokyo, Japan
    #1
  2. truehybridx macrumors member

    Joined:
    Dec 6, 2010
    #2
    Stealing's bad mmkay?


    Just download the app in iTunes, show it in finder, open with a Zip utility
     
  3. mikezang thread starter macrumors 6502a

    Joined:
    May 22, 2010
    Location:
    Tokyo, Japan
    #3
    I just want to show app info with its icon like AppBank..
     
  4. bindle macrumors regular

    Joined:
    Aug 29, 2008
    #4
    Apple have a JSON web service for retrieving details from store items.

    http://www.apple.com/itunes/affilia...tion/itunes-store-web-service-search-api.html

    For example if you know the ID, http://itunes.apple.com/lookup?id=408671117 would return a JSON file with the following:

    Code:
    {
    
        "resultCount": 1,
        "results": [
            {
                "kind": "software",
                "features": [
                    "iosUniversal"
                ],
                "supportedDevices": [
                    "all"
                ],
                "isGameCenterEnabled": false,
                "screenshotUrls": [
                    "http://a1.mzstatic.com/us/r1000/063/Purple/v4/cc/6f/8c/cc6f8c3c-72e5-64e3-61ac-ba891a3e4f75/mzl.ksovqfvx.jpg",
                    "http://a5.mzstatic.com/us/r1000/097/Purple/v4/fc/e4/ec/fce4ecfc-9071-e5f3-d771-f5ca24dbaf3d/mzl.ujhafrgn.jpg",
                    "http://a1.mzstatic.com/us/r1000/111/Purple/v4/39/16/94/391694f1-93c6-a913-6698-e1d80c13d0a2/mzl.juuqoppw.png",
                    "http://a5.mzstatic.com/us/r1000/079/Purple/v4/39/82/fa/3982fa24-3439-c1b1-fe2b-c5cf7310948a/mzl.gwnhxdxo.jpg",
                    "http://a3.mzstatic.com/us/r1000/070/Purple/v4/e8/03/d9/e803d95e-3e37-0308-c5e0-7a8d347d5781/mzl.pqwhijxz.jpg"
                ],
                "ipadScreenshotUrls": [
                    "http://a1.mzstatic.com/us/r1000/073/Purple/v4/12/bb/58/12bb58fe-c2f2-4c5d-e437-fba85322e197/mzl.buzwieku.1024x1024-65.jpg",
                    "http://a1.mzstatic.com/us/r1000/060/Purple/v4/d6/30/05/d6300510-253b-d584-b351-93a10977f088/mzl.kcpxdnxv.1024x1024-65.jpg",
                    "http://a3.mzstatic.com/us/r1000/064/Purple/v4/ab/23/f8/ab23f898-3eae-3fa9-6548-1758efadc01e/mzl.ktyymoqr.1024x1024-65.jpg",
                    "http://a5.mzstatic.com/us/r1000/112/Purple/v4/50/a4/c8/50a4c82e-eda6-6e4c-ab62-e4c3165234d3/mzl.aoepwqfh.1024x1024-65.jpg",
                    "http://a2.mzstatic.com/us/r1000/114/Purple/v4/5c/97/01/5c9701cf-a4f1-6c8d-71cb-98d989178cb9/mzl.xjozkigq.1024x1024-65.jpg"
                ],
                "artworkUrl60": "http://a1.mzstatic.com/us/r1000/118/Purple/v4/09/3b/c7/093bc72b-e281-bbb9-0241-09906fb46e02/Icon.png",
                "artworkUrl512": "http://a3.mzstatic.com/us/r1000/074/Purple/v4/2d/08/1c/2d081c12-189b-6756-8752-e6851fda710b/mzl.bvrohbme.png",
                "artistViewUrl": "http://itunes.apple.com/us/artist/zangland.com/id408671120?uo=4",
                "artistId": 408671120,
                "artistName": "zangland.com",
                "price": 0,
                "version": "1.7.1",
                "description": "This application can show recent important market events or schedules.\nAll Events are divided into Japan market or world market.\nAll events can be save to Calendar, send to Twitter and Post to Facebook.",
                "genreIds": [
                    "6015",
                    "6000"
                ],
                "releaseDate": "2010-12-17T11:55:07Z",
                "sellerName": "Zhengrong Zang",
                "currency": "USD",
                "genres": [
                    "Finance",
                    "Business"
                ],
                "bundleId": "com.zangland.MarketEvent",
                "trackId": 408671117,
                "trackName": "Market Event",
                "primaryGenreName": "Finance",
                "primaryGenreId": 6015,
                "releaseNotes": "1. Show Event since last month\n2. Ready for iPad Retina\n3. Bug fix",
                "wrapperType": "software",
                "trackCensoredName": "Market Event",
                "languageCodesISO2A": [
                    "EN",
                    "JA",
                    "ZH"
                ],
                "fileSizeBytes": "5843577",
                "sellerUrl": "http://",
                "contentAdvisoryRating": "4+",
                "artworkUrl100": "http://a3.mzstatic.com/us/r1000/074/Purple/v4/2d/08/1c/2d081c12-189b-6756-8752-e6851fda710b/mzl.bvrohbme.png",
                "trackViewUrl": "http://itunes.apple.com/us/app/market-event/id408671117?mt=8&uo=4",
                "trackContentRating": "4+"
            }
        ]
    
    }
    
    Depending on what platform/language you're using, there's probably a JSON framework/API to easily pull what you want from the data
     
  5. mikezang thread starter macrumors 6502a

    Joined:
    May 22, 2010
    Location:
    Tokyo, Japan
    #5
    Thank you very much! This is what I need.
     
  6. mikezang thread starter macrumors 6502a

    Joined:
    May 22, 2010
    Location:
    Tokyo, Japan
    #6
    Sorry for simple question, now I got search results in NSDictionary, how can I get one of value for a specific key, for example "trackName"?
    NSDictionary *json = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&error];
    NSDictionary *results = [json objectForKey:mad:"results"];

    I am not sure how to get it...
     
  7. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #7
    You need to understand what your data actually is. Then you can interpret and use it properly.

    Look at your JSON text:
    Code:
    {
        "resultCount": 1,
        "results": [
            {
                "kind": "software",
    
    Do you see the [ after the "results": ? Do you realize that in JSON [ ] means an array?

    Now look at your code:
    Code:
    	NSDictionary *results = [json objectForKey:@"results"];
    
    If the JSON object is really an array, is storing that object into an NSDictionary variable going to work?
     
  8. mikezang thread starter macrumors 6502a

    Joined:
    May 22, 2010
    Location:
    Tokyo, Japan
    #8
    Thanks for your reply. I just got it as below:
    Code:
        NSDictionary *json = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&error];
        NSArray *results = [json objectForKey:@"results"];
        
        NSArray *trackName = [results valueForKey:@"trackName"];
    
     

Share This Page