jdog
jdog

Reputation: 10769

Why is my initial ViewController not showing up on simulator only Hello World?

I am following the Udemy Advanced iOS and Firebase tutorial. His tutorial is on ios 8 and I am on 10, plus I am on Xcode 11.3 and he is on 9 I think.

Anyway, I followed the tutorial and when I launch it I get an error about LaunchScreen cannot use custom classes. So I unchecked use as Launch Screen. This now allows the simulator to run, but when it does I don't see the app I have built. All is show is a white screen with "Hello World" on it?

For some reason when I created a Single View app in Xcode it only created a LaunchScreen.storyboard so that is where I built my UI. I have noticed other tutorials Xcode automatically creates the Luanch storyboard and the Main storyboard?

Upvotes: 0

Views: 2132

Answers (1)

byaruhaf
byaruhaf

Reputation: 4743

The reason why you see the "Hello, World!" is you have created a SwiftUI app

For Xcode 11

When creating a new Xcode project and the user interface option is selected as SwiftUI as shown below

SwiftUI Option

Then the initial project files will only contain the LaunchScreen.storyboard and the other files listed below. To configure the UI one needs to write SwiftUI code in the ContentView.swift

SwiftUI Files

When creating a new Xcode project and the user interface option is selected as Storyboard as shown below

Storyboard Option

Then the initial project files will contain the LaunchScreen.storyboard and the Main.storyboard as shown below.

Storyboard Files

Upvotes: 3

Related Questions