0
A
回答
1
你可以找到使用this post(我想这也是一个重复的问题)的确切型号字符串:
#include <sys/types.h>
#include <sys/sysctl.h>
@implementation UIDevice (Hardware)
/*
Platforms
iPhone1,1 -> iPhone 1G
iPhone1,2 -> iPhone 3G
iPod1,1 -> iPod touch 1G
iPod2,1 -> iPod touch 2G
*/
-(NSString *) platform
{
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char *machine = malloc(size);
sysctlbyname("hw.machine", machine, &size, NULL, 0);
NSString *platform = [NSString stringWithCString:machine encoding:NSUTF8StringEncoding];
free(machine);
return platform;
}
的[我怎样检测自己是否有iPhone 2G,3G,3GS(
3
您需要检查设备功能。 3g不支持录像机,3g不支持前置摄像头。 看看this的问题。
相关问题
- 1. 在.NET中检测3G网络连接
- 2. sencha touch + phonegap ::如何测量iOS上的网络连接速度(3G检查)iPhone
- 3. 越狱设备上测试iOS应用(iPhone 3G)
- 4. 检查iPhone网络设置 - 启用3G
- 5. ASIHTTPRequest与iPhone 3G
- 6. 如何在iPhone Cocos2D中检测摇动手势?在iOS 8
- 7. iPhone - 如何检测iPhone版本?
- 8. 此应用程序与此iPhone不兼容(iPhone 3G iOS 4.2.1)
- 9. 从iPhone 3GS区分iPhone 3G
- 10. 检测3G或Wifi网络恢复
- 11. iPhone 3G上的GWT与3G网络
- 12. 仅针对iPhone 3G
- 13. 越狱iPhone 3g + startMonitoringSignificantLocationChanges
- 14. iPhone 3G上的AVCaptureVideoDataOutput?
- 15. 有没有人试图在iPhone 3G上安装iOS 4.3?
- 16. iOS Newsstand推3G版
- 17. 如何在J2ME中检测网络类型(2G/3G)?
- 18. 在iOS 3.0中测试iPhone应用
- 19. iPhone 4检测...在模拟器上
- 20. 如何在Lion上测试iPhone 3G/3GS和iOS 3/4的iOS应用兼容性?
- 21. 检测iPhone
- 22. Xcode 4.2与iOS 5.0未检测到iPhone iOS 5.1.1
- 23. IOS阵检测
- 24. 如何检测iPhone上的3G或Wi-Fi上运行的微型计算机?
- 25. 检测声音在iphone
- 26. 在iPhone上检测长按
- 27. 检测GPS硬件在iphone
- 28. iPhone中的双击检测
- 29. iphone中的人脸检测
- 30. iPhone中的条码检测
可能重复的HTTP ://stackoverflow.com/questions/1543925/how-do-i-detect-whether-i-have-iphone-2g-3g-3gs) –
检查你需要的功能(例如:视频,电话,指南针,陀螺仪等)而不是检查特定的型号。 – progrmr