Do you have an app that takes so much resources and power that you’d rather just not support an older iOS device? It’s not recommended (since these users will feel left out), but it is possible.
Where It’s Used
I first discovered this problem when downloading SoulCalibur, which is a universal application. I noticed it was on my iPhone 4, but not my iPad 1. While trying to install it manually from the app store, I found out why:
Well, after paying some money for this app, I was somewhat upset. I feel it’s somewhat misleading since SoulCalibur doesn’t use any of the cameras in the game, let alone the front facing one.
What the Real Issue Is
Why is this happening if the game doesn’t even use a camera?
If you’ve ever tried playing a newer game on an older computer, you’d notice how slow and/or choppy the video was. The iPad 1 is technically old, in iOS device years, and if you had the ability to run SoulCalibur on the iPad 1 it would most likely be unplayable. It would get horrible reviews, it wouldn’t sell as many units, etc.
Create Your Own “Front Facing Camera” App
Start by creating a new project in Xcode, choose a single view project for simplicity.
I called it “NoOldDevicesAllowed“, but you can call it whatever you want.
Go ahead and navigate to the name named “NoOldDevicesAllowed-Info.plist“. Under the entry “Required device capabilities” we simply add the string “front-facing-camera” underneath it. This is all that is required to make this app not run on your iPad 1, iPhone 3GS, etc.
If you try running this on an iPad 1 in the debugger, you’ll notice it compiles then immediately finishes. Do the same with an iPad 2 or iPhone 4 and it will run just fine since they have front facing cameras.
Congrats! You just blocked users from using apps on older devices.
Many Ways To Skin a Cat
The “front-facing-camera” entry is only one of many of the requirements you can add to your app. The entire list can be viewed in Apple’s documentation under the UIRequiredDeviceCapabilities section.
A few interesting ones:
- telephony – Must be an iPhone
- gyroscope – Must have a gyroscope (iPhone 4, iPad 2, etc.)
- opengles-2 – Must have OpenGL ES 2.0 or higher (great for restricting games)
To see which iOS devices have which capabilities, see this page on Wikipedia.
While restricting your apps to a limited set of users isn’t recommended, sometimes it’s necessary based on the nature of the app.
Have you ever restricted an app similar to this? How did people respond? Leave your answers and comments in the section below. Thanks again for reading!