r/swift • u/fatbobman3000 • 1h ago
r/swift • u/DuffMaaaann • Jan 19 '21
FYI FAQ and Advice for Beginners - Please read before posting
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!
- If you have a question, make sure to phrase it as precisely as possible and to include your code if possible. Also, we can help you in the best possible way if you make sure to include what you expect your code to do, what it actually does and what you've tried to resolve the issue.
- Please format your code properly.
- You can write inline code by clicking the inline code symbol in the fancy pants editor or by surrounding it with single backticks. (`code-goes-here`) in markdown mode.
- You can include a larger code block by clicking on the Code Block button (fancy pants) or indenting it with 4 spaces (markdown mode).
Where to learn Swift:
Tutorials:
Official Resources from Apple:
- Swift Language Guide
- The Swift Programming Language - E-Book
- Intro to App Development with Swift - E-Book
- Develop in Swift - Data Collections - E-Book
- Develop in Swift - Fundamentals - E-Book
- Develop in Swift - Explorations - E-Book
Swift Playgrounds (Interactive tutorials and starting points to play around with Swift):
Resources for SwiftUI:
- SwiftUI Tutorials from Apple
- SwiftUI by example from Hacking With Swift
FAQ:
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.
- Swift runs on Linux (Docker images available), Windows and Android
- You can use Swift on the Server with frameworks such as Vapor
- TensorFlow supports Swift, so you can build and train deep learning models with Swift. (Note: Project archived)
- You can run Swift in Jupyter Notebook
- There are efforts to make Swift available on embedded systems
Can I learn Swift without any previous programming knowledge?
Yes.
Related Subs
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 • 16d ago
What’s everyone working on this month? (October 2026)
What Swift-related projects are you currently working on?
r/swift • u/barcode972 • 14h ago
After 6 years, I am moving on from my hobby project.
I started on CoinCurrently with less than 1 year of experience. iOS 14 had just come out, SwiftUI was brand new, and Home Screen widgets were one of the new features.
I figured I’d try to make a couple of widgets and see what happens. I made a few to track cryptocurrencies and posted about it on Reddit. The post got almost 300 upvotes, which I thought was pretty awesome, so I decided to make a whole app, native for both iOS and Android.
Everything I built in the app was for myself — because I wanted to learn and because it was fun to experiment. It seems like people appreciated what I built.
The app peaked at #99 in the Finance category on the App Store and reached 500 daily users. Not too bad for a hobby project!
After 6 years, I’ve achieved more than I could ever have imagined, but my motivation for this project has died down. Because of this, I have open-sourced the two projects so other people can learn from my struggles and take inspiration for their own apps.
The app will continue to be maintained, though there won't be as many new features as before. I have moved on to another project that I am very excited to share in a few weeks.
The app is available on the App Store and Google Play:
iOS: https://apps.apple.com/us/app/coincurrently-private-crypto/id1543974454
Android: https://play.google.com/store/apps/details?id=com.cryptium.coincurrently&hl=en_US
And now it's also on GitHub:
r/swift • u/KevinCoderRSA • 7h ago
Open Source Swift UI coder editor
I haven't switched to Mac yet because of the crazy exchange rate, and also a lot of my work needs Windows. I really like SwiftUI, but I don't know enough of it to warrant buying a MacBook at this time, since React Native gets the job done - this is how I got the stupid idea of building a lightweight code editor and interpreter for Swift and SwiftUI.
Somewhat AI-assisted, to be honest, I don't have months to invest in this, but it's actually pretty decent, and I was able to build out a pretty complicated UI, all from my browser!
https://github.com/kevincoder-co-za/switaculous
Fully open-sourced and MIT-licensed.

