Storyboard target in Beta

I am currently running Xcode Version 14.0 beta (14A5228q) creating a Multiplatform app. I wanted to include a LaunchScreen so added a Launch Screen Storyboard to my project. To the the app to see it I went under Target for my app, General, and under App Icons and Launch Screen I set the Launch Screen File to my storyboard.

This works perfectly when I run the app on iOS; however, when I run it on macOS I get an error:Launch Screen.storyboard error build: iOS storyboards do not support target device type "Mac".

I see there's no way to differentiate between macOS and iOS with the file and there's only one target. Does anyone know a way to make the storyboard only launch when running the iOS app (and iPadOS) and not be seen when running macOS?

Thanks

Answered by Jonathan08 in 818969022

If you still want to have story board launch screen I had this exact same issue but managed to solve it by only accepting iOS in Copy Bundle Resources, see this image I made to demonstrate:

(modified the image from https://developer.apple.com/documentation/xcode/customizing-the-build-phases-of-a-target)

EDIT: I found this thread with the same solution: https://stackoverflow.com/questions/72853807/is-it-possible-to-skip-launchscreen-storyboard-file-when-running-a-multiplatform

In case anyone has the same issue going to get around it by NOT using the storyboard file. Instead set the Plist Launch Screen background color (skipping image as it's stretched weirdly) and creating a custom LaunchScreen view that the app goes through before ContentView. Since they both have the same background color it merges from the default "launch screen" then my custom one and finally my main app ContentView.

Accepted Answer

If you still want to have story board launch screen I had this exact same issue but managed to solve it by only accepting iOS in Copy Bundle Resources, see this image I made to demonstrate:

(modified the image from https://developer.apple.com/documentation/xcode/customizing-the-build-phases-of-a-target)

EDIT: I found this thread with the same solution: https://stackoverflow.com/questions/72853807/is-it-possible-to-skip-launchscreen-storyboard-file-when-running-a-multiplatform

Storyboard target in Beta
 
 
Q