Scaffold & Deploy Workflows
Create a New SwiftUI Project from Scratch
Section titled “Create a New SwiftUI Project from Scratch”Go from zero to a running app in one conversation.
-
Create the project:
“Create a new SwiftUI iOS project called TaskManager in ~/Projects with bundle ID com.mycompany.taskmanager”
{"name": "TaskManager","template": "swiftui","platform": "ios","outputPath": "/Users/dev/Projects","bundleId": "com.mycompany.taskmanager","organizationName": "My Company"} -
Build to verify:
“Build TaskManager for iPhone 16 simulator”
-
Boot a simulator and install:
“Boot the iPhone 16 simulator, install TaskManager, and launch it”
-
Take a screenshot to verify:
“Take a screenshot of the running app”
One-shot version:
“Create a new SwiftUI iOS project called TaskManager in ~/Projects, build it, boot the iPhone 16 simulator, install and launch the app, then take a screenshot”
Add a New Feature (View + ViewModel)
Section titled “Add a New Feature (View + ViewModel)”Scaffold the files for a new feature in your existing project.
-
Generate the ViewModel:
“Create a ViewModel called TaskListViewModel in ~/Projects/TaskManager/Sources/TaskManager/ViewModels”
Generated code:
import Foundation@Observableclass TaskListViewModel {// Add your properties hereinit() {}// Add your methods here} -
Generate the View:
“Create a SwiftUI view called TaskListView in ~/Projects/TaskManager/Sources/TaskManager/Views”
Generated code:
import SwiftUIstruct TaskListView: View {var body: some View {Text("TaskListView")}}#Preview {TaskListView()} -
Build to verify everything compiles:
“Build TaskManager for iPhone 16 simulator”
“Create a SwiftUI view called TaskDetailView with a preview”
The default — includes #Preview macro.
“Create a SwiftUI view called TaskDetailView without a preview”
{ "name": "TaskDetailView", "outputPath": "/Users/dev/Projects/TaskManager/Sources/TaskManager/Views", "includePreview": false}Widget Extension Setup
Section titled “Widget Extension Setup”Add a WidgetKit extension to your app.
-
Generate the widget:
“Create a static widget called TaskCountWidget in ~/Projects/TaskManager/Sources/TaskManagerWidget”
Generated code includes:
TimelineProviderwith placeholder, snapshot, and timeline methodsTimelineEntrywith date property- Widget view with
body @main Widgetconfiguration withStaticConfiguration
-
For a configurable widget:
“Create a configurable widget called TaskFilterWidget in ~/Projects/TaskManager/Sources/TaskManagerWidget”
{"name": "TaskFilterWidget","outputPath": "/Users/dev/Projects/TaskManager/Sources/TaskManagerWidget","kind": "configurable"}
Core Data Model Generation
Section titled “Core Data Model Generation”Generate NSManagedObject subclasses for your data model.
“Create a Core Data model called Task in my project’s Models directory”
Default attributes: id (UUID), name (String), createdAt (Date).
“Create a Core Data model called Task with these attributes: title (String), notes (String), isDone (Boolean), priority (Integer16), dueDate (Date)”
{ "name": "Task", "outputPath": "/Users/dev/Projects/TaskManager/Sources/TaskManager/Models", "attributes": [ { "name": "title", "type": "String" }, { "name": "notes", "type": "String" }, { "name": "isDone", "type": "Boolean" }, { "name": "priority", "type": "Integer16" }, { "name": "dueDate", "type": "Date" } ]}Generated code:
import CoreData
@objc(Task)public class Task: NSManagedObject { @NSManaged public var title: String? @NSManaged public var notes: String? @NSManaged public var isDone: Bool? @NSManaged public var priority: Int16 @NSManaged public var dueDate: Date?}Multiple Related Models
Section titled “Multiple Related Models”“Create Core Data models for a task management app:
- TaskList with name (String) and color (String)
- Task with title (String), notes (String), isDone (Boolean), priority (Integer16), dueDate (Date)
- Tag with name (String) and color (String)“
IPA Analysis and Permissions Audit
Section titled “IPA Analysis and Permissions Audit”Inspect an IPA before submission or after receiving a build.
-
Analyze the IPA:
“Analyze ~/Desktop/TaskManager.ipa”
IPA Analysis:File Size: 12.4 MBBundle ID: com.mycompany.taskmanagerVersion: 1.2.0 (42)Minimum OS: 17.0Architectures: arm64Embedded Frameworks:- SwiftUI.framework- Combine.framework -
Check privacy permissions:
“What privacy permissions does ~/Desktop/TaskManager.ipa request?”
Privacy Usage Descriptions:NSCameraUsageDescription: "Take photos of tasks"NSPhotoLibraryUsageDescription: "Attach photos to tasks"NSLocationWhenInUseUsageDescription: "Tag tasks with your current location" -
Check binary size breakdown:
“Show the binary size breakdown for the TaskManager executable”
Binary Size Analysis:__TEXT: 2.1 MB (code + constants)__DATA: 384 KB (initialized data)__LINKEDIT: 1.8 MB (symbol tables)Total: 4.3 MB
Code Signing Troubleshooting
Section titled “Code Signing Troubleshooting”Debug signing issues step by step.
-
Check what identities you have:
“List my code signing identities”
1) ABC123DEF456 "Apple Development: dev@example.com (XYZ789)"2) DEF456GHI789 "Apple Distribution: My Company (ABC123)"2 valid identities found -
Check provisioning profiles:
“List my provisioning profiles”
Verify the right profile exists and isn’t expired.
-
Inspect a specific profile:
“Inspect the provisioning profile at ~/Library/MobileDevice/Provisioning Profiles/abc123.mobileprovision”
Check the team ID, app ID, entitlements, and expiration date.
-
Check what the build expects:
“Show build settings for TaskManager in Release mode”
Compare
CODE_SIGN_IDENTITY,DEVELOPMENT_TEAM, andPROVISIONING_PROFILE_SPECIFIERwith what you found above. -
Check entitlements of a built app:
“Show the entitlements of the built TaskManager.app”
Verify push notifications, app groups, iCloud, and other capabilities are present.
dSYM Verification for Crash Reports
Section titled “dSYM Verification for Crash Reports”Ensure your dSYM files match your binary for symbolicated crash reports.
-
After archiving, verify the dSYM:
“Verify that ~/Desktop/TaskManager.xcarchive/dSYMs/TaskManager.app.dSYM matches the binary at ~/Desktop/TaskManager.xcarchive/Products/Applications/TaskManager.app/TaskManager”
dSYM Verification:dSYM UUID: A1B2C3D4-E5F6-7890-ABCD-EF1234567890 (arm64)Binary UUID: A1B2C3D4-E5F6-7890-ABCD-EF1234567890 (arm64)Result: MATCH ✓ -
If they don’t match:
Result: MISMATCH ✗The dSYM was not generated from the same build as the binary.This means you need to rebuild and re-archive.
Full Release Checklist
Section titled “Full Release Checklist”A comprehensive pre-release workflow.
“Run the full release checklist for TaskManager:
- Clean and build in Release mode
- Run all tests on iPhone 16 and iPad Pro simulators
- Run SwiftLint
- Check swift-format
- Archive and export IPA
- Analyze the IPA
- Check IPA permissions
- Verify dSYM matches the binary
- Show build warnings”
- Clean build in Release
- Test on iPhone 16 simulator
- Test on iPad Pro simulator
- Run SwiftLint analysis
- Check swift-format compliance
- Create archive
- Export IPA
- Analyze IPA (size, bundle ID, architectures)
- Audit privacy permissions
- Verify dSYM
- Review build warnings