Search code examples
iosxcodeios7ios8iphone-6

Supporting iPhone 5 with iOS7 and iPhone6


I'm not getting my application to work on both iPhone6 with iOS8 and iPhone5 with iOS7. Maybe it is the case I remove support for iOS7 but I don't think it is a good reason.

I'm working on a legacy code and I was an Android developer so I don't fully understand iOS. But my is case is, I'm trying to support iPhone6 and to do that I added a new XIB on 'Launch Screen File' on project configs. Before that my code was working great on iPhone4, 5 and 6. But after that all the screens stopped to auto resize to fulfill the iPhone6 screen and on iPhone5 when running iOS7 the apps shows black bars on top and bottom of the screen. But with iOS 8 it runs OK.

iPhone 5 with iOS 7 showing black bars on top and bottom iPhone 5 with iOS 8 runs OK iPhone 6 runs OK

I fixed the resize problem for iPhone6 adding the correct constraints on xibs. But I`m not able to fix this iPhone5 problem.

And despite this error, another strange behaviour I'm facing is that I'm unable to send the application to Apple Store because it says it is not currently supporting iPhone5. The xCode error is:

Organizer error when deploying app

This error looks like outdated because the second link is not working.

The only similar erros I found, about how to support iPhone5, are from 2012 or 2013 before iPhone6, and they basically tells to add new launch image for the iPhone5 size, as my app was already running on iPhone5 so I think it is not the problem.

Launch images, I just did't added for Retine HD 4.7 and 5.5 because they should use the xib

So, what am I doing wrong? Or what config should I change to fix that?

Thanks in advance!


Solution

  • So, after some help from @Tommy to point the way I managed to fix my problem.

    Firstly, I think my problem was caused because I had removed all the 'Default.png' images from the project root folder when I configured the 'Launch Images Source' to use the Images.xcassets. Before adding the 'Launch Screen File' this was working. But after I added the 'Launch Screen File' my project stopped working.

    So to fix the problem I had to readd the [email protected] image to project's root folder and set 'Launch Images Source' to 'Don't use assets catalog'. That way, as I understand, the Default-568h@2x tells xCode that the project is optimized to iPhone5 runnning iOS7, and all other devices or the iPhone5 running iOS8 uses the 'Launch Screen File'.