Xcode 6 App Stops AutoSizing When Launch Images Added - ios

I began a calculator app for the iPhone 5/5s using xCode v5 with storyboard. I've since upgraded to xCode 6 and have nearly completed the app. I tested the app on my iPhone 5, and on the iPhone 6 and 6 plus using the xCode simulators. The app fills the screen of my iPhone 5 and autoscales to completely fill the simulator screens for the 6 and 6 plus. Exactly what I wanted! However, when I added launch images to my project, the app no longer autoscales when running on the 6 and 6 plus simulators. I've followed Apple's recommendations for launch image sizes, and have tried dragging the launch images into my project and using an asset catalog. Both stop the app from autoscaling. What I'm currently seeing is a launch image that completely fills the screen of the iPhone 5/6/6 plus for approximately 1 second. Then the calculator appears, completely filling the screen of my iPhone 5, but remains that same size, filling only a portion of the iPhone 6 and 6 plus screens. I want the calculator app to completely fill the screens when running on the iPhone 5, 6 and 6 plus. Why does autoscaling stop when launch images are added and how do I continue to enable autoscaling after the launch images are added to my project? Thanks in advance for guidance.
Turkey day morning: I solved my problem! With great skepticism, I tried the solution linked below and it solved my problem. I added launch images (drag and drop). The calculator displays correctly on my iPhone 5, and also displays correctly when running on the iPhone 6 and 6 plus simulators. Don't understand why the linked solution below works, so it's something I'll just have to accept. My thanks to Matt Palmer for posting this on his blog:
http://matthewpalmer.net/blog/2014/09/10/iphone-6-plus-launch-image-adaptive-mode/

using a LaunchScreen.xib as LaunchScreen is 'cleaner', instead of generating 6 different images for a LaunchScreen Asset in the Media Catalog.
Don't forget to check 'Use as Launch Screen'

You should try this.
Disable Auto Layout and Size Classes.
and do this for all subViews in you XIB

Related

layout issue in iPad when running the iPhone app in iPad (Objective-c)

I have an issue with the iPhone app. I have implemented one iPhone app (not universal). When I am creating the new project I have deleted the Launch Screen,Story board from the project and implemented the MainWindow.xib like in the old format. I have designed the xibs for iPhone 5. So in iPhone 5,6 and 6 plus everything is working fine. But When I run the iPhone app in the iPad the bottom part got cut off. If I design the xibs for iPhone 4, eventhough I added the Default-568h#2x.png it is not supporting for iPhone 5 but working well in iPad.For reference I have attached the screenshot . The screenshot for iPhone 5 screen. It is not scaling to iPhone 5 after adding the Default-568h#2x.png. Black color part width is 568-480=88 pixels.
So please guide me to handle the iPhone 4,5,6,6 plus and iPad.Thank you for spending the valuable time. Please let me know if I am not clear.
I am using xcode 8.0 and iOS 10.0

iOS9 Causing iPhone 5 Optimization to be lost

EDIT To clarify question
I have a large app that has been out for a few years. It runs perfect on all iPhone sizes (4 up to the 6 plus). It supports both iOS 7 & iOS8, and is Optimized for iPhone 5.
My issue is with iOS9. The app no longer uses the built in scaling that iOS provided to fit the app onto the 6 or 6P screens.
Not only that, but it is rendered as if it were on a 3.5" screen. It is not recognizing the Default-568h#2x.png static image. Causing it to letterbox on an iPhone 5.
Is this a bug in iOS9 that does not recognize the static splash screen image?
Thank you so much!
This was caused by my Default-568h#2x.png file being localized (Which is required by iTunes Connect).
When I removed the localization from the file, it started rendering perfect in iOS9.
This does not help anyone whose app is currently in the store with a localized Default-568h#2x splash screen file.
As far as I can tell the only way around it is to have a 'Splash Screen' .xib file defined in your project settings (you then lose the auto scaling for iPhone 6 and 6+, which was perfect for our application).
I have a case open with Apple regarding this. They told me that they could not look deeper into it until iOS9 was out of Beta (tomorrow morning), and if it was still happening, than it is indeed a bug on their side and (hopefully) would be fixed soon.
I use Images.xcassets to manage assets of app. I had to create a LaunchImage in there and just add images for iphone Portrait ios 7-9 and not have any for retina 4.7 and retina 5.5 and things worked again.
If you use a Launch Storyboard then you need to remove that and add xcassets as mentioned in previous paragraph
This is in xcode 7

Xcode 6.1.1 Launch Images for Universal build

