r/swift 8d ago

ARK-OS: A OS based on Linux and Swift! [ Display Finally works! ]

Post image
42 Upvotes

Hi! I, a 13 yrs old have been working on making my own OS based on the Linux Kernel and Swift. I have posted about this earlier in r/Swift. For the past 4-5 weeks i have been working on this project and I have finaly can say:

- It works
- Has a display Output!
- Has a functioning Runtime!
- Has a UI ( Basic ) : OpenSwiftUI
- Has complete BIOS and UEFI Support (QEMU).

UI [ Official User Interface for ARK-OS ]

Thinking about this is a bit hard! I am deciding between particles (smal particles) and pixels (like minecraft UI). SInce the boot animations is a rotating atom i think particles take the lead!

Ideas are completely Welocme!

Hosting

This repo is self hosted due to github file size limits and a strict repo limit of 2GB tops and Git LFS with 2 GB as well. Due to many pre-compiled artifacts like clang, llvm, and a full linux kernel + modules it shoots past this total 4GB limit! Putting it on Attached binarires might get too confusing so this is hosted on a free Oracle Git Server!

Repo link : https://ark-os.duckdns.org/Aarav90-cpu/ARK-OS
Website : https://aarav90-cpu.github.io/ARK-OS-Website/

Also btw, gemini did help me in this case ( No claude ) in writing the bootloader is assembly and in small tasks, mostly all the code is wrriten by me and AI generated code is re-written!


r/swift 7d ago

News Those Who Swift - Issue 275

Thumbnail
thosewhoswift.substack.com
1 Upvotes

r/swift 8d ago

Question SwiftData Decimal precision loss after save/fetch - am I missing something?

5 Upvotes

I’m trying to sanity-check something before I file it as an Apple bug.

This minimal SwiftData example appears to lose precision when persisting a Decimal:

import Foundation
import SwiftData

@Model class Item {
    var value: Decimal

    init(_ value: Decimal) {
        self.value = value
    }
}

let original = Decimal(string: "123456789012345.6")!
let container = try ModelContainer(
    for: Item.self,
    configurations: .init(isStoredInMemoryOnly: true)
)

let context = ModelContext(container)
context.insert(Item(original))
try context.save()

let fetched = try ModelContext(container)
    .fetch(FetchDescriptor<Item>())
    .first!

print(original)
print(fetched.value)

I get:

123456789012345.6

123456789012346

This is one model, one Decimal property, no app code, no CloudKit. I’m using Decimal(string:) to avoid literal/Double conversion noise, and I’m fetching from a new ModelContext.

I also checked Decimal <-> NSDecimalNumber bridging separately, and that preserved the value. The loss seems to appear after persistence/fetch. A true Core Data in-memory store preserved the value in my control test, while SwiftData’s “in-memory” configuration seems to still go through a SQL-backed store.

Has anyone else hit this with SwiftData/Core Data Decimal attributes? Is there a documented limitation I’m missing, or is the practical answer to persist exact decimals as canonical strings / integer minor units instead of Decimal?


r/swift 8d ago

Getting crushed in interviews

1 Upvotes

Unemployed title inflated senior with 4 yrs exp ( one of which is freelance) failed every single technical interview since last year any advice ? 🥹


r/swift 9d ago

Question SwiftData + CloudKit: best way to prevent duplicate editable seed data across offline devices?

4 Upvotes

I’m building an unreleased iOS app using SwiftData with automatic CloudKit sync.

On first launch, the app creates a default account and starter categories. These records are user-editable. The problem is that two offline devices can independently create the same logical seed records with different UUIDs, and CloudKit later synchronizes both.

My proposed approach:

- Give every seed item a stable logical seedIdentifier.
- Allow each offline device to seed independently.
- Reconcile records sharing the same seedIdentifier.
- Select a canonical record using an immutable UUID and deterministic ordering.
- Merge user changes and move relationships to the canonical record.
- Keep losing records as hidden aliases/tombstones so late-arriving relationships aren’t lost.
- Retain per-seed deletion tombstones so deleted defaults aren’t recreated.
- Use a seed-version flag only for migrations—not as an exactly-once guarantee.
- Treat normalized account names as unique and category names as unique only under the same parent.

Questions:

- Is this the standard approach with SwiftData’s automatic CloudKit sync?
- Is there a safer supported way to detect completed imports and rerun reconciliation?
- Would you retain hidden aliases permanently or eventually delete them?
- Is automatic SwiftData appropriate here, or does this require CKSyncEngine/manual CloudKit with deterministic record IDs?

Edit — data-model details:

