iOS development - Is including iPhone 4s compulsory? - ios

I'm currently building UI these days.
The problem is that iPhone 4s has such a small screen, I can't put UI components into it properly.
How can I exclude outdated phones like iPhone 4s when I launch the app?

No, that'd be very unusual these days. iPhone 4s only runs up to iOS 9, so simply target iOS 10.

Unfortunately, there is no support from Apple for this kind of thing. But you can do something like detecting whether the user's device is an iPhone SE and if so show a full screen alert saying "App is not supported for this device" and block the UI (which is not recommended unless it's required).
Just a thought:
If you are lucky to find out one device capability which distinguish iPhone SE, you can set that to value in UIDeviceRequiredCapabilities key in info.plist.
Example: Adding an item to UIRequiredDeviceCapabilities in your Info.plist with the requirement of "bluetooth-le" should limit your app to iPhone 4S/5 and iPad 3, 4 and mini. You could also throw in a "camera-flash" requirement to limit the app to iPhones only, should you need that.
Another thing you can do is check for iOS versions. As you may know, some of the older phones cannot support newer iOS versions, so you can check for iOS version and if it is greater than your desired version, you can run the application or limit it in the store.
More info:
Device Compatibility Matrix
Maximum supported versions of Apple Devices

Related

Disable apps for iPhone 4s in apple store

I want my apps to be available for phones above 4s i-e iPhone 5,6 and iPad.
How can i disable app store to make it available for iPhone 4s. It asks me to put iPhone 4s and the app is not made for its screens.
You can't explicitly set a list of devices compatible with your app.
Some well-knows games explicitly writes the list of compatibles devices right in the beginning of the description text from the App Store.
Example taken from The Room Three app store page :
WARNING: DUE TO HEAVY GRAPHICS REQUIREMENTS, THE ROOM THREE IS NOT COMPATIBLE WITH IPAD 1, IPHONE 4 (& OLDER IPHONES) OR IPOD TOUCH 4TH GEN (& OLDER IPODS)
There is still a way to restrict the app to some devices using some special iOS Keys on the .plist file.
UIDeviceFamily : This key is added automatically by Xcode and represents the hardware on which this app is designed to run : iPhone/iPod touch or iPad. You can set it according to build settings.
UIRequiredDeviceCapabilities : This key is much more useful since it allows you to restrict the app according to the Device capabilities.
If you don't mind losing iPhone 5 and 5C users (since their devices are no longer produced) you can set the key arm64 which means that your app is compiled only for the arm64 instruction set, and thus will work only on iPhone 5s and later devices (and this even if your app work fine in armv7).
Unfortunality, you can't do this. If I were you, i would check screen size in applicationDidFinishLaunching method then if device is iPhone 4s, i would show an AlertView and explain the user. This might be the best way to do this approach.

How to prevent an iOS app from being installed and run on iPhone 4/4s? [duplicate]

This question already has answers here:
Restricting app installations from AppStore only to users with iPhone 5/5s/5c
(3 answers)
Closed 7 years ago.
I have an app with a very specific UI that doesn't fit screens with the 3:2 ratio, i.e. it is almost unusable on iPhone 4/4s for example.
Is there a way to prevent installations of my app on specific devices, namely iPhone 4/4s?
To exclude a certain device (eg. iPhone 4/4s) of the same type (eg. iPhone, iPad) there would need to be a requirement in your app which will not run on that devices standard configuration.
An example would be if your app used the Metal Framework, which iPhone 4/4s doesn't support. If you've thought about targeting armv7s/arm64 architectures exclusively (iPhone 4/4s use arm7) forget it — your app will be rejected.
↪︎ Source
If you're trying to exclude certain devices which are of the same type then you might have to dig deep into UIRequiredDeviceCapabilites and determine which key might eliminate the device your app doesn't support. Apple generally wants your app to support as many devices as possible, and apparently they expect it's interface to look good on all of them.
Set your Deployment Target to iOS 8+, since iPhone 4 is unable to run it.
EDIT: Unfortunately this doesn't exclude iPhone 4s
It is not possible to prevent on specific devices since iOS 9 is supported by iPhone 4s.
Check this https://stackoverflow.com/a/29677597/4108415.

Want my app to only work on iPhone 4 and above and no other devices