Faced the problem with Launch images in Xcode 6.1.1
When I set all of the images - iPhone 4s, iPhone 5/5s and iPhone 6 doesn't show up (black screen), however the resolutions for the particular device is set right, as all of the images are on their places.
https://dl.dropboxusercontent.com/u/71223199/temp/01.png
I use Landscape right/left.
Funny stuff is when I'm adding them one by one, they first work.
https://dl.dropboxusercontent.com/u/71223199/temp/02.png
But once I add images for iPhone 6/6+ they don't work again.
iPad works fine.
Have anyone seen any step-by-step tutorial on how to set up images?
I have my another project (portrait orientation) and it works fine when images for all devices are set up.
Sounds like Apple didn't fix this landscape-only launch images bug with their latest update to Xcode. You'll likely have to manually edit your project's info.plist file to include the UILaunchImages array. The selected answer here worked for me for the previous version of Xcode:
How do I create launch images for iPhone 6 / 6 Plus Landscape Only Apps?
More detail on why this particular bug exists (at least it did in Xcode 6.1) in the last post of this thread:
Supporting iPhone 6 and iPhone 6+ with different launch/splash screen image for iPad Portrait and Landscape orientations

How the apps already build for iPhone 4 and 5 will shown in iPhone 6 and 6 plus

As the apple has announced the two more screen sizes iPhone 6 and 6 plus. What will happen to apps already in app store build for iPhone 4 and 5. Will they be stretched or their layout be distorted in these new phones?
Please help me because I have recently submitted two of my apps in app store waiting for review. So should I change them or they will work fine. As I haven't use Auto layout in these apps.
Thanks.
If you have uploaded apps from XCode 5.x apple will take care and they will be scaled and stretched to fit them in iPhone and iPhone 6. If you want to take advantage of new devices you will have to use XCode 6 and add launch images on your project with these steps.
If you have not added launch images for iPhone 6 and 6 plus (and do not have Launch Screen File for iOS 8) , than your apps will be streached to fit in new devices , once you add them app will not be streached and you will have to manage it.
So with Xcode 5.x , you can be absoulatly sure that iOS will take care and streach your app to look just like thy look in iPhone 5 or 5S.
As Bhumit said, you need to add launch images at the new sizes if you want to have your apps scale properly for iPhone 6.
A corollary is that they will not scale in the simulator until you add those launch images. You can just add some default ones to test - I recommend grabbing David Smith's blanks.
If you do not test in the simulator with launch images, you will get a false impression of your app working because the default scaling kicks in. (If you are happy to leave it with that default scaling, fine for now.)
According to the latest version of Xcode 6 , the apps running in the previous iPhone environments of 5 and 4s will work as they are in iOS 8 i.e iPhone 6 , 6+. I suggest you download Xcode 6 from the Apple Developer Site and run your apps in the iPhone 6 and 6+ and see for yourself.
I have also found the apple link for this problem. Under heading 'Supporting New Screen Sizes and Scales'. You can check out above link for more such information.

Images.xcassets and IOS 5

My app is almost complete and i'm bug testing and fixing.
Now this is the first time i have used images xcassets and until now it worked.
When i'm testing on the simulator all icons look great, when testing on my test devices iPhone 5, iPad mini, iPhone 4 iOS 6 and iPad 2 iOS 6 everything looks great.
But when i test on the iPad 1 with IOS 5 the icon is blurry, but the ipad 2 uses the same icon set.
So i changed that icon to red (others are bleu) and on IOS 6 the icon turns red.
The iPad 1 does not change the icon so its using a different icon set.
How do i make the iPad 1 on IOS 5 use the iPad App IOS 5,6 72pt icon?
info about the icon:
1x size = 72X72
2X size = 144X144
Tried the naming convention.
(I removed the icon in the center, because the app is not yet released)
___________________________________________UPDATE___________________________________________________
After a while i stopped using the xcassets for my app. It's simply IOS 5 that is giving the problem.
It seems that Apple just want's us to stop with IOS 5, xcode 5 and mavericks just makes it too big of a deal to make iOS 5 apps and test them. I'm expecting to stop iOS 5 development next year.
I have the same problem with the iPad 1 and iOS 5.
But I found an unsightly workaround for this problem. Build your project for an iOS device and not for the simulator. Go to the .app file in the finder and open the package content (right click).
As you can see, there are the AppIcons for the iPad named "filename"~ipad.png and (if available) the AppIcons for the iPhone named "filename".png.
Remove the "~ipad" string from the image filenames and build your project again - should work no.
If your target also supports the iPhone, this solution won't work I think.
The same problem also comes up, if you set up a complete new project with XCode 5 and deployment target iOS 5 on the iPad. I've already reported this to apple.

Resources