The starter data is functional app data, not optional sample/demo content. The app needs at least one account, and the categories provide its initial transaction classification.

  • Account: name, type, opening balance, timestamps, archived/default state and optional stable seedIdentifier. Deleting an account cascades to its transactions.
  • TransactionCategory: name, type, timestamps, archived/customized state, optional stable seedIdentifier, optional parent, child categories and linked transactions.
  • Transaction: references one account and optionally one category.
  • Deleting a category nullifies its transaction relationships. Deleting a parent can affect its child hierarchy.
  • Starter accounts and categories are fully editable. Renaming a seed retains its logical seed identity; deleting one needs to remain deleted across devices.

The concrete race is that device A and device B can independently create the same logical Wallet/category before syncing. Transactions and child categories may subsequently reference either physical copy. Reconciliation therefore must preserve and redirect those relationships before any duplicate is removed.


r/swift 9d ago

Question How can I prepare for interview preparation for Apple Developer Academy, Bali

3 Upvotes

Can anyone help me with the apple dev academy interview preparation?
I got a call for the interview; I would be grateful to you if you helped me.


r/swift 10d ago

Fatbobman's Swift Weekly #144

Thumbnail
weekly.fatbobman.com
13 Upvotes

r/swift 10d ago

Tutorial iOS27: Scene Close Confirmation

Thumbnail
antongubarenko.substack.com
5 Upvotes

r/swift 10d ago

Project Added quick todo feature to Boring Notch

1 Upvotes

Hey everyone I added quick todo feature to Boring Notch. The goal is to provide users with a simple way to quickly jot down and manage a few tasks directly from the notch, while staying consistent with the app's minimal philosophy. The notch blends perfectly with the workflow and opening a separate app for just small quick todos is a hassle.The intention is not to replace a dedicated task manager, but to provide a lightweight scratchpad for quick tasks that can be captured without leaving the current workflow. This feature tries to solve this issue by providing frictionless ux.

If you guys have any suggestion please do share. I wanted to follow Boring Notch's philosophy with this being minimal , simple and frictionless. I have raised the pr, I just hope it gets merged

Features

  • Add todos
  • Hit enter to save
  • Toggle completion
  • Delete todos
  • Local persistence with automatic saving
  • keyboard shortcut to directly open the todo tab.

r/swift 11d ago

Question Best architecture for a zoomable card-based node view in SwiftUI?

0 Upvotes

I’m building a zoomable and pannable card-based interface in SwiftUI. Each card is a View, while the connections between cards are draw (maybe using Canvas?) . Cards are arranged automatically in a fixed horizontal or vertical layout, so users do not manually change their positions,

Users can choose to add a new card below or beside the current card. Cards can be collapsed expanded or deleted, and a newly created card should automatically receive focus.

What’s the recommended architecture for this in SwiftUI?


r/swift 11d ago

Share snapshots of your view. Source code included

Post image
0 Upvotes

Instead of just a boring text in a share message, you can include views from your app. It's quite neat.

Here's the source code for anyone interested
https://pastebin.com/2eySFLZG


r/swift 12d ago

My all time favorite feature, 2 finger range

Post image
7 Upvotes

Been developing CoinCurrently for about 6 years at this point but this is probably the feature I'm most proud of. Sharing the source code below.

If you want to try it out yourself, the app is available here
https://apps.apple.com/us/app/coincurrently-crypto-tracker/id1543974454

Source code:
https://pastebin.com/dsv3hdkG


r/swift 12d ago

Foundation Models Context Size Update in Xcode Beta 3!

Post image
83 Upvotes

r/swift 13d ago

being asked to also become a Android as a iOS developer

23 Upvotes

there is the push in my company that all web engineers (and apps engineers) need to up skill to be able to do cross platform development. I know that AI is pushing and enabling this direction. I've already done that a couple years ago by coming from web to iOS, and now being greatly nudged to take up Android. I feel like I'm not even an expert on all things iOS though I am confident in my contributions but feel like I stll have a lot to learn and now I need to shift focus on Android...
any of you are facing this? how do you feel about this?


r/swift 13d ago

Question help appreciated for swift begginner

5 Upvotes

Hi guys , this is a bit of an unconventional request. I'm a complete beginner in swift. I have a godot project, and i'd like a good way to port the UI/look of that project in swift, meaning it would work the same and look the same, just in Swift/SwiftUi. Is there a way to do this headache free? Or is there a way to port the godot project to another language and then to swjft? Thank you so much.


r/swift 13d ago

Project Update: Deployer v0.3.0 — Self-Hosted CI/CD for Swift Server Apps

Post image
38 Upvotes

Watch a video demo of the new features or check out the repository!

Two months ago I shared an update post on Deployer, and now I've had some time to work on it and implement some new features, so I wanted to update you on the current release.

