Xcode build ignores Deployment Info - iphone

I'm making my app which targets only iPhone.
So I excluded iPad in Xcode's Deployment Info.
But Xcode still can build my app in iPad. Also, when I uploaded my app to AppstoreConnect, screenshot page's iPad section does not fade.
Furthermore, I wanted to show our app only portrait. So I checked Device orientation to portrait, but as I tested with my iPhone, it doesn't work and adapt to landscape.
My Xcode setting is captured below:
Xcode Deployment Info

Related

Iphone resolution on an Ipad

We have an app that has been rejected in the review process by the Apple app review people. The cause for the rejection is that the app is not scaling properly when run on an Ipad.
The app was never meant to be run on an Ipad, but there seems to be no point in arguing with them about that.
Apple sent us a couple of screenshots that show our app being run on an Ipad with the top portion of the view cut off. Notice how the app is run in some mode where it looks like an Iphone app and does not fill out the entire display area. When we bring up the app on an Ipad, it fills out the screen and does so without any edges cut off.
Can anyone please tell me how to run the app on an Ipad the way the Apple guys have - Iphone-sized? We believe we have a fix for the issue but we need to reproduce the error and then be able to verify that the fix solves the issue.
(the logotypes in the images are intentionally blurred)
I just went through this myself and here is how I resolved it:
Go into info.plist and see if any of the supported interface orientations are set for iPad. Despite selecting iPhone only, I had iPad supported orientations for four (portrait, portrait upside down, landscape left, landscape right). I deleted those.
I also deleted any reference to the launch screen in the info.plist. My app is pretty simple and there's no preloading of data so I don't really need a launch screen. If you do, you could go old school and make your first VC the launch screen.
I then made these changes in Target-->General-->App Icons and Launch Images
That was the only way I could get it in the sim to run the app at iPhone resolution while running an iPad (iPad2, iPad Air).
If Apple is going to force developers to ensure an app runs on an iPad even if it is made just for iPhone, they should eliminate the iPhone Only and Universal options and just have iPad Only as an option.
To run an iPhone app on an iPad, you just need to:
Acquire an iPad (you can also use the simulator)
Set the target device family in Xcode (it's under your target) to iPhone
Connect your iPad, perform any necessary certificate dances
Run the app on the iPad.
As long as the target device family is set to iPhone, the iPad will show your app in this mode.
Apple is likely running your app on a simulator, not on a real device. Notice the "2X" on the top right. In XCode - you should run the app on iPad Retina Simulator. On the bottom right you will see a button that you can toggle from 1X to 2X.
If you place the simulator in "2X" mode, you will see what Apple is seeing.
What OS are you running on your iPad? Things have changed in iOS 8 - and that's likely why you're not seeing what Apple is seeing. My guess is that your are running an app that was initially developed for iOS 7 or earlier - which means that you need to upgrade from scaled resolution to native resolutions to resolve this issue. Here is how you do it:
How to enable native resolution for apps on iPhone 6 and 6 Plus?

App targeted for both iPad and iPhone; removing iPad component pre-release

I'm about to release an app that I have been working on for quite some time and is has currently been built to target both iPhone and iPad. The app has both iPhone and iPad storyboards and various device specific code and views. I now wish to remove the iPad references and release the app targeted for iPhone only.
Can a project be changed in this way without too much difficulty and what are the potential complications that may arise?
You should be able to change the device target in Xcode to just iPhone, then verify the build runs in the iPhone simulator window on the iPad. You can also check the bundle plist to verify that UIDeviceTarget contains only 1, not 1 and 2.
If you want to remove the iPad resources, click on your storyboard (or other files), check the properties pane, and uncheck the target. This will stop the file from being copied into the app bundle.
In this image you can see Devices is selected for iPhone only. You can change it from here.

iOS - White screen when testing on iPad

I'm building an iPhone app, and it works fine when I test it in the simulator. I don't have an iPhone for testing, but my app is configured to be iPhone only, so I'm trying to run it in the iPad. When I run it either in the iPad simulator or the iPad itself all I get is a blank screen, any idea what could be happening?
My app use to be a Universal app, but I switched it to iPhone only to test on the iPad since I don't have an iPhone to test.
Check your build settings.
Change "Targeted Device Family" from "iPhone/iPad" to "iPhone" and you will see it in your small iPhone "simulator" on your iPad.
Check my screenshot:

Change app to only iPhone deployment

Im using Xcode 4.1 lion release. My app was rejected because it only works on the iPhone, this is how it should be, but i guess i didnt set my app up so it only works on the iPhone. How would i do so?
I go to Targeted Device Family under my project build settings and i have iPhone selected.
`
What else do i need to do. Thanks
EDIT: During the app review it was still set up under device family as iPhone
Remove and iPad xib files that were created initially. By default Xcode makes an iPad folder when you select the universal build, remove that and you should be good. Other considerations might be to remove iPad launch images if they are present, or any iPad specific code like popover view controllers etc.

iPhone app works fine on iPad, but not on iPhone

I've got a problem with my universal app that I just recently ported to the iPad.
While it works fine on the iPad, on the iPhone 3G it shows Default.png and then goes to a black screen.
It even showed the home screen after Default.png once, with all the icons messed up - and the home screen was still scrollable.
I've tried everything to get it working - cleaning the app and deleting then reinstalling the app but they don't seem to work.
I've rebooted my Mac and my iPhone but doing so doesn't seem to work.
Also - the app works fine in the iPhone simulator, so I'm wondering if it's my device.
Update:
I converted the app to a universal application using Xcode's 'Upgrade current target for iPad' function so there are different XIB's for each device.
I also don't have any other device to test it on - just an iPhone 3G and an iPad.
Problem solved. Rather easily actually - in Xcode's upgrade process, it changed an entry in the plist to not find MainWindow. It changed the entry 'Main nib file base name' to 'Main nib file base name (iPhone)'. I don't think the iPhone knew where to look for the nib because its plist entry was changed.