r/swift • u/whatinsidethebox • 1h ago
Project I built a calendar where each event has its own tasks
Hi r/swift
Over the past few years, I've been building a productivity app to replace both my calendar and to do apps. It's called Zesfy and you can directly add your daily tasks right inside calendar events instead schedule them one by one. Here's some of the features:
- It combines your calendar and to-do list into a single view.
- You can easily schedule multiple tasks together to calendar.
- Helps you quickly decide what tasks to work on next
- Organize week tasks with task status
- Easily keep track of your task progress
- Works entirely offline
I'd love to hear what you guys think about the app. Let me know if you have any feedbacks.
Download: Zesfy - To Do List & Planner
App subreddit: r/zesfy
r/swift • u/nutcrook • 23h ago
Project NoteKit: an in-place Markdown editor for SwiftUI apps (TextKit 2, zero deps, MIT)
NoteKit is a Markdown editor for Mac and iOS built on the system text view (TextKit 2). You see the Markdown source, styled in place as you type. No dependencies, MIT, macOS 14 / iOS 17.
https://github.com/tfcace/notekit
- Markers like
#and**step aside away from the caret and reappear when it returns. - Task boxes, bullets, quote bars and rules are drawn in place of their markers. Tasks tick on click/tap/⌘⏎.
- Per-line text direction: RTL and LTR lines coexist in one note, task boxes included.
- Obsidian syntax: wikilinks, callouts, tags, highlights, frontmatter, embeds, Templater. Unknown syntax is shown as written.
NSTextView/UITextViewunderneath, so undo, spell check, dictation and input methods just work.
r/swift • u/Dull-Connection5879 • 1d ago
I built Graffle, an open-source diagramming and vector graphics app for macOS using Swift and AppKit
Graffle, an open-source diagramming and vector graphics app for macOS using Swift and AppKit
Hey everyone!
I've been working on a personal project called Graffle, a native macOS application for creating diagrams and vector graphics.
I built it with Swift and AppKit, and I've decided to make it open source under the MIT License.
Some of the features I've implemented so far include:
- Shapes, text, and Bézier paths
- Smart connectors with different routing styles
- Layers and reusable styles
- Gradients and shadows
- SVG import and export
- PNG and PDF export
My goal was to build a native Mac tool that combines diagramming capabilities with vector editing.
I'm sharing the source code because I'd love to get feedback from other developers and designers, discover what could be improved, and hopefully find people interested in contributing.
I'm still working on the project, so constructive criticism is very welcome!
GitHub repository:
https://github.com/yahirvitelugardo/Graffle
A few things I'd love to hear your thoughts on:
- What features do you consider essential in a diagramming tool?
- How would you improve the connector or vector editing experience?
- Are there any macOS-specific features you'd like to see in an app like this?
Thanks for checking it out!
Free ASO tool for App Store and Google Play: open source, self-hosted, daily rank tracking (AsoBeast)
I'm the developer. It's written in TypeScript, for the part after your Swift app ships.
What frustrated me about ASO tools:
- They charge per app, per keyword or per seat, which adds up fast for an indie app.
- I ship on iOS and Android and wanted both stores in one place.
- I couldn't see how they came up with their popularity and difficulty numbers.
- My keyword list is my strategy, and it lived on a vendor's server.
So I built my own:
- Free and open source (AGPL-3.0), self-hosted with Docker Compose.
- App Store and Google Play, in every storefront: 175 on the App Store (Austria and Switzerland included) and 225 on Google Play.
- Checks your keyword positions every day down to 200 and keeps the history.
- One search per keyword and country also records every competitor on that results page, so watching competitors costs nothing extra.
- Popularity and difficulty come with their inputs, and the docs explain how each one is calculated.
- If you have an Apple Ads account, you can add your own API credentials and it uses Apple's popularity numbers for the terms Apple publishes. Everything else is an estimate from search results and autocomplete.
- A keyword field per localization, with a list of tracked keywords your title, subtitle and keyword field don't cover.
- History of listing and screenshot changes, yours and your competitors', plus review sync.
- An MCP server, so Claude can answer questions about your rankings.
Setup is four commands from the README, then open localhost:3001. If you don't want to run a server, there's a hosted version for $10 a month with 7 days free and no card. Self-hosting has every feature.
GitHub: https://github.com/AsoBeast/asobeast
Website: https://asobeast.com
Hoping it helps. If you ship on both stores, I'd like to know what you still check by hand.
r/swift • u/jojojoester • 1d ago
What do you wish subscription tracker apps did better?
Hey everyone!
I've been exploring the idea of building an iOS subscription tracker, but after looking at existing apps, I realized that features like renewal reminders, spending summaries, and subscription calendars are already pretty well covered.
I don't want to build yet another app that does the same things with a slightly different UI. I'd like to understand what people actually struggle with when managing their subscriptions.
For those of you who use subscription trackers, or have tried a few and stopped using them:
- What's your biggest frustration with the subscription tracker you currently use?
- Is there a feature you've wanted but haven't found in any existing app?
- How do you currently track cancellations, price increases, pauses, or subscriptions you've restarted?
- What would make you switch from your current app to a new one?
- Would you prefer a one-time purchase, a free app with optional Pro features, or a subscription? Why?
I'm especially interested in the small, frustrating things that existing apps haven't solved well, rather than a long wishlist of features.
Feel free to share the app you currently use and what you like or dislike about it. Honest criticism would be really helpful.
Thanks!
Swift Pro: a Swift plugin I’ve been building for IntelliJ IDEA
I’ve been working on Swift Pro and wanted to share it here. It’s a commercial Swift plugin for IntelliJ IDEA, built around the IDE’s usual editors, toolbars, run configurations and test runner.
It brings together compiler completion and navigation, SwiftPM support, LLDB debugging, XCTest and Swift Testing results, SwiftUI previews and macro expansion.
It uses your installed Swift toolchain; Apple workflows, including previews, require macOS and Xcode.
If you try it, I’d appreciate feedback, especially on setup and everyday usability. I’m happy to answer questions about any of the supported (and unsupported) features.
r/swift • u/Emojinapp • 1d ago
Project Had a second brain idea while taking a walk and started the build right on my phone ASC approved it in one try
While taking a walk early last month I got fed up about how my docs were getting buried in my pile of 100s of notes PRDs and many other docs unstructured in my notes. An agent scaffolded the first iOS, mac app and MCP bridge in a Linux VM box right on that trail while I was walking and it was testing with GitHub actions, I got home and opened the project in Xcode and to my amazement it built on first try and all core functionality worked. Took a month to iterate test and stabilize it.
What it became is Cohestry, a native Swift second brain that automatically connects related notes, resurfaces old ideas when they become relevant again, and gives you a visual map of how your knowledge fits together. The part I care about most though is the MCP bridge, so Claude, Codex, Cursor and other agents can pull in the context you have already built instead of starting from zero every time. My first week using it resurfaced an untitled blueprint to one of my main project that had been lost, cohestry connected it to a doc I was writing for a new feature.
I kept the whole thing native, local-first and fast because I wanted it to feel like an Apple app first, not a web wrapper. It is live now on iPhone and Mac if any Swift folks want to tear it apart or tell me what I should have done differently: https://apps.apple.com/us/app/cohestry-second-brain/id6811573132
Web/demo: https://cohestry.app
r/swift • u/rabinapps • 2d ago
Project kinhin: scale your Mac’s CI runners to your queue
kinhin watches your CI queue and, for each queued job, starts a fresh VM or container on your Apple silicon Mac, registers a one-job runner, and deletes it afterwards. Nothing idles and nothing is left over.
It works with GitHub Actions, GitLab CE, Gitea Actions and Forgejo Actions. Buildkite, Azure Pipelines and Bitbucket are planned for a later release.
The limits: Apple allows two macOS VMs at once on a Mac, whatever the hardware. Linux containers are not capped by that.
It’s still a beta. The beta 2 post lists what has been run for real and what hasn’t: https://kinhin.dev/blog/beta-2
Source and releases: https://github.com/RabinApps/kinhin. I’d especially like feedback from anyone running CI on Macs today.
r/swift • u/IllBreadfruit3087 • 2d ago
News The iOS Weekly Brief: Issue #82. Everything you need to know about Swift updates this week
r/swift • u/lanserxt • 2d ago
Tutorial iPhone Duo Group Lab 10/15/26 - Q&A
r/swift • u/VirtualMycologist406 • 3d ago
File converter
Hello everyone, I need your help. Do you know some libraries for convert files, for example to convert .pages to .pdf. I build an app, for me, where I can convert many different files into another format. Maybe I need more libraries than 1 or 2. Thank you an advance 🥺
r/swift • u/blazejkustra • 4d ago
Question Anyone letting agents drive their app in the Simulator? Looking for feedback
I’ve been working on Argent, an open-source MCP server that lets your agent (Claude Code, Codex, Cursor, etc.) tap through your app in the iOS Simulator, read the view hierarchy and logs, and profile with Instruments. That way it can check its own changes instead of just saying it’s done
A lot of the feedback so far has come from React Native folks, but it works with plain Swift/SwiftUI/UIKit apps too, and that’s where I’d love more input. If you’re already letting an agent drive your app, what’s working, and where does it fall apart? 😊
r/swift • u/Apprehensive-Bet2844 • 3d ago
I managed to implement SwiftData + CloudKit Sharing in my app
Hi everyone! I saw a few discussions about SwiftData that don’t support CloudKit sharing for collaboration yet. I was myself searching for a solution after building my app around SwiftData and when I wanted to add collaboration functionality for my shopping list & grocery management app I discovered that SwiftData don't support sharing like CoreData does, I searched everywhere for a solution and the only solution from people here was to move from SwiftData and switch to core data but I really liked SwiftData and I didn't wanted to change it since it was well implemented with my app written in SwiftUI.
So after a lot of research and tests I managed to make collaboration work as well as syncing the private db perfectly with SwiftData using CKSyncEngine. So if you are also in this place where you have or want to build a SwiftData app and implement collaboration know that you can make it work!
My solution was to use two CKSyncEngine isolated in an Actor, one for the private data and the second for the shared data and a database manager that receives the updates from the engines and writes to the database.
It requires some work to start building it, you'll need to well understand CloudKit and a bit of Swift concurrency but once your first prototype works its pretty straightforward forward from there.
I'd be happy to hear your suggestions or learn how you'd approach it differently and if you have questions i'll be happy to answer them. hop this post can be useful!
Link to my app if you want to try:
Project Show: a SwiftUI disk cleaner with a getattrlistbulk + FSEvents incremental index
I built Ammugghia after finding 100 GB of "System Data" on my MacBook Air: it was mostly iOS Simulator runtimes and Xcode/Gradle caches that Finder doesn't show.
- Native SwiftUI, signed & notarized, no network, MIT
- Covers Xcode, simulators, Android, about 30 package-manager caches, Electron app caches, local AI models, leftovers of deleted apps, Docker (volumes are never touched)
- Every item shows exact paths and what happens after deleting it; Trash by default
- Disk map, duplicate finder (APFS-clone aware), startup items, history with restore
DMG: https://github.com/Mingo07-dev/Ammugghia/releases/latest Homebrew: brew install --cask mingo07-dev/tap/ammugghia
Feedback welcome, especially cleanup targets I'm missing.
r/swift • u/SwiftQuest • 4d ago
Project What broke (and what didn't) running untrusted Swift in the browser
I'm building SwiftQuest, a course where every exercise compiles and runs on a real Swift toolchain. A few things I learned along the way:
One throwaway gVisor container per run. It runs on arm64 Linux, with no network, a read-only system, an unprivileged user, and caps on memory, CPU and processes. A script takes about 1.3 s, a two-file compile about 1.5 s, and the first Swift package build about 20 s.
The compiler's notes vanished. Swift's default diagnostic style prints notes inside an ASCII drawing of your code, and my line-based parser couldn't find them. So add missing case: '.fog' disappeared from every run, in the exact lesson that promised the compiler would name the missing case. Compiling with -diagnostic-style=llvm fixed it. The rule since then: show Swift's own message word for word, and only ever add an explanation underneath. Crashes show Swift's one useful line instead of a full backtrace (SWIFT_BACKTRACE=enable=no).
Lessons tested like code. Early testers found that 18 of about 90 "try changing this" suggestions were wrong: the code didn't do what the text said. Now each one is an edit plus its expected result, and the test suite runs all 289 of them on the pinned toolchain.
The attack suite. Hostile programs try a fork storm, eating memory, filling the disk, endless output, sleeping past the clock, and probing the network. The first run found no hole, but it did find two bugs in the attack programs themselves, including a uname read that crashed under Swift 6.4.
Happy to go deeper on any of this. And if you know someone who's never coded and wants to learn Swift, I'm looking for about 10 beta testers from Oct 26 (free, and Pro for life for finishing): https://swiftquest.dev/beta?ref=beta-reddit-swift
r/swift • u/lanserxt • 4d ago
Tutorial iPhone Duo Group Lab 10/13/26 - Q&A
r/swift • u/Ok_Sky3062 • 4d ago
libark: libark is a modern, secure, Swift-native foundational layer over Linux POSIX primitives.
libark
libark is a modern, secure, Swift-native foundational layer over Linux POSIX primitives.
While originally developed as the core runtime layer for ArkOS, libark is completely decoupled and designed to be used on any Linux distribution. It provides highly secure, object-oriented abstractions over low-level system calls, memory management, and file system interactions, without the burden of manual C interoperability.
Features
- Object-Oriented POSIX: Wraps file descriptors, paths, and directory operations in safe, RAII-compliant Swift types.
- Secure Syscall Boundary: Routes kernel interactions through strict, audited
Syscallprimitives. - Terminal Capabilities: Built-in abstractions for TTY detection and window sizing.
- Advanced Formatting: Standardized formatters for human-readable byte sizes (SI and IEC), ISO 8601 timestamps, permissions, and classifications.
- Declarative Sorting: Powerful generic
SortEnginefor metadata sorting across multiple criteria.
r/swift • u/Intrepid_Bee_9194 • 5d ago
Project Harbeth: a texture-first Swift/Metal image and frame engine for Apple platforms
I’m maintaining Harbeth, an open-source Swift/Metal rendering engine for Apple platforms. The part I want to share here is the rendering infrastructure: accepting different source types, composing processing steps, and delivering a result with clear color, alpha, and ownership semantics.
The diagram shows the engine from source to delivery. A photo editor and a camera/video frame pipeline can use the same rendering core while keeping their own application workflows.
There are two integration routes:
- HarbethIO for direct source + filter processing, with synchronous output() and asynchronous transmitOutput().
- ImageNode for structured processing: reusable sources, geometry/optics, local effects and masks, transitions, ordered layer composition, and output profiles.
The engine accepts UIImage/NSImage, CGImage, CIImage, MTLTexture, CVPixelBuffer, and CMSampleBuffer. The ImageNode route can deliver a Metal texture or a RenderedFrame carrying output metadata and texture ownership. SwiftUI, UIKit, and AppKit preview hosts can display those results without first turning every frame into a CPU image.
A small frame-processing example:
```swift let node = ImageNode.pixelBuffer(pixelBuffer) .applying(C7Exposure(exposure: 0.25)) .transforming(ImageTransformRecipe(rotationDegrees: 90))
let frame = try await node.makeFrameAsync(profile: .stablePreview) ```
Once the frame is available, a SwiftUI view can display it with:
swift
HarbethRenderView(frame: frame, resizingMode: .aspectFit)
Underneath, the runtime handles Metal execution, render-plan/pipeline caching, and texture reuse. Color/alpha, orientation, YUV conversion, HDR/dynamic-range contracts, and readback are explicit parts of the rendering layer; diagnostics and image analysis help inspect the result.
The host app owns capture, playback, recording, file export, persistence, and interaction. Harbeth supplies the image/frame rendering layer. Performance depends on the device, resolution, processing chain, and output path.
If you’ve built a Swift image or frame pipeline, which integration detail caused you the most trouble: buffer conversion, GPU resource lifetime, preview/final consistency, or something else?
Source, examples, and documentation: https://github.com/yangKJ/Harbeth
MIT licensed; targets iOS/iPadOS, macOS, and tvOS.
r/swift • u/jacobs-tech-tavern • 5d ago
Tutorial App Size 101: Drop 40% in an afternoon
r/swift • u/Overall_Picture_9061 • 4d ago
how am i doing?
Just released my app a few days ago, havnt really done any marketing yet. How would yall say im doing so far??