Launch image in landscape is not enabled? - xcode

Something strange happens with Xcode.
We have universal app, that we would like to set up launch image only for landscape.(the app is in landscape.)
So, in the launch screen file, on the right side, i can choose :
iOS8 and later:
-iPhone portrait
-iPhone landscape
iOS7 and later:
-iPhone portrait
-iPad portrait
-iPad landscape
on iOS8 when you choose landscape- it shows only retina HD 5.5. but where is the landscape for all other devices in iOS8 ??
Its simple. we have landscape images, and we would like to load them to ALL devices, in all their shapes and versions.

In general, there has never been a separate landscape launch image for iPhone. The portrait launch image for iPhone is used, rotated, as the landscape launch image if the app launches in landscape. Thus, for iPhone, you only need portrait launch images.
Moreover, "iOS 7 and later" includes iOS 8 (because that is what "later" means). Thus, between them, "iOS 7 and later" and "iOS 8" provide slots for enough portrait launch images to cover all iPhone devices.
But, as you have rightly noted, the iPhone 6 plus is exceptional. It behaves like an iPad - it can have a separate landscape launch image. So that is the only separate iPhone landscape launch image slot provided. It is provided under "iOS 8" because iPhone 6 plus doesn't run iOS 7.

Related

Portrait to Landscape removed from Simulator in Xcode 9?

I've been trying to test my app on the iPad Pro going between portrait and landscape and for some reason the simulator does not switch... has this issue always been there and you need an actual device or is this a new issue? Thanks!!
Update: hope I don't sound confusing. The simulator switches, but the app doesn't. As you know iPad Pro apps are required to be landscape too, but it doesn't turn landscape on my simulator, the simulator goes landscape but the app is still in portrait.
We did not remove any rotation modes. Are you sure you have your project configured to handle rotation correctly?
Make sure your project settings allow all orientations and that your view controllers are returning the correct supported orientation values.

supporting view on different IOS devices.

My app is supposed to run only on Iphone but apple is testing it on Ipad too. Apparently, the apps can run in Iphone mode on Ipads. How do I know which Ipad will run which Iphone mode (ex: ipad mini air2 = iphone 5 view settings in iphone mode?)?
How can I change the size of my UI based on changing aspect ratio programmatically ? (My views are created through code).
The iPad Pro runs an iPhone 6. The iPad 2 and Air 2 run an iPhone 4s.
I don't know if there's official documentation for this, but what I did is create a sample app and set the Devices to iPhone only. Then I added
print(self.view.frame.size) //Swift
NSLog(#"width = %f, height = %f", self.view.frame.size.width,
self.view.frame.size.height); //Obj-C
in the default ViewController. This will print the screen size of the view only, and not the entire iPad's screen. I then compared the printed value to the printed value of the same app run in iPhone 6/4s. You can try it too.
In terms of changing the size of your UI to fit different screen sizes, your best bet is probably AutoLayout. There are many (free, open source) frameworks available that make creating AutoLayout constraints programatically much simpler.
A few are Stevia, Cartography, SnapKit (Swift) / Masonry (Obj-C), or PureLayout.
As you said your app is supposed to run on iPhone only, then do the following process.
Select your project target in Xcode and goto General in which there is one section Deployment Info
Change the Devices to iPhone from dropdown
this will open app on iPhone only.

iPhone Apps must also run on iPad without modification, at iPhone resolution, and at 2X iPhone 3GS resolution

