Detect Device Version – iPhone 2G, 3G, 3Gs, 4, 4s, iPad 1, iPad2, iPad3

Sometimes, Your application might need to check which device is being used by the user.
For example – My App needs to track that – iPhone3G users are 120, iPhone3Gs users are 340 & iPad2 users are 100. So, I do have a web-service for that. But the question is how to figure out the Device Type.

sugartin iphones detect device by coding

Here are the steps for that.

1. Open your Project & go to the Header/Implementation file & import following files.

#include <sys/types.h>
#include <sys/sysctl.h>

2. Now. Place following two methods in Implementation file.

3. Access PlatformString methods to get the Device Version information.

Hope it helps.

Leave a Reply

Your email address will not be published. Required fields are marked *



*