#import <UIKit/UIKit.h>
int main(int argc,char* argv[]){
return UIApplicationMain(argc,argv,nil,NSStringFromClass([AppDelegate class]));
}import UIKit
UIApplicationMain(CommandLine.argc,CommandLine.unsafeArgv,nil,NSStringFromClass(AppDelegate.self))The @UIApplicationMain attribute orders to generate a main function that calls the UIApplicationMain function with the current class as parameter.
Not supported. Write the
mainfunction manually.
@UIApplicationMain
class AppDelegate : UIResponder,UIApplicationDelegate{
}The @main attribute orders to make the static main function inside the current class the entry of the application. Because UIApplicationDelegate already implements such main function, nothing more is needed.
Not supported. Write the
mainfunction manually.
Since Swift 5.7
@main
class AppDelegate : UIResponder,UIApplicationDelegate{
}