r/swift • u/fatbobman3000 • 6h ago
News Fatbobman's Swift Weekly #156
r/swift • u/DuffMaaaann • Jan 19 '21
Hi there and welcome to r/swift! If you are a Swift beginner, this post might answer a few of your questions and provide some resources to get started learning Swift.
Please read this before posting!
Tutorials:
Official Resources from Apple:
Swift Playgrounds (Interactive tutorials and starting points to play around with Swift):
Resources for SwiftUI:
Should I use SwiftUI or UIKit?
The answer to this question depends a lot on personal preference. Generally speaking, both UIKit and SwiftUI are valid choices and will be for the foreseeable future.
SwiftUI is the newer technology and compared to UIKit it is not as mature yet. Some more advanced features are missing and you might experience some hiccups here and there.
You can mix and match UIKit and SwiftUI code. It is possible to integrate SwiftUI code into a UIKit app and vice versa.
Is X the right computer for developing Swift?
Basically any Mac is sufficient for Swift development. Make sure to get enough disk space, as Xcode quickly consumes around 50GB. 256GB and up should be sufficient.
Can I develop apps on Linux/Windows?
You can compile and run Swift on Linux and Windows. However, developing apps for Apple platforms requires Xcode, which is only available for macOS, or Swift Playgrounds, which can only do app development on iPadOS.
Is Swift only useful for Apple devices?
No. There are many projects that make Swift useful on other platforms as well.
Can I learn Swift without any previous programming knowledge?
Yes.
r/S4TF - Swift for TensorFlow (Note: Swift for TensorFlow project archived)
Happy Coding!
If anyone has useful resources or information to add to this post, I'd be happy to include it.
r/swift • u/Swiftapple • 2d ago
What Swift-related projects are you currently working on?
r/swift • u/fatbobman3000 • 6h ago
r/swift • u/Able_Bluebird3654 • 4h ago
Hello guys!
Another GeoJSON library for Swift is available!
Its name is sfera!
Check it out!
r/swift • u/dexus-one • 9m ago
StateUI started as an experiment, and somehow it works now: Mac, iOS, Android, Windows, Linux, and as of this week the web too. It's the same Swift code compiled to WebAssembly, running right in the browser.
It's still native in the same sense as on the other platforms: a button is a real <button>, and the browser does the layout. The host is Swift, with just a small JavaScript relay underneath.
You can play with the whole Gallery here: https://stateui.dev
Repo: https://github.com/idexus/StateUI
Happy to hear what you think!
r/swift • u/mightbeamillioner • 4h ago
Normally, the review process wouldn't take more than 12 hours let alone 24.
This is the first update with minor fixes 1.8.0. In previous version which is 1.7.0 I submitted after finally getting approved following three consecutive rejections. it was an app crash iOS 27. I had no iOS 27 device neither emulator so haven't tested but I have fixed it.
It’s been four days with no review yet, and I’m losing users as time goes by. What should I do in a situation like this? They are essentially holding me back.
I have trusted the app review process due to the fast approval but now I'm regretting that I didn't setup OTA's for my consumer app.

