How to configure iOS app to work on specific devices?

拜拜、爱过 提交于 2019-11-30 06:47:40

Word Lens requires the armv7, opengles-2, and video-camera device capabilities.

I'm not sure that you can do that

Maybe you can do a check in your code and if the device model is not the good one, just pop a new view saying that the model that the user is using can't make work the application ?

You can detect the model with this:

#import <sys/utsname.h>

NSString*
machineName()
{
   struct utsname systemInfo;
uname(&systemInfo);

return [NSString stringWithCString:systemInfo.machine
                          encoding:NSUTF8StringEncoding];
}

and give that:

@"i386"      on the simulator
@"iPod1,1"   on iPod Touch
@"iPod2,1"   on iPod Touch Second Generation
@"iPod3,1"   on iPod Touch Third Generation
@"iPod4,1"   on iPod Touch Fourth Generation
@"iPhone1,1" on iPhone
@"iPhone1,2" on iPhone 3G
@"iPhone2,1" on iPhone 3GS
@"iPad1,1"   on iPad
@"iPad2,1"   on iPad 2
@"iPhone3,1" on iPhone 4
@"iPhone4,1" on iPhone 4S

Else you can try sending an e-mail to apple

We need to use video-camera key in Required Device Capabilities section of app's plist.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!