Community-maintained Agent Skills for complete Swift and Apple-platform app delivery.
72
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Medium
Suggest reviewing before use
Bridge UIKit and SwiftUI in both directions: wrap UIKit views and controllers for use in SwiftUI, embed SwiftUI views into existing UIKit view hierarchies, and coordinate state updates safely. Targets Swift 6.3 / iOS 26+.
UIViewRepresentable: Wraps a custom UIView (e.g., text views, maps, custom controls).UIViewControllerRepresentable: Wraps a UIViewController (e.g., camera controllers, document pickers, share sheets).UIHostingController: Embeds SwiftUI views into UIKit view controller hierarchies.UIHostingConfiguration: Embeds SwiftUI views directly into UICollectionView and UITableView cells (iOS 16+).makeCoordinator() ──> makeUIView(context:) ──> updateUIView(uiView, context:) ──> dismantleUIView(uiView, coordinator:)makeCoordinator(): Called once to create the delegate/coordinator object.makeUIView(context:): Called once to instantiate the UIKit view and assign delegates.updateUIView(_:context:): Called on every SwiftUI state change affecting the view. Must be idempotent.dismantleUIView(_:coordinator:): Cleanup point when the view leaves the hierarchy. Invalidate timers, unregister observers.[!WARNING] Prevent infinite update cycles: When UIKit notifies the coordinator of a change (e.g.,
textViewDidChange), the coordinator updates SwiftUI state via@Binding. This triggersupdateUIView. Always check for value equality before applying updates to the UIKit view:if uiView.text != text { uiView.text = text }
When adding a UIHostingController as a child view controller:
addChild(hostingController)view.addSubview(hostingController.view)hostingController.didMove(toParent: self)Use UIHostingConfiguration for modern cell layouts in UICollectionView/UITableView without manual controller management.
MKMapView, UITextView, and camera capture controllers, read Map, Text, and Camera Wrappers.PHPickerViewController, MFMailComposeViewController, UIActivityViewController, and search controllers, read Picker, Mail, Share, and Search Wrappers.PDFView, QLPreviewController, and MFMessageComposeViewController, read PDF and Message Wrappers.updateUIView instead of configuring the existing instance.updateUIView, triggering continuous render feedback loops.UIHostingController's view without calling addChild and didMove(toParent:).dismantleUIView.sizeThatFits) in custom representables.makeCoordinator used for delegates, target-actions, and data sourcesupdateUIView guards against redundant assignments to avoid feedback loopsaddChild, didMove) properly pairedUIHostingConfiguration where availabledismantleUIViewtranslatesAutoresizingMaskIntoConstraints = false.tessl-plugin
skills
accessorysetupkit
references
activitykit
adattributionkit
references
alarmkit
references
app-clips
app-intents
app-store-optimization
app-store-review
apple-on-device-ai
appmigrationkit
audioaccessorykit
references
authentication
references
avfoundation-audio
references
avkit
background-processing
references
browserenginekit
callkit
references
carplay
cloudkit
contacts-framework
references
core-bluetooth
references
core-data
core-haptics
references
core-motion
references
core-nfc
references
coreml
references
cryptokit
cryptotokenkit
debugging-instruments
device-integrity
references
energykit
references
eventkit
family-controls
references
financekit
focus-engine
gamekit
git-branching-workflow
references
healthkit
references
homekit
references
ios-accessibility
ios-app-workflow
references
ios-ettrace-performance
ios-localization
ios-memgraph-analysis
ios-networking
ios-simulator
references
metrickit
references
musickit
references
natural-language
paperkit
references
passkit
references
pdfkit
pencilkit
references
permissionkit
references
photokit
push-notifications
quicklook
references
realitykit
references
relevancekit
references
scenekit
sensorkit
shazamkit
references
speech-recognition
references
spritekit
storekit
swift-api-design-guidelines
swift-architecture
references
swift-charts
swift-codable
references
swift-code-review
swift-concurrency
swift-formatstyle
references
swift-language
swift-security
references
swift-testing
swiftdata
swiftlint
swiftui-animation
swiftui-gestures
references
swiftui-layout-components
swiftui-liquid-glass
references
swiftui-patterns
swiftui-performance
swiftui-responsive-layout
swiftui-uikit-interop
swiftui-webkit
tabletopkit
tipkit
vision-framework
weatherkit
references