IOS different app icon depending on the device used - ios

I can already detect which device is being used by the user (from iPhone 4 to latest and also the iPad etc.) my question is, is there any code or method for me to change the app icon depending on the device used?

No, You can't do this.
However you can add different images for different resolution, but Apple won't approve your app.

Related

Change Devices parameter of iOS project programmatically

I have to make my app run on iPad in iPhone mode(legacy zoomable mode).
I can do it with changing Devices option in Xcode project settings, But i released my app in app store in universal device mode so apple says you can't remove this feature in newer version of your app!
Is there any way to do it programmatically? for example can i set Devices option to iPhone in code at runtime? or can i fake it?(made app run like iPhone app in zoomable mode in iPad)
There is no possible way to change an iPad app to iPhone-only at runtime. It would be possible to display your view controllers on an iPad in such a way that they appear the size of an iPhone. But Apple would reject your app for bad user experience.
Once you release an app as Universal, Apple will not let you change the app to iPhone-only. And why would you want to do that? Why would you deliberately want to hurt your customers using iPads?
Your only solution would be to release a brand new app (different bundle id) that is iPhone-only. But then this is bad for all of your existing users (iPhone and iPad).
The proper solution is to embrace your Universal app and properly support iPads.

Are you required to provide every icon size to release your app to the app store? iOS

If you specify that an app is not universal (just for iPad or iPhone), do you still need to provide icons for both devices?
According to Apple’s iOS Human Interface Guidelines, every app must provide an icon to be displayed on a device’s Homescreen and in the App Store. An app should specify several different icons of different dimensions to suit different screen sizes and different situations.
You can save valuable time by using Makeappicon.com to generate app icons of all dimensions you need for submitting your apps to Apple in one click, no matter it’s built for iOS 7, iOS 8 and iOS 9, and focus on coding and improving your apps.

Coverting iphone app to universal

I know that there are several answers for this question, but I was not clear about the result. Here are a few questions:
1) If I created a project as an iPhone project, selecting device as iPhone in deployment info, and designed the app using universal storyboard (i.e any width and any height (600x600) ). Once the design is completed and it is run on an iPad, the UI does not look good. If that is the case then, what's the point in selecting the device as an iPhone? Am I right that when selecting the device as iPhone or iPad, Xcode will allow the app to only run on those devices?
2) Now converting iPhone app to universal app: since image resolution varies from iPhone to universal app, do we have to replace all old images with new images supporting the universal app?
3) If I have an iPhone app, the Apple team will test it, both on an iPhone as well as on an iPad. If they found the UI doesnt match the iPad, will they reject the app?
I would imagine the UI looks just like it does on the iPhone, just enlarged to fit on the iPad. Basically this is because iPhone only apps can be run on iPads, but not vice versa. If you change the app to a Universal app, it will try to run natively on the iPad, and may look better if you have appropriately used auto-layout and size classes.
(Optional other cause) The other option is you're running into an iOS 8 issue where if you use an storyborad or nib for the launch file, it will mistakenly make an iPhone only app work as a Universal one. The use of Launch Screen File in iOS 8.0, 8.0.1 and 8.0.2 will make you universal.
This is a know bug and fixed in iOS 8.1, for you only option is to use assets catalog with a launch images.
Or you can add the device modifier in the Launch file name, like <launchNib>~iphone.nib
As far as images go, you will want to make sure you have images for the different resolutions (#1x, #2x, #3x). If you haven't already, I recommend reading up on asset catalogs (http://schlu.org/2013/10/01/Xcode-Asset-Catalogs.html). Images are not inherently different between iPhone and iPad (except for launch images), but it's the pixel density that really matters (older devices are 1x, most retina devices are #2x, and the 6 Plus is #3x).
If it is truly just an iPhone app, Apple will not reject the app because it looks pixelated and ugly on an iPad. The ability to run iPhone only apps on iPads stems from the initial release of the iPad when people hadn't created iPad or Universal apps yet. Apple basically provides it if someone REALLY wants an app that hasn't been created to specifically support the iPad yet.
That said, I would just go ahead and release it as a universal app. If you don't have revenue reasons for creating separate apps, I wouldn't recommend the extra hassle of having two apps. If course, if your app doesn't make sense on the iPad, simply make it iPhone only.
These are the common practices according to your questions
User interface doesn't depend on deployment devices. User interface depends on your implemented UI logic. As you said, default storyboard size is 600x600 (this could be easily changed), but this doesn't mean, that all devices should be this resolution. When the resolution is different, images and UI elements are misplaced. There are several ways to implement UI logic and make UI flexible, but I guess your question is not about that. So, short answer - devices selections are more about deployment than UI.
It might be some different images for different devices, but images such as buttons or text fields or etc should be flexible.
No, Apple doesn't care about your application appearance and design.
I hope I have answered to your questions.

can i submit an app without sizing the screens to work on all iDevices?

I've searched far and wide for the answer to this. i haven't been able to find an answer anywhere, so i turned to stack overflow in hopes you would be able to give me an answer. I'm about to submit my first app to the app store. do i have to make the app function on all iDevices (iPad, iPhone 4, iPhone 5, iPod touch, etc.)? or can i just submit my app for one single device and screen size and leave it at that? will they reject it?
i went through this pdf:
http://stadium.weblogsinc.com/engadget/files/app-store-guidelines.pdf
but i never found an answer to my question.
You specify what kind of device family your app will run. You can not limit your app only to (for example) iPhone 4. As far as I know right now if you specify your app running on iPhones it has to support 3.5 and 4 inches screens. So getting exactly to your question: no, you can not leave your app running fine only on one device and screen size. Except the approval process it would probably cost you very low rating on the App Store.
When you build the app, in Xcode you select the device families that the app supports. The choice is currently iPhone, iPad, or both. If you choose iPhone, you'll have to support both the 3.5" and 4" screen sizes. If you used Auto Layout, this should be easy.

iPhone 4 only app?

Is it possible to restrict an app to only run on an iPhone 4? I know you can have an iPad only app. And in iTunes Connect you used to be able to indicate an iPhone only app. But now in iTunes Connect it says that to restrict an app to certain devices one can use the Info.plist. Someone suggested that in the Info.plist if a FrontFacingCamera is required that would restrict it to iPhone 4. Is this the way to restrict an app to run on only on an iPhone 4?
As far as I know you can't do an AppStore restriction. However you can prevent you app from running on non-i4 devices. You can also write so in the app description, saying that you actually need i4 to run this app.
Sorry if I'm wrong.
Right now, you can test the [UIScreen mainScreen].scale property. As of right this moment, only an iPhone 4 will return a "2" in that property.
You could check that out in your AppDelegate and bellyache appropriately if it appears you're running on unders-spec'ed hardware. Just bear in mind that if the next iPad gets a retina display (or the iPod Touch Steve will almost undoubtedly be announcing next week), that property will be "2" for them as well. But maybe that's ok--if you're supporting the iPhone 4 maybe the new iPod Touch should be supported as well? If it's really about the screen density, then you should test the screen density, not whatever else you can find to identify the device.

Resources