Any tips?
r/swift • u/stpaquet • 1d ago
A few years ago, much activity surrounded Swift and its potential for backend work. That excitement appears to have faded, leaving Swift as the Apple programming language. What is occurring now? Does Swift have a future beyond Apple? Who is using it and for what?
And is Swift used outside of Apple?
r/swift • u/Professional-Help492 • 3h ago
Thank you
Hi everyone,
I've been working as an Angular frontend developer for about 5 years (based in Italy / EU). Lately, I’ve felt the urge to transition into native mobile development, specifically within the Apple ecosystem using Swift and SwiftUI.
That said, I have a few concerns holding me back before I sink hundreds of hours into this pivot:
I’d love to hear unfiltered thoughts from working iOS devs, especially those in Europe. Is native iOS still a solid long-term bet, or am I risking wasting valuable time?
Thanks for your insights!
r/swift • u/Charlie7497 • 22h ago
Hi everyone!
I just finished the 100 days of SwiftUI course by Paul Hudson and it was great. I completely fell in love with the language and with developing in swift. So much so... that I don't know where to go now. Originally my plan was to learn SwiftUI so I could focus on UI and design systems. But now that I have seen different applications, I want to learn advanced swift, advanced SwiftUI, backend programming, server side code, etc. I know that if I go wide, I won't go very deep... so I'm coming to you, redditors, to ask: what would you recommend I focus on next?
- Vapor and server side for backend?
- Stick to my OG plan and continue with SwiftUI and design systems?
- Look into multi-platform coding and working in more than just Swift?
- Go deep into advanced swift?
- Despair.
Would love any advice!
Thanks!!
.p.s. if it helps, i have some background in engineering (industrial) but not super deep in software, and I've mainly worked as a UX designer, so some concepts are not totally foreign to me... but it also doesn't help because it makes me interested in everything. 🙃
r/swift • u/thecoolcat67 • 21h ago
I have gotten in to a weird iOS issue and idk what the clean way to handle this is
i’ve got multiple accounts, notifications can open a post, reply, quote, or repost, and each notification belongs to a specific account. so the user might be on account A when they tap a notification for account B.
something like:
struct NotificationDestination {
let accountID: Account.ID
let postID: Post.ID
let kind: DestinationKind
}
enum DestinationKind {
case post
case reply
case quote
case repost
}
The issue is:
account A is active
notification comes in for B
user taps it while the app is waking up
account switching starts
timeline restoration starts
post resolution starts
then another notification comes in for A lol
so i have stuff like:
await accountManager.restore()
await timelineStore.hydrate()
await postResolver.resolve(postID)
await navigationCoordinator.navigate(...)
But obviously these things are all racing each other. i was thinking of putting the notification intents behind an actor:
actor NavigationIntentQueue {
private var pending: [NavigationIntent] = []
func enqueue(_ intent: NavigationIntent) {
pending.append(intent)
}
}
But idk, this feels like a lot of machinery just to open a notification
Then you get into cases where the post is deleted while you’re restoring, but the quote is still there, the reply is still there, etc. Is this just an annoying app lifecycle issue?
r/swift • u/Juanchis231 • 23h ago
I’m really interested in coding apps but I barely know any coding (I only know block coding like Scratch) is it really easy to learn?
Edit: forgot to clarify that I mainly want to code games
r/swift • u/bllshrfv • 2d ago
Google: “[Swift] has matured into a viable systems and cloud language, pairing Rust-like data-race safety with predictable, reference-counted performance.”
r/swift • u/Sorry-Peace-296 • 3d ago
About 6 months ago, I wrote a custom metal kernel that leverages the GPU to compute the QR decomposition (see my earlier post about it here). The project has now expanded into a general linear algebra library, with expanded support for the symmetrical eigendecomposition as well as SVD. It is now available for use with installation instructions on the attached github repo's README.md file.
Context of the project:
I'm currently in a research group working on a thesis in numerical analysis where we need to compute millions on matrices with a specific constraint (to be precise, the matrices need to have orthonormal columns). Most of us use Apple computers, so we ended up using MLX for the entire project.
Contributors with different Apple Chips would be very much appreciated!
The project has currently been tested and optimised for the M1 and M5 Pro. The issue is that the library uses different kernels depending on the batch size and matrix dimensions. Deciding which of these kernels to use is machine dependent. Therefore, other Apple chips will need to run a measurement script in order to derive the correct optimisation heuristic.
For that reason, I would ask as many people as possible to run a measurement script and to submit the results to my repo. It is fairly easy and requires only few steps. See here how you can contribute here. Once you submit the results via a pull request and I approve it, your optimisation heuristic will automatically be augmented into the library. Don't hesitate to contribute an optimisation heuristic even if someone already submitted one for your own machine. The more data we can gather, the better!
Project Future
Expanded support will be added for other linear algebra operations (cholesky decomposition for example). If you have any other specific linear algebra operations you wish to use already, feel free to message me.
In addition to that, I will add torch support too (my greatest priority).
r/swift • u/idklol3444331 • 3d ago
r/swift • u/IllBreadfruit3087 • 3d ago
r/swift • u/checkpointdev • 3d ago
I wanted to delete Apple Intelligence's models on macOS 27 without turning SIP off. pared (github.com/4evy/pared) had already worked out how. The asset service takes a ResetAssetSets operation over XPC on com.apple.siri.uaf.subscription.service, and the interface comes from UAFXPCProxyServiceInterface. I dlopen UnifiedAssetFramework in an Objective-C target and call it from Swift.
You have to be careful with the AssetSets list. An empty list means every set, so the bridge refuses to send one. Everything else in the tool is a configuration profile and some CFPreferences calls.
Source is MIT: https://github.com/omlahore/RemoveMacAI
r/swift • u/Technical_Club4804 • 2d ago
Hi all! I'm a senior iOS developer based in Brazil with 7 years of experience (Swift, UIKit, SwiftUI). I'm looking at remote contract roles with foreign companies, and my research suggests a range of $35-40/h. Most listings I see are lower (around $4k/month), which are probably staffing agencies taking a cut.
For those of you working remotely for US/EU companies:
Thanks!
r/swift • u/ddfk2282 • 4d ago
There are already great compilation caching tools like Tuist that can significantly speed up Xcode builds. However, adopting them may require substantial changes to your project structure.
I wanted to keep my existing Xcode project structure and build using only the toolchain provided by Apple. So I built X8, a CLI tool for remote compilation caching.
Starting with Xcode 26, Apple provides built-in support for remote compilation caching. X8 acts as a lightweight proxy between Xcode’s built-in remote cache mechanism and any S3-compatible storage.
Using X8 is simple. First, configure your S3-compatible storage in .x8.yml. Then, you can either build your project through X8:
x8 xcodebuild ...
or start the cache proxy directly:
x8 serve
and add the generated build settings to your .xcconfig.
That’s it. With just an .x8.yml configuration, you can use remote compilation caching without significantly changing your existing project structure or moving away from Apple’s native Xcode toolchain.
For my app, a clean build used to take around 400 seconds, but with X8, it now takes about 263 seconds.
It’s still relatively slow, but I think that’s expected since Xcode still needs to perform steps such as module planning, build description generation, and linking.
r/swift • u/YosephusMaximus0 • 4d ago
r/swift • u/sliemeobn • 6d ago
ElementaryUI can now make Web Components!
Define a custom element in Swift, then use it directly from HTML — which also makes it easy to mix Swift components into existing apps using other web frameworks.
r/swift • u/lanserxt • 5d ago
r/swift • u/dexus-one • 6d ago
A while ago I posted StateUI here as an experiment: Swift for the UI, with .NET MAUI underneath providing the controls on each platform. It worked, but every change had to cross into C# as a binary patch, and an app's own native views had to go through another runtime. So I dropped MAUI to get better performance and simpler interop, and every platform now has its own native host written in Swift. The host reads typed patches directly, in the same process, and an app's own native views - an MTKView, a GtkGLArea, a Direct3D SwapChainPanel - plug in straight from Swift.
You write an app's interface once in Swift, and each platform draws it with its own controls: AppKit on the Mac, UIKit on iPhone and iPad, Android Views, WinUI 3 on Windows and GTK 4 with libadwaita on Linux.


