سؤال

I am trying to do what is asked in this question. My approach is to get the list of the supported devices, which (results taken from current Yelp App), could be an array much like this one:

["iPhone4S", "iPhone5s", "iPadMini4G", "iPodTouchourthGen", "iPadFourthGen4G", "iPhone-3GS", "iPhone4", "iPadThirdGen", "iPad2Wifi", "iPadThirdGen4G", "iPadMini", "iPad23G", "iPhone5", "iPadFourthGen", "iPhone5c", "iPodTouchFifthGen"]

Then, for each of these device name strings, I would determine the latest supported iOS version and write it to an array. Then, from that array of newest supported iOS versions, taking the oldest iOS version should equal the iOS version necessary to run the app.

My problem is finding the latest supported version based on Apple's input string like "iPodTouchourthGen", especially considering that this string, typo and all, has been taken directly from their search API results.

So far, what I found is this: http://www.everyi.com/by-capability/maximum-supported-ios-version-for-ipod-iphone-ipad.html

But on that website, the title strings differ from Apple's, making the matching rather hard. I thought, before hardcoding complicated matches, is there perhaps an API that would return me the supported OS versions, or at least some Apple-curated XML or JSON list?

هل كانت مفيدة؟

المحلول

You can use cj's great Firmware Links project. They have a nice API, though you'll probably have to manually maintain a mapping from the iTunes search models to the actual hardware models (i.e. "iPhone4" -> iPhone3,2, "iPhone4S" -> iPhone4,1, etc.)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top