I have a SwiftUI project, iOS16, it builds fine if I choose a simulator/device, but when I choose Any iOS Device (arm64)
and hit Archive, it fails with error:
error build: Entry point (_main) undefined. for architecture arm64
I'm using an M1 Mac Studio to build it.
I have the following in my main:
@main
struct MyAppNameApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
...
}
class AppDelegate: NSObject, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
// Sets cache for Images downloader SDWebImageSwiftUI
// ...
return true
}
}
Under Architectures I have the following:
Should I select for release Yes as well?
Why is it failing? What setting do I have to look into?
Thanks