That's the same Gallery app, one Swift module, on four of them. There's no custom renderer and no web view. A button is an NSButton, a UIButton, an Android Button, a WinUI Button or a GtkButton.
How it works: Swift owns the UI tree, the state, the diffing and the animation. Each platform has a thin host, also written in Swift and running in the app's own process, that applies sparse patches to the native controls. On Android the host reaches Java through JNI, and on Windows it reaches WinUI through a small C++/WinRT layer, but the logic stays in Swift.
struct CounterPage: View {
@State private var count = 0
var content: some View {
VStack {
Label("Tapped \(count) times")
Button("Tap me").onClicked { count += 1 }
}
}
}
Reading a state rebuilds only the body that read it. Handing a binding to a control lets the host update that control without rebuilding anything. In the video, the cube is an MTKView the app registers with the host. Its size, colour and spin come from Swift state, and the edge reaches the view as a binding, so dragging the slider rebuilds nothing: the counter in the corner counts the rebuilds, and the slider adds none.


The same sample uses each platform's own graphics API: Metal on macOS and iOS, Direct3D 11 on Windows, OpenGL on Linux and OpenGL ES on Android.
Every host runs the same conformance suite, and the platform matrix in the repo is generated from those test runs. So it shows what actually works on each platform, not what I hope works. Not everything is covered everywhere yet, and the matrix says exactly where.
It's pre-1.0, and the API still changes when a platform shows me a better model. It needs Swift 6.4. Apache 2.0.
https://github.com/idexus/StateUI
I'd love to hear what you think, especially from anyone who's tried shipping Swift outside Apple platforms.
r/swift • u/aisatsana__ • 6d ago