A sample iOS app designed for cross-compilation on Linux.
This is a sample project from my SwiftTO talk "Beyond Xcode: Batteries Not Included".
See Slides.pdf.
Note that this has been tested on Ubuntu 22.04 for AArch64. Your mileage may vary on other Linux distros/setups.
Prerequisites:
swift-package-manager
fork
git clone https://github.com/kabiroberai/swift-package-manager -b kabir/develop
.swift build
.swift-package
, swift-build
, swift-run
, swift-experimental-sdk
tools (in .build/debug
) into your Swift 5.9 toolchain's bin directory, overwriting existing files.develop
branch of https://github.com/kabiroberai/swift-sdk-darwinResources/identity.p12
with the private key, certificate, as well as Apple's intermediate and root CAs.Resources/embedded.mobileprovision
.make do
and sit back :)These steps are designed for VSCode but you can adapt them to your preferred LSP-compatible IDE.
.vscode/settings.json
to use your home directory instead of /home/kabiroberai
Note that SourceKit-LSP does not officially support SwiftSDKs yet. While this repo implements a workaround, IDE experience will be sub-optimal until official support lands. See https://github.com/apple/sourcekit-lsp/issues/786.
make do
.make debug
in a background terminal window. Keep this running.(lldb) platform select remote-ios
(lldb) target create --no-dependents .build/debug/MyApp.app/MyApp
(lldb) process connect connect://localhost:1234
(lldb) process attach --waitfor