2012-12-26 36 views
2

supportedDevices鍵是否總是爲iphone應用程序返回「all」?我只對iphone應用程序感興趣,而不是ipad應用程序,所以我想知道在supportedDevices中尋找什麼值以確保它是iphone應用程序。Apple Search API supportedDevices key

http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html

蘋果的API文檔相當有限。 supportedDevices項的可能值是多少?

有沒有一種情況下,一個應用程序可用於iPhone,但不適用於iPad?

編輯:

我只注意到這個例子中,https://itunes.apple.com/lookup?id=492861440

我怎麼會去確定這個程序是合法的iPhone?我會使用關鍵的「kind」,「features」還是會遍歷「supportedDevices」?我需要一個防彈的方法來確保它是一款iPhone應用程序。

回答

1

All iPhone apps will run on iPad,而iPad應用程序不會在iPhone上運行,除非它們具有適當大小的XIB/Storyboard /資源。

看着你指出來,我可以看到「supportedDevices」這個例子回來爲:

"supportedDevices":["iPad2Wifi", "iPadWifi", "iPad23G", "iPad3G"] 

(不知道爲什麼不說「iPad4」)

,什麼是這裏重要它不會說「全部」或「iPhone」,所以如果你在JSON結果中沒有看到這兩個關鍵字,那麼你應該安全地假設它只是iPad。

+0

https://itunes.apple.com/lookup?id=363714043 這個程序只能運行在iPad上,你可以在supportedDevices看到,但它是一種「軟件」,而不是「ipadSoftware」 所以我不我不認爲我只能用軟件來判斷它是否在iphone上 –