How to configure iOS app to work on specific devices?
Asked Answered
L

3

14

I am developing iOS app with ZBar SDK for QR-codes scan. Here ZBar SDK creators tell us that

Only the iPhone 3GS and iPhone 4 are supported, as they have a camera with auto-focus. The ZBar library does not support the iPhone 3G and is unlikely to ever support it.

So I have added auto-focus-camera key to the Required Device Capabilities section of my plist. All is great, except one thing - iPad 2 & iPod Touch 4th Gen doesn't have auto focus camera, but still are able to use my ZBar SDK code to scan QR-codes. But my auto-focus-camera key doen't allow users with iPad 2 and iPod Touch 4th Gen to download my app from App Store.

In other words I need to find a way to make my app installable via App Store on these devices:

  1. iPhone 3GS.
  2. iPhone 4.
  3. iPhone 4S.
  4. iPad 2.
  5. The New iPad.
  6. iPod Touch 4th Gen.

And on these devices my app should not be available:

  1. iPhone 2G.
  2. iPhone 3G.
  3. iPad.
  4. iPod Touch 3d Gen and

My question is: how to make my app available in App Store for first list devices' user and not available for second list devices' users?

Any help will be appreciated!

PS: I have seen this question on SO, but it doesn't help me much.

PS2: This app has the desired set of available devices.

Requirements: Compatible with iPhone 3GS, iPhone 4, iPhone 4S, iPod touch (4th generation), iPad 2 Wi-Fi, iPad 2 Wi-Fi + 3G, iPad (3rd generation) and iPad Wi-Fi + 4G.

Does anyone know, how they did it?

PS3: At the same time adding both still-camera and auto-focus-camera gives us this:

Requirements: Compatible with iPhone, iPod touch (4th generation), iPad 2 Wi-Fi, iPad 2 Wi-Fi + 3G, iPad (3rd generation) and iPad Wi-Fi + 4G.

And that is not a great way as long as we have all iPhones as suitable for our app, instead of 3GS, 4 and 4S.

PS4: My app is here and it has such requirements:

Requirements: Compatible with iPhone 3GS, iPhone 4, and iPhone 4S.

Lithia answered 16/5, 2012 at 10:33 Comment(0)
L
2

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

Lithia answered 28/12, 2012 at 13:16 Comment(0)
Q
8

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

Quietude answered 25/5, 2012 at 20:45 Comment(1)
Right now I think video-camera is the solution :)Lithia
P
5

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

Pathless answered 16/5, 2012 at 10:50 Comment(4)
Thanks, I have thought about such approach, but I would like don't let a user even install my app if he has unsupported device, because my whole app depends on device version. Just imagine, you install an app and after first launch you get the message kind of "Sorry, but you cannot use this Application because your device in not supported!" Thats not a user-friendly way.Lithia
You can say in the application description that it's not working with such or such model, and after it's their fault if they don't read :PPathless
Hehe, good point, but that's still not a user-friendly way :)Lithia
@JohnSmith I would agree with you, if it weren't for the fact that we know people won't do that, and will be angry with Maxim, and give him a low rating, even though he tried his best. See plus.google.com/106913700595933476859/postsBibliotaph
L
2

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

Lithia answered 28/12, 2012 at 13:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.