1、初始化项目工程
- 使用xcode创建swift项目空工程
 - 进入swift项目文件夹,
cd #swift项目文件夹# - 初始化cocoapods ,执行
pod init - 编辑profile文件,加入需要引入的第三方库
 - 保存,并执行命令 
pod install 使用纯代码方式初始化项目,考虑已经支持iOS13及以上系统,所以使用
SceneDelegate- 需要在General里面的Deployment Info下的Main Interface 删除
 - 在SceneDelegate.swift中添加初始化控制器
if scene is UIWindowScene {let window = UIWindow(windowScene: scene as! UIWindowScene)let nav = UINavigationController(rootViewController: ViewController())window.rootViewController = navself.window = windowwindow.makeKeyAndVisible()}
 
关于iOS 13之后的
SceneDelegate可以查看这篇文章- 至此,项目初始化已经完成
 
2、配置第三方库
- 网络:
pod 'Moya' 