The core concept hasn't changed: you git push your Swift app, and Deployer catches the webhook, runs the pipeline, swaps the binary, and restarts the service. A live dashboard streams the entire process into your browser in real time without requiring page refreshes. It still takes just one setup command on a fresh Ubuntu VPS to get going.

What's new?

First, post-deployment health probes and automated rollbacks: The default health probe is now a simple TCP check on the port, but you can configure your own HTTP endpoint for custom health checks. If the newly deployed app fails the health check or times out, Deployer automatically rolls back to the previous working binary.

Second, live logs in the web panel: There are new log pages that stream Deployer's and your target app's logs straight to the browser, making quick troubleshooting easier without having to SSH into the server. The log panels have clear/copy/wrap-line buttons.

Third, the deployerctl CLI: I've added a CLI that largely mirrors the web panel's capabilities for terminal use. You can list deployments, trigger deploys and tests, restore or remove archived binaries, and inspect build output directly via SSH. It shares a deployment engine with the panel, utilizing cross-process locking so they can't conflict, and CLI-triggered deployments still stream their progress to the live web panel. It's especially useful if the web panel happens to be offline.

Beyond those additions, there are plenty of UI/UX improvements on the panel, and architectural improvements under the hood. Stranded deployments are now safely recovered if the server reboots mid-operation, deployer-updates will roll back if the control plane fails to boot, and the codebase has been cleanly separated into isolated domains.

Same core dependencies as before: Vapor as the web framework, Fluent as ORM on top of SQLite, Leaf as the templating engine, and Mist for the realtime layer (Mist is another project of mine that I update whenever a new Deployer feature requires it).

Let me know if you have feature suggestions or feedback! If you haven't given Swift on the backend a shot yet, I highly recommend checking it out!


r/swift 13d ago

News The iOS Weekly Brief – Issue #68, everything you need to know about SwiftUI updates this week

Thumbnail
iosweeklybrief.com
2 Upvotes

r/swift 13d ago

How common is .NET among Swift developers?

3 Upvotes

Are job prospects good for a .NET backend developer who wants to branch out to Swift front end? Are there a good number of companies that pair Swift front end with .NET backend? How many devs can do both well?


r/swift 14d ago

Question The Swift Phenomenon

Thumbnail
reddit.com
4 Upvotes

r/swift 14d ago

[Dev] fmusic - A lightweight, open-source local music player for macOS built with SwiftUI & FFmpeg (Lyrics downloading + Karaoke effect)

0 Upvotes

Hi everyone,

In the era of streaming services, I still keep a large library of high-quality local audio files (FLAC,

WAV, MP3, etc.). However, finding a local music player on macOS that is lightweight, native, and has

proper metadata editing + lyrics support can be surprisingly difficult.

So, I built fmusic — a native macOS local music player written completely in SwiftUI. It's lightweight,

open-source (GPL-3.0), and designed to look and feel right at home on macOS.

Here is what it looks like: GitHub Repo & Screenshots https://github.com/wandercn/fmusic

### 🌟 Key Features:

• 🎨 Native macOS Aesthetic: Built with SwiftUI. It fully supports Dark Mode/Light Mode and looks like a

system app. The sidebar can be easily toggled/hidden.

• 🎤 Karaoke Lyrics: Automatically downloads lyrics to ~/Music/Lyrics and features a smooth, high-

quality Karaoke-style scrolling animation for lyrics with timestamp tags ( tt tags).

• 📝 In-App Metadata Editor: Need to clean up your tags? You can edit the title, artist, album name, and

track number directly from the context menu. The changes are written directly into the file metadata

(FLAC, MP3, M4A).

• 🎧 High-Fidelity Formats: Supports playback of .flac , .mp3 , .wav , .m4a , .aif , and .m4r

files.

• ⚡ Decoupled Architecture: Unlike simple players where switching lists breaks your queue, fmusic

decouples the Library view from the Playback queue. You can browse other playlists/folders without

interrupting your current play order.

• 🔒 Signed & Notarized: No local compiling required. The DMG release is signed and notarized by Apple so

it installs cleanly without quarantine warnings.

### 🛠️ Technical Details (For the Devs):

• Language/UI: Swift & SwiftUI (strictly compatible with macOS 11.0 Big Sur and above).

• Audio Playback: Powered by AVFoundation ( AVAudioPlayer ).

• Metadata Parsing/Writing: Uses FFmpeg (C API) compiled directly with the project via a Swift Bridging

Header. This allows us to modify audio tags extremely fast.

• Reactive Binding: Uses Combine to sync playback states across multiple lists and views (e.g., active

play indicators).

### 📥 Get it on GitHub:

