# swiftUI+MVVM+repository+router **Repository Path**: wang-guanglei99/swiftUIFragework ## Basic Information - **Project Name**: swiftUI+MVVM+repository+router - **Description**: 1.基于swiftui,采用mvvm + repository(仓库):仓库目前直接请求http,仓库的目的是方便扩展http+本地缓存; 2.view直接跳转使用router路由; 3. http的baseurl采用开关,debug模式和非debug模式采用不同baseurl。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2025-08-30 - **Last Updated**: 2025-08-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 参考 swiftui组件:https://github.com/Jinxiansen/SwiftUI/tree/master 在此基础上,结合mvvm+repository,实现一套架构,repository目前使用moya,使用者可以根据实际情况整改,如moya+本地存储; 我这里为什么使用swiftui+mvvm+repository: 1. 本人android开发,swiftui入手相对来说简单; 2. mvvm + repository框架我一直在用这套思想,所以在ios中继续沿用; 3. 本人比较喜欢路由,所以在这里view的跳转也加入了路由的概念:AppRouter; 4. 网络请求url使用了debug开关:AppConfig。 # 引入三方库 当前项目使用cocoapods管理第三方库,使用命令行到SwiftUI+MVVM+Repository,执行: 1. pod init 2. pod install > 前提条件安装cocoapods管理库 > 代码难度系数相对较低,这里不做叙述,请自行观看