-1

-Background This issue only happened using XCode 7.0 or later but neither before. The project only has minor changes in sources code but not in assets file as well as the story board.

-Issue After archived the project successfully and waiting the process to be completed after pressing Upload to App Store. The following error prompt

Your binary is not optimized for iPhone 5 - New iPhone apps and app updates submitted must support the 4-inch display on iPhone 5 and must include a launch image referenced in the Info.plist under UILaunchImages with a UILaunchImageSize value set to {320,568}. Launch images must be PNG files and located at the top-level of your bundle, or provided within each .Iproj folder if you localized your launch images.

Error description

However, launch image has never been set and exists in the project, therefore i find there are no clues and hints for how to fix this problem. It is confirmed the configuration can work on or before XCode 6.4.

project configuration

Please kindly advise.

Frank Fung
  • 165
  • 1
  • 9
  • When you run your app on an iPhone 5 (or similar 4" device or simulator) what do you see? Do you get black bars or does the launch screen and app run full screen? – rmaddy Oct 19 '15 at 18:51
  • @rmaddy but i am not using autolayout. does it affect? or i should follow this post? http://stackoverflow.com/questions/32641240/ios-9-xcode-7-application-appears-with-black-bars-on-top-and-bottom – Frank Fung Oct 19 '15 at 19:01

2 Answers2

1

LaunchScreen file should be xxx.Storyboard Actually Main is the main storyboard file where all your views are designed. You should Change it with LaunchScreen.Storyboard or LaunchScreen.xib ... But if you have image.assets you can click on use asset Catalog and then in launch image fill all the images required with all sizes you need. (if you will use catalogs, don't forget to clear Launch Screen File name (leave it blank))

C0mrade
  • 1,215
  • 1
  • 10
  • 23
  • Thanks for your help, but Xcode return the same error message to me. – Frank Fung Oct 19 '15 at 19:41
  • are your images .PNG? – C0mrade Oct 19 '15 at 19:42
  • John, i used LaunchScreen.storyboard. and the Launch Images keeps empty. – Frank Fung Oct 19 '15 at 19:45
  • in the LaunchImages is there all required images filled in? or there are some warnings? – C0mrade Oct 19 '15 at 19:48
  • One warning, i think is the most related stated this: Applications using launch screen files and targeting iOS 7.1 and earlier need to also include a launch image in an asset catalog. However, I don't have any launch image available and set into the image assets nor the launch image is defined in the App Icons and Launch Images section – Frank Fung Oct 19 '15 at 19:52
  • if your app supports 7.1 you should add images but if not you can just uncheck it in LuanchImage catalog. – C0mrade Oct 19 '15 at 19:55
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/92771/discussion-between-john-malkovich-and-frank-fung). – C0mrade Oct 19 '15 at 20:34
0

Do not use Main as the launch screen storyboard. Main is your main storyboard; it's where your interface comes from when the app actually runs. Use a separate launch screen storyboard as your launch storyboard; its structure is completely different, and having the right structure will solve the problem.

matt
  • 515,959
  • 87
  • 875
  • 1,141
  • Thanks for your help. I have tried to follow John's and your's suggestion but XCode give me the same error message. – Frank Fung Oct 19 '15 at 19:44