The simulator launches but the button letters don't appear and I cannot click the Button to change the screen.
Post
Replies
Boosts
Views
Activity
I got rid of that infinity symbol in front of @main and it got rid of that error and would actually build and run. But now I run into another issue on the AppDelegate screen.
Now on the AppDelegate screen where it shows @main I get an X Expected Expression next to it.
// AppDelegate.swift
// Light
//
// Created on 6/28/23.
//
import UIKit
∞@main
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
// MARK: UISceneSession Lifecycle
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}
I was using Xcode 14.3, iOS 16.2 simulator. I have just updated to Sonoma and have Xcode 15.0, iOS simulator 15. Button type is System. Even in Xcode 15 I still have this issue.