Hell all,
I have developed an app that should only work on iPhone 4 and above. The reason is during load time, the app checks the type of iPhone you have and set certain images based on the screen size.
Is this acceptable by apple for me to decide which iPhone user running and set the images based on that?
Also where do I say I want this app to run on iPhone 4 and above up until iPhone 6+ and not on any other devices such as ipad and etc?
Thanks
Borna
Set your Devices to iPhone rather than Universal under General>Deployment Info and make sure your Deployment Target is set to iOS 7.0.
As #Sam B told below, there is no way to specify certain devices.
But with following trick you can get result that you need:
Set your Devices as iPhone in General Tab of xCode proj file. Also if you want 4+ devices set Deployment Target as iOS 7, if you'll keep iOS 8+ it will be 4S+ devices only.
I don't understand how the posted answers are considered correct?
The answer to OP question is NO. There is no way for you to restrict access to certain iPhone device (4, 4S, 5, 5S, 6, 6P). If you specify your project to be "iPhone" only in Xcode then technically it will run on all iPhone no matter what the model.
Now having said that you can theoretically make it work only on iPhone 4s or above by setting iOS to 8.0 or above as one cannot load iOS 8 on iPhone 4 or below.
As for the apple reviewers, they will test your app on the latest app device, iPhone 6 or 6p. They don't have time to regression test your app on all possible apple iphone devices.
Does this make sense?

Dropping iPhone 4S Support

The iPhone 4S is the oldest iPhone still to be supported by Apple, which as such runs iOS 8, a requirement of my own app.
However, as hard as I am trying, my app experience is being worsened due to the fact I keep having to adapt to the tiny (y comparison) screen size of the iPhone 4S.
Is it possible in any way to drop support for a device? Or as it runs iOS 8, do I have no way of doing so? Is it a case of, if I release it on iOS 8 for iPhone, it WILL be available for iPhone 4S owners?
You can't drop support for iPhone 4S just yet, however you can disable some features when your app runs on certain undesired devices. Just make sure you state that in your app's description.
This follows the lead of GarageBand for iOS version 2.1 in which some features are only available for newer devices.
PS: remember to also quote this fact in the reviewer's notes section.

I don't want my iOS app to run on iPhone with 3.5 screens, is it possible to restrict my app only to 4 inch displays?

I don't want my iOS app to run on iPhone with 3.5 screens, is it possible to restrict my app only to 4 inch displays or larger?
Also, is it possible not allow the app to run on a certain device? I do not want my app to run on iPhone 4 and 4S.
Rather than selecting for a specific device you should focus on what capabilities you need.
For example Bluetooth 4.0 Low Energy communications supported only in iPhone 4S+ devices . You can add the bluetooth-le key to your UIRequiredDeviceCapabilities to prevent installation on every device but the iPhone 4S+ devices.
I don't think this is a good idea. Apple wants you to develop for as many devices as possible, and if you decide not to support a certain device for no reason (e.g. "no M7 coprocessor" for all devices except the 5S), Apple will reject your app.
You cannot choose an app to only be released for 4" devices, and you have no influence on what display the iPad simulates when it runs an iPhone only app. What you want is simply impossible. This answer was found here: Limit app to running only on 4 inch devices IOS and answer credit goes to #Scott Berrevoets
NO.
You can't make an iPhone app restricted to a certain screen size. Not only is it not technically possible, it's against Apple's App Store Review Guidelines, in ways.
2.10: iPhone apps must run on iPad without modification, at iPhone resolution, and at 2X iPhone 3GS resolution
Although it's an old guideline mentioning the iPhone 3GS, the gist is the same even now: the app MUST be able to run on any screen size. There are even resizable iPhone and iPad Simulators within Xcode that you may use to take guesses on the next iPhone's screen size.
If they made guidelines so that apps can be used on the iPhone 3GS and the 4 and the 4s, said apps should also be able to run on newer phones and whatever's currently supported with the OS.
You said you noticed performance issues on older devices in a comment. This is where you need to work. How would you go about fixing said performance issues on older devices? Do what Apple did with iOS 7's release:
Reduce graphical effects and unnessicary processor-heavy effects on older devices.
If you look between devices, iPhone 4 has none of the translucency and background blurring that was advertised with iOS 7, namely with Control Center, Notification Center, Alerts, Keyboards, and Navigation Bars. This is how Apple tried to compensate with the lag of the iPhone 4 trying to run iOS 7. Same goes with the iPad 2. The iPod touch 4th generation didn't have enough RAM to run iOS 7, so it's stuck on iOS 6.1.5.
You need to do some work here too. If you have unnessicary graphical and processor-intense effects in your app that causes lag and performance issues, disable them on devices that can't run them at a smooth frame rate.

Resources