Loading...
Loading...
Expert guidance on building, debugging, and testing multiplatform iOS/Android apps and frameworks with Skip (skip.dev). Use when developers mention: (1) Skip, Skip.dev, skip-tools, or SkipStack, (2) building a multiplatform iOS+Android app from Swift/SwiftUI, (3) Skip Fuse (native) or Skip Lite (transpiled) modes, (4) transpiling Swift to Kotlin, (5) SwiftUI to Jetpack Compose bridging, (6) skip.yml configuration, (7) debugging Android builds from Xcode, (8) Skip CLI commands (skip create/init/test/export), (9) conditional compilation with #if SKIP or #if os(Android), (10) Skip Comments (SKIP INSERT/REPLACE/DECLARE/NOWARN), (11) bridging Swift and Kotlin code, (12) Skip module dependencies or Android Gradle configuration.
npx skill4agent add bphvz/skip-skills skip-devIs this a NEW project?
├── YES → Does it need C/C++ code or complex Swift features?
│ ├── YES → Use Skip Fuse (native)
│ └── NO → Does app size matter (Fuse adds ~60MB)?
│ ├── YES → Use Skip Lite (transpiled)
│ └── NO → Use Skip Fuse (native) — preferred default
└── NO → Check skip.yml for `mode:` setting
├── mode: 'native' → Skip Fuse
└── mode: 'transpiled' → Skip Lite#if SKIP# For Fuse (native) mode:
mode: 'native'
bridging: true
# For Lite (transpiled) mode:
mode: 'transpiled'MyApp/
├── Package.swift # SPM dependencies & targets
├── Skip.env # Skip environment config
├── Sources/
│ ├── MyApp/ # Main app module (SwiftUI views)
│ │ ├── MyApp.swift # App entry point (@main)
│ │ ├── ContentView.swift
│ │ └── Skip/ # Android-specific Kotlin files
│ │ └── skip.yml # Skip module configuration
│ └── MyAppModel/ # Shared model module
│ ├── DataModel.swift
│ └── Skip/
│ └── skip.yml
├── Tests/
│ ├── MyAppTests/
│ └── MyAppModelTests/
├── Darwin/ # iOS-specific
│ ├── MyApp.xcodeproj
│ ├── MyApp.xcconfig
│ ├── Assets.xcassets/
│ └── Info.plist
└── Android/ # Android-specific
├── settings.gradle.kts
└── app/
├── build.gradle.kts
├── src/main/AndroidManifest.xml
└── src/main/kotlin/.../Main.ktMyFramework/
├── Package.swift
├── Sources/
│ └── MyFramework/
│ ├── MyFramework.swift
│ └── Skip/
│ └── skip.yml
└── Tests/
└── MyFrameworkTests/
└── MyFrameworkTests.swift.xcodeprojDarwin/SkipStone/plugins.xcconfigSKIP_ACTION = launch # Build and launch Android emulator (default)
SKIP_ACTION = build # Build Android only, don't launch
SKIP_ACTION = none # Skip Android build entirely# Build iOS project
xcodebuild -project Darwin/MyApp.xcodeproj -scheme MyApp \
-destination 'platform=iOS Simulator,name=iPhone 17 Pro,OS=latest' build
# Export Android APK
skip export --project Darwin/MyApp.xcodeproj --appid com.example.myapp# Run against macOS destination to trigger Android build
swift test
# OR
skip testOSLog.Loggerprint()import OSLog
let logger = Logger(subsystem: "com.example.myapp", category: "networking")
logger.info("Request started: \(url)")
logger.error("Request failed: \(error.localizedDescription)")# Filter logs by app tag
adb logcat -s MyApp
# Filter by Skip logger output
adb logcat | grep "com.example.myapp"SkipStone/pluginsSkipLink/SkipStone/pluginsSkipLink.kt.ktxcrun swift-demangle <mangled_symbol>| Error | Cause | Fix |
|---|---|---|
| Skip plugin not installed | Run |
| Unsupported Swift API on Android | Use |
| Gradle sync failure | Android SDK issue | Run |
| Missing bridge annotation | Add |
| Using unsupported SkipUI feature | Check SkipUI docs; provide Android-specific alternative |
xcodebuildskip testSkipStone/pluginsSkipLink#if os(Android)#if !os(Android)#if SKIPSKIP INSERTSKIP REPLACESKIP DECLARESKIP NOWARNSkip/# Swift tests only (iOS)
swift test
# Cross-platform parity tests (iOS + Android via Robolectric)
skip test
# Android emulator tests
ANDROID_SERIAL=emulator-5554 skip testimport XCTest
final class MyTests: XCTestCase {
func testSharedLogic() {
// Runs on both platforms
XCTAssertEqual(calculate(2, 3), 5)
}
#if !os(Android)
func testIOSOnly() {
// iOS-specific test
}
#endif
#if os(Android) || ROBOLECTRIC
func testAndroidOnly() {
// Android-specific test (runs on Robolectric too)
}
#endif
}#if os(Android) || ROBOLECTRIC#if os(Android)
// Android-only code
#else
// iOS-only code
#endif
#if !os(Android)
// iOS-only code
#endif
#if SKIP
// Only in transpiled Kotlin code (Skip Lite)
// Can call Kotlin/Java APIs directly here
#endif
#if !SKIP
// Only in native Swift (iOS, or Fuse Android)
#endif
#if ROBOLECTRIC
// Only during Robolectric test execution
#endif// SKIP INSERT: val androidSpecificVal = "only in Kotlin output"
// SKIP REPLACE: fun customKotlinImplementation() { ... }
func swiftImplementation() { ... }
// SKIP DECLARE: annotation class MyAnnotation
// SKIP DECLARE: typealias PlatformType = android.content.Context
// SKIP NOWARN
let _ = someUnsupportedPattern // Suppresses transpilation warning
// SKIP @bridge
public func bridgedFunction() { } // Exposes to Kotlin in Fuse mode
// SKIP @nobridge
public func noBridge() { } // Prevents bridging
// SKIP @nocopy
struct LargeData { } // Skip copy semantics for structs
// SKIP SYMBOLFILE
// Generates .skipmodule symbol file for the moduleskip create # Interactive project creation wizard
skip init # Non-interactive project init
skip test # Run cross-platform tests
skip export # Export Android APK/AAB
skip checkup # Verify Skip installation
skip doctor # Diagnose and fix issues
skip upgrade # Update Skip to latest version
skip verify # Verify project configuration
# Android-specific
skip android build # Build Android project
skip android test # Run Android tests
skip android emulator create # Create AVD emulator
skip android emulator launch # Launch emulator
skip android sdk install # Install Android SDK components
skip android sdk list # List available SDK packagesreferences/references/transpilation.mdreferences/skip-ui.mdreferences/cross-platform.mdreferences/bridging.mdreferences/dependencies.mdreferences/cli.mdreferences/unit-testing.mdswift testskip testread_file('<base_dir>/references/<filename>')