Last active
October 17, 2020 15:09
-
-
Save pofat/dd1ec8e5082f4ad698e7b67aaeca4849 to your computer and use it in GitHub Desktop.
How to write main function in a Swift iOS project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import UIKit | |
UIApplicationMain(CommandLine.argc, CommandLine.unsafeArgv, NSStringFromClass(UIApplication.self), NSStringFromClass(AppDelegate.self)) | |
// Remeber to comment or remove `@UIApplicationMain` in your AppDelegate.swift |
Why not just pass
CommandLine.unsafeArgv
toUIApplicationMain
's second parameter?
@kylinroc Thanks for the suggestion!!! I just did not notice that property.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why not just pass
CommandLine.unsafeArgv
toUIApplicationMain
's second parameter?