App not sized properly iOS 8 iPhone simulator - ios

I decided to rewrite one of my apps from scratch to clean up the code & perhaps optimize it for iOS 8, but when I run the new version in the iPhone simulator the resolution doesn't seem to be correct. There is letterboxing around the top and bottom edges of the app, but the old version doesn't have that even when run on the same Xcode 6 simulator.
Even though I'm using the iPhone 5 simulator (which should be 640 x 1136), the output of [[UIScreen mainScreen] bounds].size is 640 x 960. Every simulator just seems to be running the app at the iPhone 4 resolution. Any ideas what might be causing this?

You need to include Launch Images for all the resolutions you want to support. Default is only 640 x 960. If you include an image with the resolution of 640 x 1136 as a launch image you will support iPhone5. For iPhone6 and 6Plus include launch images in the correct size. See https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html

Related

Resize iOS App Preview for all devices

I am soooo close to submitting my app to the app store, but we have one problem. App Previews. You need 1 preview for EVERY device, and I'm sorry I don't have all your devices apple :( . Is there anyway to automatically resize my one app preview I have already without losing MAJOR quality?
The easiest way to do it, is to record an App Preview for the biggest screen size and then scale it down with tools like After Effects or Final Cut Pro. I'm not 100% sure, if you can also do it with iMovie. If you're supporting iPad, you need to create another version for iPads.
Here are the official sizes (Landscape only for simplification):
5 Series: 1920 x 1080 (< Standard 1080p 16:9 aspect ratio) or 1136 x
640
iPhone 6: 1334 x 750 (~ 70% of 1080p)
iPhone 6 Plus: 1920 x 1080
AppleTV: 1920 x 1080
iPad: 1200 x 900 or 1600 x 1200 (4:3 aspect ratio)
I suggest you capture the material for the App Previews with an iPhone 6 Plus (real device or simulator if that works for you) and then scale it down for the best quality. If you don't have an iPhone 6 Plus, you can use an iPhone 6, but you will lose quality.
Summary: You only need 2 different App Previews - with regards to resolutions - if you are only supporting iPhones. (3 if you are supporting iPads.)

App not running properly on iPhone 6 simulator

I am stuck with this weird problem. When I put Launch Screen File (Under General Settings tab) as empty, app runs well on 4s, 5, 6.
But when I put some Launch Screen for app, it gets scaled on iPhone6. Any help on this would be appreciated.
Check your splash screen size
splash screen must be
2x 640 × 960 pixels
ratina 640 × 1136 pixels
ratina hd 4.7 750 × 1334 pixels
ratina hd 5.5 1242 × 2208 pixels
and also use autoresizing mask
set property in your image and view
You getting problem because you may not using Ratina HD 4.7 (750X1334) Launchscreen.
Include launchscreens for every resolution shown in below image, then it will run perfect on all your iPhones.
Or you can check also full tutorial about Launchscreen
http://developer.xamarin.com/guides/ios/application_fundamentals/working_with_images/launch-screens/
You should not add splash images for the Retina HD 4.7, Retina HD 5.5 in your launch images, when you add these it means your app is compatible with iPhone 6, iPhone 6+ respectively. And by screenshot i can see that you app is still not compatible with iPhone6, iPhone 6+.
When you don't add splash screen the UI is automatically scaled up by the IOS to fit the bigger screens. SO your all UI scaled autmatically so it looks fine.
But when you add splash screen it will take the frame and size as it is.
You can solve it by using autolayout and size class.

Get native size of iPhone (6, 6 Plus, 5 etc) even when only running in zoomed mode (iPhone 5 mode)

An iPhone 6 Plus running in zoomed mode (ie not supporting iPhone 6 Plus by a native launch image) returns a screen size of 320x568 points. I'd like to get the native point size at runtime of the current device. Which for iPhone 6 Plus should be 414x736 points. The app must run in zoomed mode (iPhone 5ish size).
Let's take that again:
Create an iPhone app only natively supporting iPhone 5 (and 4...)
Launching the app with an iPhone 6 Plus, we look at UIScreen.mainScreen.bounds.size and it will be 320x568.
We want to achieve the native size of iPhone 6 Plus (once again, without adding launch image for iPhone 6 Plus to the app). This is where I'm stuck.
There is UIScreen.mainScreen.nativeBounds.size, however it will return the size in pixels which will be something like 834.78260869565224, 1481.7391304347827. Interesting numbers, but if we divide those by the UIScreen.mainScreen.nativeScale, we will get 320x568.
I hope you are asking how to get the screen size.
screen size can be obtained from
CGSize screenSize = [[[UIScreen mainScreen] bounds] size];
This will return your main screen size. Sorry if I am mistaken.

Screenshots for iTunes Connect with wrong aspect ratio

Took screenshots for every size in the simulator and I'm having a problem with 4.7-inch (iphone 6) and 5.5-inch (iphone 6 Plus) screenshots only.... With 4-inch and 3.5-inch had no problem uploading.
Error states: One or more screenshots have the wrong aspect ratio. For more information, see the Developer Guide.
On the Dev-Guide says:
4.7-inch -> 750 x 1334 pixels for hi-res portrait
5.5-inch -> 1242 x 2208 pixels for hi-res portrait
My screenshots HAVE those dimensions, I took them with the respective simulators. Any one had a similar problem?
(Already tried renaming the screenshots, avoiding strange characters and what not... No success yet)
set the simulator scale to 100%
Simulator > Window > Scale > 100%
It's been a temporary problem by Apple. Now it should accept your images: Uploading screenshots to iTunes connect for iPhone 6 and 6+
Just rename them to "1.png" and so on.
The iOS Simulator began scaling images. If you're scaling is anything other than 100, change it back to 100. I had the same issue, this seemed to solve it.
Run your app on the simulator, and save screen shots.
Rename those screen shots to 4.7.1 (iPhone 6), 5.5.1 (iPhone 6 plus) and so on.

using 1136 x 640 images in storyboard

EDIT: Dont misunderstand. I get that I can put in myImage.png whose size is 568 x 320 and myImage#2x.png whose size is 1136 X 640 and, at run time, iOS will show the lager image if the device has a retina screen. That is not what this is about. Im talking strictly about placing a 1136 x 640 image in the storyboard.
Some details:
Using xcode 5
iPhone only app (iPhone 4 and above ideally)
Targeting iOS 7 (should keep out any iPhone 3gs ...right?)
Single view app
Using storyboards
My understanding is that I can provide only the higher resolution 1136 x 640 images my app needs for the iPhone 5 then use autolayout to constrain things in such a way that my UI works properly even if the device is an iPhone 4 and has less screen real estate.
My issue is that if I drag a 1136 x 640 image onto the storyboard the image is 2X the size of the view im dropping it into. I get that I can resize the UIImageView and set the mode to aspect fit and the image will display correctly in the view.
However, that would get quite annoying. Is there a way to just set the storyboard to use the retina images directly?
Now I can create images that are half the size (568 x 320) and those will drag and drop into the views perfectly. But I cant imagine why anyone would want to do that. This doesnt make sense to me. I would expect the SDK to let me layout the app in the highest resolution possible.
I tried using images named myImage.png and using myImage#2x.png but neither changed anything.
Don't think of the dimensions in Xcode as pixels, but points. So while you set the image dimensions to be 568 x 320, the #2x images are going to use two pixels per point.
What are you testing on? You might not be seeing a difference because you are only testing on retina devices. If you are only planning on supporting iOS 7 (iPhone 4 and up), you won't be using any non-retina devices.

Resources