Skip to content

xlinux 0.5.0

Choose a tag to compare

@cesardev31 cesardev31 released this 03 Oct 01:39
· 3 commits to main since this release

Native Xcode projects: SwiftUI / UIKit apps from Linux

xlinux now builds plain Xcode projects, not just Flutter and Expo. Run xlinux run in a folder with an .xcodeproj: it builds the Debug configuration, installs and launches the app, and prints the app's own logs (system frameworks' noise is filtered out like Xcode does). Options: --release, --target, --configuration.

  • Xcode 16+ projects as they are: synchronized folders, Info.plist generated from INFOPLIST_KEY_* settings, MainActor default isolation, approachable concurrency and upcoming features.
  • Macros: #Preview, @Observable.
  • Asset symbols like Xcode's: Color.brand, .foregroundStyle(.brand) (with dark variants), Image(.logo).
  • String Catalogs (.xcstrings) compiled to <lang>.lproj.
  • App extensions (widgets): each is built from its own target's sources and resources with its own deployment target. Only the extensions in the app's Embed Foundation Extensions phase are built, so an unused target no longer takes up an App ID on a free account.
  • CocoaPods when there's a Podfile.

App Intents and Siri without a Mac

Xcode's appintentsmetadataprocessor only runs on Apple Silicon Macs. xlinux generates Metadata.appintents itself from the constant values that the Linux swiftc emits (the same as Xcode's). The format was reconstructed from a paired Xcode build, where xlinux's output matches Xcode's, and about 150 published samples.

  • Intents with a title, description and openAppWhenRun.
  • Parameters: String, Bool, Int, Double, Date, URL and AppEnum.
  • Results: dialog, returned value, open another intent.
  • App Shortcuts with \(.applicationName) phrases, translated in AppShortcuts.xcstrings.

Tested on an iPhone: the shortcuts show up and run in the Shortcuts app, and Siri runs them in Spanish. Siri's voice matching is sometimes unreliable, and the cause hasn't been found yet. Unsupported constructs (entities, phrases with parameters) stop the build with a clear error.

Fixes

  • An .appex without CFBundleName was rejected by iOS at install.
  • pod install and .app assembly moved to shared code, used by the Expo and Xcode adapters. Expo builds haven't been re-tested since this change.

Known limitations of Xcode projects

Swift packages (SwiftPM dependencies), storyboards other than the launch screen, Core Data models, Metal shaders, .icon icons, named catalog colors (Color("Name")) and the global accent color aren't supported yet. There's no hot reload: every change is a rebuild and reinstall.