0

What I have?

An old project using Swift 2 and building/running without any issue on Xcode 7. It has a lot of dependencies and sophisticated architecture which makes it complicated to migrate to swift 3/4 (in a short period of time).

When app is running on iPhone X it has black bars on top and bottom of the sreen (sizing like on iPhone 6/7/8)

What I need?

I need to make the app running on iPhone X without black bars on top and bottom of the screen (fullscreen) without updating whole project. Are there any ways making it possible?

What I've tried?

  • Making constraints directly to the containing superviews and not the layoutGuide
  • Removing launchScreen assets and sticking only to LaunchScreen.xib
Cœur
  • 37,241
  • 25
  • 195
  • 267
ezkeemo
  • 100
  • 8
  • You'll have to upgrade the project to swift 4, since the iPhone X support is only available to projects compiled with Xcode 9. Any compiled frameworks should work without modifications. – Sam Feb 04 '18 at 15:25
  • Also, not upgrading the project isn't sustainable. Upon migration, try and build the project. Sometimes Xcode shows an overwhelming amount of errors and warnings, which get fixed on the first build after migrating. – Sam Feb 04 '18 at 15:29
  • @Sam Thanks! I understand migrating to swift 4 is necessary and will simplify the work some time in future, but for now i need only this thing. And i did the trick in Xcode 8 before, so i was hoping it's possible somehow in Xcode 7 – ezkeemo Feb 04 '18 at 15:47
  • What trick in Xcode 8? I'm not aware of solutions for fullscreen iPhone X support in Xcode 8. Do you have a link? – Cœur Feb 04 '18 at 17:11

1 Answers1

2

There are only two ways to remove black bars for a newer device size:

  • Launchscreen images assets with the new size
  • Launchscreen storyboard

And, well, you're out of luck, because both solutions require Xcode 9 for iPhone X size support. So you must go for Swift 3.2 at least.

Cœur
  • 37,241
  • 25
  • 195
  • 267