Determine device (iPhone, iPod Touch) with iOS

后端 未结 30 1759
礼貌的吻别
礼貌的吻别 2020-11-21 11:29

Is there a way to determine the device running an application. I want to distinguish between iPhone and iPod Touch, if possible.

30条回答
  •  我在风中等你
    2020-11-21 11:52

    Please feel free to use this class (gist @ github)

    CODE REMOVED AND RELOCATED TO

    https://gist.github.com/1323251

    UPDATE (01/14/11)

    Obviously, this code is a bit out of date by now, but it can certainly be updated using the code on this thread provided by Brian Robbins which includes similar code with updated models. Thanks for the support on this thread.

提交回复
热议问题