Please suggest me.How to solve this.
I got this reason from iTunes Store**"iPhone Apps must also run on iPad without modification, at iPhone resolution, and at 2X iPhone 3GS resolution"**
But I built in only for iPhone.
I got answer of my question.But i didn't change anything in my code.I submitted the same build to the AppStore.App store is accepted my same binary,This is worked for me.
In order to determine if your app is running in iPhone resolution on iPad, embed this code in you opening view controller class:
-(void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
NSLog(#"width = %f, height = %f", self.view.frame.size.width, self.view.frame.size.height);
}
If your app is displayed in iPhone resolution, you will see this in the output console:
width = 320.000000, height = 480.000000
I had the same app rejection reason and it turned out that in FACT my app WAS in iPhone resolution on the iPad, but in iPhone 4 resolution (which I didn't design it for) which made it look like it was in iPad resolution even though it wasn't. Apple has dropped support for the iPhone 4 with iOS 8 and will likely drop support for iPhone 4S with iOS 9, so I neglected to design the app for iPhone 4 which meant that some of my UI elements at the bottom of the screen were not visible on the iPad displaying iPhone 4 resolution. That was the reason for the rejection (really dumb since it's not even an iPad app).
This is what I got back from Apple Developer Technical Support:
While your app may be built for iPhone or iPod, it must still run on
iPad. Did you test your app on an iPad prior to submission? If you
don't have an actual iPad device to test with, many issues that lead
to a 2.10 rejection can be spotted by testing in the iPad simulator.
I'll go over a couple of the most common ones here:
1) Controls or Important Content That Underlap the Status Bar
If your app places controls or important content in the twenty points
below the top of the screen, they will be cutoff when the app is run
on a retina iPad [1]. This can lead to a poor user experience. Make
sure that your app positions controls and important content below the
status bar. You can use the topLayoutGuide property from within your
UIViewController instance to access the current status bar height.
You can also create Auto Layout constraints between the topLayoutGuide
and your view controller's subviews to ensure they remain positioned
below the status bar at all times.
https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instp/UIViewController/topLayoutGuide
2) Authoring Your Interface Specifically For the 4" Screen
Both the iPad and iPad retina simulate a retina 3.5" display when
running iPhone apps. This means that content positioned 480 points or
more below the top of the screen will not be visible when the app is
run on an iPad (or an iPhone 4, and iPhone 4s for that matter). This
can lead to a poor user experience. Make sure that you have designed
your interface to adapt to any height. This means either adopting
Auto Layout[2] or overriding
-viewWillLayoutSubviews/-viewDidLayoutSubviews in your view controllers to manually position your elements for the given screen
size. If your app displays more content than will fit on a 3.5"
screen, consider placing it in a scroll view.
https://developer.apple.com/library/ios/documentation/WindowsViews/Conceptual/UIScrollView_pg/Introduction/Introduction.html
Before we continue, please try running your app on either an iPad
device or the iPad simulator (both the regular and retina). See if
you can spot either of the above issues in your app. If you can't,
send me screenshots from your tests and we'll work from there.
[1]: When an iPhone app is run on a retina iPad, a 20 point black bar
is overlaid atop the app's window, obscuring any content underneath
it.
[2]: To get started with Auto Layout, you'll want to watch the
Introduction to Auto Layout for iOS and OS X session from WWD 2012
https://developer.apple.com/videos/wwdc/2012/?id=202 followed by the
Auto Layout by Example session from WWDC 2012
https://developer.apple.com/videos/wwdc/2012/?id=232.

Xcode 6 beta iPad simulator portrait no split view on launch

In iPad i am using split view controller (one of my existing apps). Using Xcode 6 beta: If I launch the iPad simulator(s) with the device in portrait orientation it only shows the detail view and not the master view as well (and no "master" back button). If I rotate then to landscape all appears fine, rotate back to portrait and the "master"back button appears and can then access the master table view. With previous versions of Xcode the split view launches in portrait view.
I also noticed this, it seems to be a bug in Xcode 6 and iOS Simulator 8. You can send a bug report to Apple here
I had the same issue when running my app on the iOS8 simulator using xCode6-beta2. However, when I ran the app on my iOS7 device, the master view title showed up correctly. Sounds like an iOS8 issue.

Running the iOS 7.0 simulator in XCode5: How to fix the window to display the standard iPhone frame

I'm having difficulty displaying the standard iPhone frame when running the iOS 7.0 simulator in XCode 5.0. I've tried numerous approaches to fix this, including:
Hooking up my laptop to a larger monitor (the screen resolution is 1920 x 1200).
Making sure the window is scaled to 100% (as stated in the Apple Docs).
Selecting each of the different iPhone devices to test it out on.
Adding my own custom .png iPhone image to the simulator by going to Applications > R-click on XCode > Show Package Contents > Contents > Developer > Platforms > iPhoneSimulator.platform > Developer > Applications > R-click on iOS Simulator > Show Package Contents > Contents > Resources.
Still, all the iPhone simulators display as a window (except, quite oddly, the 3.5-inch iPhone simulator which shows up with an iPad frame):
http://imgur.com/q1dhxx8
I've never had this issue before in older versions of XCode. Any suggestions?
Thanks for your help!
The frame only appears if there is a sufficiently large resolution to display both the simulator and frame. On that display, you will only be able to have the frame if you rotate the external 1920x1200 monitor to portrait mode.
To have the frame of a retina 4" phone simulator, have your display in portrait (1200x1920) and rotate the display in OS X by 90 or 270 degrees. Have the simulator in that display. The frame will appear.
That is how all of the retina based devices are displayed in the iOS simulator. It shows all of the retina based devices with no phone frame, like you have seen. All of the devices that run iOS 7 have retina displays, which results in the simulator displaying them the way they do. The simulator with the phone frame is a non-retina example using iOS 6 and prior.

Resources