本文适配xcode10.1
1. 新建一个main.swift文件,在其中添加如下代码
import Foundation
import UIKit
private let pointer = UnsafeMutableRawPointer(CommandLine.unsafeArgv).bindMemory(
to: UnsafeMutablePointer<Int8>.self,
capacity: Int(CommandLine.argc)
)
UIApplicationMain(
CommandLine.argc,
pointer,
NSStringFromClass(UIApplication.self),
NSStringFromClass(AppDelegate.self)
)
2. 注释Appdelegate中的@UIApplicationMain
//@UIApplicationMain
网友评论