π¦ ClawHub
iOS
by @ivangdavila
Build, test, and ship iOS apps with Swift, Xcode, and App Store best practices.
TERMINAL
clawhub install iosπ About This Skill
name: iOS description: Build, test, and ship iOS apps with Swift, Xcode, and App Store best practices. metadata: {"clawdbot":{"emoji":"π±","requires":{"bins":["xcodebuild"]},"os":["darwin"]}}
iOS Development Rules
Xcode & Build
xcodebuild -showsdks lists available SDKs β useful when builds fail with "SDK not found"Code Signing
SwiftUI Patterns
@State for view-local data, @StateObject for owned ObservableObjects, @ObservedObject for passed-in objects β mixing them wrong causes crashes or lost stateList with id: \.self on non-Hashable types causes silent failures β always use explicit id parameter with stable identifierstask modifier cancels automatically on view disappear β no manual cancellation needed, but check Task.isCancelled in loops@Environment values are nil in previews unless explicitly provided β wrap previews in container with environment setApp Store Rules
Info.plist Requirements
ITSAppUsesNonExemptEncryption = NO avoids export compliance questions for most apps β add it to skip the daily annoyanceLSApplicationQueriesSchemes must list URL schemes before canOpenURL works β iOS 9+ security requirementUIRequiresFullScreen = YES on iPad opts out of multitasking β use only if your app truly can't support split viewPerformance
Instruments > Time Profiler reveals actual bottlenecks β don't guess, measure@MainActor annotation ensures UI updates happen on main thread β missing it causes random crashes under load[weak self] in escaping closures that reference selfList with thousands of items is fast, ForEach in ScrollView is not β List uses cell reuse, ScrollView loads everythingDebugging
po in LLDB prints object description, p prints raw value β use po for most debugging-com.apple.CoreData.SQLDebug 1 in launch arguments shows all Core Data queries β essential for debugging fetch performance