PluginBench
Skill
Pass
Audit score 90

ios-swift-development

aj-geddes/useful-ai-prompts

Develop native iOS apps with Swift, SwiftUI, MVVM, and modern async patterns.

What is ios-swift-development?

Build high-performance native iOS applications using Swift with modern frameworks including SwiftUI, Combine, and async/await patterns. Use this when creating native iOS apps that require optimal performance, iOS-specific features, or declarative UI development.

  • Implement MVVM architecture for scalable app structure
  • Build declarative UIs with SwiftUI
  • Handle networking with URLSession and async/await
  • Manage reactive state with Combine
  • Persist data using Core Data
  • Integrate with iOS hardware and platform APIs

How to install ios-swift-development

npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill ios-swift-development
Prerequisites
  • Xcode installed and configured
  • Basic Swift language knowledge
  • Understanding of iOS app lifecycle
Claude Code
Cursor
Windsurf
Cline

How to use ios-swift-development

  1. 1.Set up MVVM architecture with separate ViewModel and View layers
  2. 2.Create network service using URLSession with async/await for API calls
  3. 3.Build UI components with SwiftUI using @Published properties from ViewModels
  4. 4.Implement Combine publishers for reactive state management
  5. 5.Configure Core Data for local data persistence
  6. 6.Store sensitive data in Keychain, not UserDefaults
  7. 7.Test on multiple iOS versions before deployment

Use cases

Good for
  • Creating native iOS applications with optimal performance and tight hardware integration
  • Building apps with complex animations and transitions using SwiftUI
  • Implementing reactive data flows with Combine and async/await patterns
  • Developing apps requiring secure data persistence with Core Data and Keychain
  • Leveraging iOS-specific APIs and features unavailable in cross-platform frameworks
Who it's for
  • iOS developers building native applications
  • Teams prioritizing performance and native platform features
  • Developers transitioning from UIKit to SwiftUI
  • Engineers implementing MVVM architecture patterns

ios-swift-development FAQ

Should I use SwiftUI or UIKit?

Use SwiftUI for modern UI development. UIKit is deprecated for new projects and SwiftUI provides better performance and cleaner syntax.

How do I handle network requests safely?

Use URLSession with async/await patterns on background threads, validate all API responses, and store tokens in Keychain rather than UserDefaults.

What is MVVM and why use it?

MVVM (Model-View-ViewModel) separates UI logic from business logic, making code testable, maintainable, and reusable. ViewModels use @Published properties to drive UI updates.

How do I persist data locally?

Use Core Data for complex data persistence needs. For simple key-value storage, use UserDefaults, but never store sensitive data there.

Can I use force unwrapping in my code?

Avoid force unwrapping (!) in production code. Use optional binding, guard statements, or nil coalescing to handle optionals safely.

Full instructions (SKILL.md)

Source of truth, from aj-geddes/useful-ai-prompts.


name: ios-swift-development description: > Develop native iOS apps with Swift. Covers MVVM architecture, SwiftUI, URLSession for networking, Combine for reactive programming, and Core Data persistence.

iOS Swift Development

Table of Contents

Overview

Build high-performance native iOS applications using Swift with modern frameworks including SwiftUI, Combine, and async/await patterns.

When to Use

  • Creating native iOS applications with optimal performance
  • Leveraging iOS-specific features and APIs
  • Building apps that require tight hardware integration
  • Using SwiftUI for declarative UI development
  • Implementing complex animations and transitions

Quick Start

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)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
MVVM Architecture SetupMVVM Architecture Setup
Network Service with URLSessionNetwork Service with URLSession
SwiftUI ViewsSwiftUI Views

Best Practices

✅ DO

  • Use SwiftUI for modern UI development
  • Implement MVVM architecture
  • Use async/await patterns
  • Store sensitive data in Keychain
  • Handle errors gracefully
  • Use @StateObject for ViewModels
  • Validate API responses properly
  • Implement Core Data for persistence
  • Test on multiple iOS versions
  • Use dependency injection
  • Follow Swift style guidelines

❌ DON'T

  • Store tokens in UserDefaults
  • Make network calls on main thread
  • Use deprecated UIKit patterns
  • Ignore memory leaks
  • Skip error handling
  • Use force unwrapping (!)
  • Store passwords in code
  • Ignore accessibility
  • Deploy untested code
  • Use hardcoded API URLs