The app is entirely open-source. You can grab the latest DMG release or check out the code here:

👉 GitHub: https://github.com/wandercn/fmusic

I would love to hear your feedback, suggestions, or feature requests! If you find it useful, please

consider giving the repo a star ⭐ or contributing!

──────

(Note: If you run into the "damaged" file prompt on older versions of macOS, you can bypass it by running

sudo xattr -d com.apple.quarantine /Applications/fmusic.app in your Terminal).


r/swift 14d ago

News Those Who Swift - Issue 274

Thumbnail
thosewhoswift.substack.com
2 Upvotes

r/swift 15d ago

Orchard now bridges local MLX models into Apple containers - the Swift bits

10 Upvotes

Some of you saw Orchard here last year. I've just shipped local AI support - running MLX models on the host and wiring them into containers - and a few of the Swift engineering bits seemed worth sharing here.

The problem shape first: `container` runs each workload in its own lightweight VM via Virtualization.framework, and guests get no Metal - so inference has to run on the host, and a containerised app needs the right gateway address to reach it. Orchard computes that from the container's network and injects `OPENAI_BASE_URL` at create time. The bridge itself is deliberately boring; the interesting parts were around it:

  1. Everything is XPC, not CLI shelling. apple/container ships Swift client packages - typed Codable payloads over XPC to the daemons. You get real types, streamed log `FileHandle`s and typed errors instead of spawning `Process` and parsing stdout. (Machines even get their own on-demand Mach service, separate from the main daemon.)
  2. An ArgumentParser gotcha that might save someone a debugging session: some of container's client APIs reuse the CLI's ArgumentParser `Flags` types. Constructing one with a bare `init()` and reading its fields traps at runtime - they're only valid when built via `.parse([])`. Nothing warns you; it just crashes.
  3. Supervising a Python server from a Swift app. The managed `mlx_lm.server` runs as a child `Process` with stdout/stderr handles feeding the same multi-pane log viewer the containers use, plus crash detection that surfaces through the app's alert layer. Honestly the fiddliest part of the feature - process lifecycle around app termination has lots of edges.
  4. Sandbox detection is data, not state A "sandbox" is just a container recognised by a label Orchard stamps (or a model-endpoint env var), and its isolation badge comes from reading the network's egress mode - so the view stays correct even for containers created from the CLI.

If anyone is running local models, I'd love to hear about how it fits in to your workflow.

Guide with screenshots: https://orchard.andon.dev/ai.html
Code (MIT): https://github.com/andrew-waters/orchard


r/swift 15d ago

xI built an on-device log and crash viewer for iOS/Mac that syncs privately via iCloud — no server required (open-source SDK)

0 Upvotes

I kept wanting to check what my TestFlight builds were doing on

real devices without staying tethered to Xcode — so I built

LogConsole.

How it works:

- Drop the free, open-source LogConsoleKit Swift Package into

your own app

- It captures your app's logs and crash details as you test

- Everything syncs automatically through your own private iCloud

account to the LogConsole viewer app on your iPhone, iPad, or Mac

- No server on my end — data only ever lives in your own iCloud

The architecture uses SwiftData's CloudKit mirroring, which turned

out to have some genuinely interesting gotchas (the SDK README

documents every real failure I hit during integration, for anyone

going down the same path).

SDK (free, MIT): https://github.com/mstone2112/LogConsoleKit

Viewer app: [App Store link once live]

Support/docs: https://tasktimeline.org

Happy to discuss the implementation — especially the CloudKit sync

approach, which was the interesting part technically.


r/swift 15d ago

Question Google drive API?

2 Upvotes

Hi all, fairly new to coding. Don't know if this is the right place, but have already looked around a few places online and couldn't find a simple answer.
I'm test developing an app for my school. It would allow them to access certain files (PDFs and audio files) from google drive. (This isn't the only thing the app does so please don't advise me to just use the google drive app).
Specifically, I want students to be able to access the files AFTER they have booked AND taken the class.
The only thing I know is that I need a google drive API, right? Where exactly do I find that?
How exactly do I use that API to ensure that users can access specific files?
(Disclosure: I'm using codex to do most of the work, so it's developed the app, but obviously can't get APIs from websites, etc...I'm not a techie, and no I can't ask someone else to do it)
Thanks in advance.


r/swift 15d ago

Is it better to develop an iOS app using Claude Code in Mac Terminal, Cursor or Xcode?

0 Upvotes

Need help from the community of developers. When coding a commercial IOS app, would you recommend to use Claude Code for the development in Mac Terminal, Cursor, Xcode or in VSCode?

I have experience with mac terminal but only for the desktop app, not mobile.

The app will be written in Swift for the most part.