Swift Development Skill enables iOS and macOS app development using Claude Code. Operations teams benefit from automated code generation, debugging, and optimization. It connects to Xcode and SwiftUI workflows, accelerating app development and reducing manual coding efforts.
git clone https://github.com/hmohamed01/swift-development.gitSwift Development Skill enables iOS and macOS app development using Claude Code. Operations teams benefit from automated code generation, debugging, and optimization. It connects to Xcode and SwiftUI workflows, accelerating app development and reducing manual coding efforts.
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/hmohamed01/swift-developmentCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Generate a SwiftUI view for a [COMPANY] app in the [INDUSTRY] sector. The view should display [DATA] in a scrollable list with a search bar. Include error handling and state management using Combine. Provide the code and explain key components.
# SwiftUI View for [COMPANY] App
Here's a complete SwiftUI view for displaying [DATA] in a scrollable list with search functionality:
```swift
import SwiftUI
import Combine
struct DataView: View {
@State private var searchText = ""
@State private var dataItems: [DataItem] = []
@State private var isLoading = false
@State private var errorMessage: String?
private var filteredItems: [DataItem] {
if searchText.isEmpty {
return dataItems
} else {
return dataItems.filter { $0.name.localizedCaseInsensitiveContains(searchText) }
}
}
var body: some View {
NavigationView {
VStack {
if isLoading {
ProgressView()
} else if let errorMessage = errorMessage {
Text(errorMessage)
.foregroundColor(.red)
} else {
List(filteredItems) { item in
VStack(alignment: .leading) {
Text(item.name)
.font(.headline)
Text(item.description)
.font(.subhead)
}
}
}
}
.navigationTitle("[DATA] List")
.searchable(text: $searchText)
.onAppear {
loadData()
}
}
}
private func loadData() {
isLoading = true
errorMessage = nil
// Simulate network request
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
// In a real app, you would make an actual network request here
// For this example, we'll use mock data
dataItems = [
DataItem(name: "Item 1", description: "Description for item 1"),
DataItem(name: "Item 2", description: "Description for item 2"),
DataItem(name: "Item 3", description: "Description for item 3"),
DataItem(name: "Item 4", description: "Description for item 4"),
DataItem(name: "Item 5", description: "Description for item 5")
]
isLoading = false
}
}
}
struct DataItem: Identifiable {
let id = UUID()
let name: String
let description: String
}
```
## Key Components Explained
1. **State Management**: The view uses `@State` properties to manage its internal state, including the search text, data items, loading state, and error messages.
2. **Search Functionality**: The `filteredItems` computed property filters the data items based on the search text.
3. **Error Handling**: The view displays an error message if one occurs during data loading.
4. **Loading State**: A `ProgressView` is shown while data is being loaded.
5. **List Display**: The filtered items are displayed in a scrollable list using the `List` view.
6. **Navigation**: The view is wrapped in a `NavigationView` with a title.
7. **Data Loading**: The `loadData()` function simulates a network request to load data.AI assistant built for thoughtful, nuanced conversation
IronCalc is a spreadsheet engine and ecosystem
Service Management That Turns Chaos Into Control
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan