0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Launch Screenが正しく期待通りに表示されない問題

Posted at

現象

LaunchScreen.storyboardを利用して起動時スプラッシュを表示しようとすると

  • ノッチあり端末では、スプラッシュが出るはずの画面が真っ暗になってしまう
  • ノッチなし端末では、期待通りに表示される

というややこしい問題が起きていた。

原因と解決方法

LaunchScreenにpdfを画像として利用していたことが原因。
これをpng画像に差し替えたところ、どちらでも期待通りに表示されるようになった。
AppleのLaunchScreen Debugガイドによると、LaunchScreenに使う画像はjpg/pngのどちらかでなければいけないそう。

The image in your launch screen storyboard did not originate from the target’s asset catalog. If you are using static images in your launch screen, check to make sure the image originates from the product’s asset catalog as a JPG or PNG image.

See Also

環境

Xcode 13.2.1
iOS 14.x/15.x
シミュレータ/実機どちらでも

検索用キーワード Debug Launch Screen with Safe Area(with notch) Not showing

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?