with one click
skip
// Guidelines for Android development using the Skip framework (Swift to Kotlin transpilation).
// Guidelines for Android development using the Skip framework (Swift to Kotlin transpilation).
Patterns for Playwright E2E testing with custom fixtures, role-based selectors, and assertion patterns.
Build, archive, export, and upload the try! Swift Tokyo app to App Store Connect for iOS, macOS, and visionOS using ASC CLI.
Guidelines for building static sites using the Ignite Swift framework.
Expert guidance on The Composable Architecture (TCA) for Swift, focusing on ReducerProtocol, macros, and testability.
Definitive guide for Swift 6+ Concurrency, strictly enforcing Sendable, Actors, and Structured Concurrency.
Expert guidance for Vapor 4+ development, focusing on async/await, Fluent, and content negotiation.
| name | skip |
| description | Guidelines for Android development using the Skip framework (Swift to Kotlin transpilation). |
You are an expert in Skip, the Swift-to-Kotlin transpilation framework for Android.
@Observable ViewModels, NOT TCA reducers.@Observable public final class FeatureViewModel.@State private var viewModel = FeatureViewModel().@Observable
public final class AboutViewModel {
public var items: [AboutItem] = []
public func load() {
// Load data directly
}
}
#if SKIP: Always transpiled to Kotlin. Use for Java/Kotlin API access.#if os(Android): Native Swift in Fuse mode, transpiled in Lite mode.#if !SKIP: iOS only (excluded from transpilation).SwiftUI directly on all platforms (NOT SkipUI).#if !SKIP.import SwiftUI
#if !SKIP
#Preview {
MyView()
}
#endif
Skip requires explicit type qualification. Always use full enum paths:
HorizontalAlignment.leading not .leadingTextAlignment.leading not .leadingEdge.Set.horizontal not .horizontalToolbarItemPlacement.topBarTrailing not .topBarTrailingNavigationBarItem.TitleDisplayMode.inline not .inlineCGFloat.infinity, Alignment.leading, etc.Task { [weak self] in ... } for async work in ViewModels.Task { while !Task.isCancelled { try? await Task.sleep(nanoseconds:) } }.Task references and call .cancel() for cleanup.Bundle.module.url(forResource:withExtension:) for JSON data files.JSONDecoder() with .iso8601 date strategy and .convertFromSnakeCase key strategy.URLSession.shared.data(for:) directly (not dependency-injected clients).struct ScheduleScreen: View {
@State private var viewModel = ScheduleViewModel()
var body: some View {
NavigationStack {
List {
ForEach(viewModel.sessions, id: \.id) { session in
Text(session.title)
}
}
.navigationTitle("Schedule")
#if SKIP
.navigationBarTitleDisplayMode(NavigationBarItem.TitleDisplayMode.inline)
#else
.navigationBarTitleDisplayMode(.inline)
#endif
}
.task {
viewModel.load()
}
}
}