- Home
- Skills
- Mobile Development
- apple skills
apple skills
Up-to-date Apple platform development reference for Swift, SwiftUI, visionOS, and Xcode.
Free
Works with the AI Agents you already use
apple skills
Example session with this skill installed
How do I implement a background task for a Live Activity in SwiftUI?
- Read your context and instructions
- Compiled the apple
I have fetched the latest reference for background-tasks-live-activities from the Apple Dev Skills repository to provide an up-to-date implementation.
Live Activity Background Updates
To update a Live Activity from the background, you must use ActivityKit combined with Push Notifications or background tasks. Below is a modern implementation using ActivityConfiguration.
import ActivityKit
import WidgetKit
import SwiftUI
struct PizzaDeliveryAttributes: ActivityAttributes {
public struct ContentState: Codable, Hashable {
var driverName: String
var estimatedDeliveryTime: Date
}
var orderNumber: Int
}
@main
struct PizzaWidget: Widget {
var body: some WidgetConfiguration {
ActivityConfiguration(for: PizzaDeliveryAttributes.self) { context in
VStack {
Text("Order #\(context.attributes.orderNumber)")
Text("Driver: \(context.state.driverName)")
}
.activityBackgroundTint(Color.cyan)
} dynamicIsland: { context in
DynamicIsland {
DynamicIslandExpandedRegion(.leading) {
Text("Pizza")
}
DynamicIslandExpandedRegion(.trailing) {
Text(context.state.estimatedDeliveryTime, style: .timer)
}
} compactLeading: {
Text("L")
} compactTrailing: {
Text(context.state.estimatedDeliveryTime, style: .timer)
} minimal: {
Image(systemName: "cart")
}
}
}
}
// To update from background:
func updateActivity(id: String, newTime: Date) async {
let activity = Activity<PizzaDeliveryAttributes>.activities.first { $0.id == id }
let updatedState = PizzaDeliveryAttributes.ContentState(driverName: "John", estimatedDeliveryTime: newTime)
await activity?.update(using: updatedState)
}
Next steps
- Add the
NSSupportsLiveActivitieskey to yourInfo.plist. - Ensure your App Group is configured if sharing data between the main app and the Widget extension.
- Check the
performance-memory-profilingskill if you experience high CPU usage during updates.
Connects securely to your tools. The creator never sees your data.
About this skill
Apple platform development moves fast, and LLM training data often trails behind the latest SwiftUI modifiers or Swift concurrency patterns. This skill connects your agent to a curated, daily-updated library of Apple development references to ensure code follows current best practices.
What it does
- Fetch fresh references via a direct connection to the
apple-dev-skillsrepository for up-to-date documentation. - Provide code examples across Swift, SwiftUI, and specialized frameworks like SwiftData and WidgetKit.
- Guide architecture with patterns for MVVM, TCA, and Clean Architecture specifically for iOS and macOS.
- Assist spatial computing using visionOS references for immersive and spatial app development.
- Optimize performance with specialized guides on memory profiling and Xcode Instruments.
How it works
- Analyze the query to identify the specific Apple platform or framework involved.
- Retrieve the skills index by fetching the latest
README.mdfrom the remote repository. - Select the relevant skill file based on the identified topic slug.
- Apply fetched content to generate implementation details, code snippets, or architectural advice.
Frameworks & tools
The skill covers the entire Apple ecosystem including Swift, SwiftUI, UIKit, AppKit, visionOS, WidgetKit, SwiftData, and Combine. It includes tooling guidance for Xcode, Swift Package Manager, and Instruments.
Why this beats prompting it yourself
Generic LLMs often hallucinate deprecated APIs or mix up SwiftUI versions. This skill forces the agent to use specific, verified reference files updated daily, ensuring your code uses modern features like Swift Testing and String Catalogs instead of legacy patterns.
Use cases
- Implement complex SwiftUI animations or interactive widgets using the latest APIs.
- Refactor networking layers using async/await and URLSession best practices.
- Setup on-device AI integration using the Foundation Models framework.
- Debug memory leaks or performance bottlenecks using Xcode-specific profiles.
Known limitations
Requires an active internet connection to fetch the latest markdown files from GitHub. Scope is limited to the topics available in the apple-dev-skills repository.
Requires internet access to fetch remote skill files. Limited to the curated topics available in the referenced GitHub repository.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 5 days ago
- Free with an Agensi account
Requires
Permissions
Allowed Hosts