ios-swift-development by aj-geddes/useful-ai-prompts
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill ios-swift-development使用 Swift 及包括 SwiftUI、Combine 和 async/await 模式在内的现代框架,构建高性能的原生 iOS 应用程序。
最小工作示例:
import Foundation
import Combine
struct User: Codable, Identifiable {
let id: UUID
var name: String
var email: String
}
class UserViewModel: ObservableObject {
@Published var user: User?
@Published var isLoading = false
@Published var errorMessage: String?
private let networkService: NetworkService
init(networkService: NetworkService = .shared) {
self.networkService = networkService
}
@MainActor
func fetchUser(id: UUID) async {
isLoading = true
errorMessage = nil
// ... (完整实现请参阅参考指南)
references/ 目录下的详细实现:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 指南 | 内容 |
|---|---|
| MVVM 架构设置 | MVVM 架构设置 |
| 使用 URLSession 的网络服务 | 使用 URLSession 的网络服务 |
| SwiftUI 视图 | SwiftUI 视图 |
每周安装数
494
代码仓库
GitHub 星标数
116
首次出现
2026年1月21日
安全审计
安装于
opencode435
codex423
gemini-cli416
claude-code369
github-copilot367
cursor366
Build high-performance native iOS applications using Swift with modern frameworks including SwiftUI, Combine, and async/await patterns.
Minimal working example:
import Foundation
import Combine
struct User: Codable, Identifiable {
let id: UUID
var name: String
var email: String
}
class UserViewModel: ObservableObject {
@Published var user: User?
@Published var isLoading = false
@Published var errorMessage: String?
private let networkService: NetworkService
init(networkService: NetworkService = .shared) {
self.networkService = networkService
}
@MainActor
func fetchUser(id: UUID) async {
isLoading = true
errorMessage = nil
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| MVVM Architecture Setup | MVVM Architecture Setup |
| Network Service with URLSession | Network Service with URLSession |
| SwiftUI Views | SwiftUI Views |
Weekly Installs
494
Repository
GitHub Stars
116
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode435
codex423
gemini-cli416
claude-code369
github-copilot367
cursor366
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
103,800 周安装