r/swift • • 4h ago

Moving an existing app to Swift 6 strict concurrency: the order I'd do it in

10 Upvotes

After nine years of iOS work, the concurrency migration is the one where order matters most. Turning on Swift 6 mode in one go usually produces hundreds of errors and no idea where to start. This is the sequence that keeps it manageable:

  1. Stay in Swift 5 mode and set strict concurrency checking to "complete" first. You get the same diagnostics as warnings, so the app keeps building while you work through them.
  2. Start at the leaves. Models and small utility types are usually easiest to make Sendable. Value types with Sendable properties mostly just work. Fixing these first removes a lot of noise further up.
  3. Decide what really belongs on the main actor. View models and anything touching UI can usually be @MainActor as a whole type. That's simpler and safer than marking individual methods.
  4. Treat @unchecked Sendable and nonisolated(unsafe) as debt. They're fine to unblock a module, but leave a comment explaining why each one is safe, or they quietly become permanent.
  5. Use @preconcurrency on imports of modules you don't control, instead of fighting their missing annotations.
  6. Migrate module by module (or target by target) and switch each to Swift 6 mode once its warnings are gone. Smaller PRs are much easier to review.
  7. Watch for behaviour changes, not just compile errors. Moving work onto or off the main actor can change ordering, so test the flows that depend on timing.

What has been the hardest part of the migration for you?


r/swift • • 9h ago

I built an open-source GitHub Action that implements issues & opens tested PRs using modern Swift 6 & Xcode 27 rules

1 Upvotes

Hey everyone,

Like many of you, I've tried using AI coding assistants on iOS projects, but was constantly frustrated by:

  1. AI generating outdated iOS 14 / UIKit boilerplate instead of modern Swift 6 / SwiftUI APIs.
  2. Redundant wrapper views (like unnecessary Group { ... } wrappers or .foregroundStyle(.primary)).
  3. AI making an edit, breaking the build, and giving up.

I built PR Forge (pr-forge-ai), an open-source agent that runs in GitHub Actions or your local terminal.

When you comment /forge on an issue: • It detects the project type (SwiftPM or Xcode .xcodeproj). • Applies progressive skills: u/State macro rules, .glassEffect(), WebView/WebPage in SwiftUI, InlineArray, and functional Swift idioms. • Runs swift test or xcodebuild. • Self-audits every checkbox in your issue PRD. • Pushes a commit under PR Forge Bot and opens a PR.

We tested it end-to-end on a live macOS Swift project (Spreading Aroma), where it autonomously built a node statistics counter, code optimizer, and unit test suites that passed CI and merged cleanly.

Repo: https://github.com/shubhransh-gupta/pr-forge

What are the most annoying Swift/Xcode boilerplate patterns you'd want an autonomous agent to automate?


r/swift • • 18h ago

Question Apple Developer Academy Bali – Is it actually worth it?

7 Upvotes

Hey everyone!
I’m considering applying to the Apple Developer Academy in Bali for the next batch, and I’d love to hear some honest opinions from current learners or alumni.
I’m an international applicant and would mostly be financially supporting myself, so I’m trying to figure out whether it’s actually worth spending 10 months there.
I have a few questions:
Is the Academy actually worth it, or is it somewhat overhyped?
How much is the monthly stipend, and is it enough to live comfortably in Bali?
How much do you realistically spend per month on rent, food, transportation, electricity, and other necessities?
How much should I have saved before moving to Bali?
Is it possible to work part-time while attending the Academy, such as freelancing, remote work, or working at a café? Especially as a foreigner on a student visa.
How intense is the daily schedule? Do you have enough free time for personal projects or other commitments?
How good are the mentors and the actual learning experience?
Do you receive any Apple devices to use throughout the program?
Does the Academy actually help with career opportunities, internships, networking, or finding a job after graduation?
How is the experience for international learners? Is the language barrier an issue?
Are there any hidden expenses or things you wish you had known before joining?
Most importantly, if you could go back in time, would you still choose to join the Academy?
I’d really appreciate honest experiences, both positive and negative. I’m not expecting everything to be perfect, but since I’d be moving to another country and supporting myself financially, I want to know what I’m getting into.
Thanks in advance!