I have an MVP that I'm pretty proud of and I'm ready to release a beta, but for some reason I'm shy to release it. That doesn't make a whole lotta sense.
I have an MVP that I'm pretty proud of and I'm ready to release a beta, but for some reason I'm shy to release it. That doesn't make a whole lotta sense.
It’s my birthday weekend and I’m running a special sale on my #Swift and #SwiftUI books - just for my followers, and just for the next 48 hours!
Use the code BDWK25 at checkout to get 20% off any book or bundle:
https://books.nilcoalescing.com/
Very proud how far I’ve come in a year. Tho I’m still barely surviving as an indie developer , I feel like I’ve survived the hardest part.
Creating a product people actually enjoy using. We’ve built a small but growing community.
But unfortunately that’s not enough, I have to get the word out…which means me posting more on social media…
#indiedev #SwiftUI #iOS #macos #aitools #research #search #apple #apps #pleaseboost
Getting Started: macOS Apps with SwiftUI http://leanpub.com/courses/leanpub/macos-apps-with-swiftui by Grace Huang is the featured course on the Leanpub homepage! https://leanpub.com #appdevelopment #macOS #SwiftUI
A ViewModel is a very specific concept. If you think you need a ViewModel in #SwiftUI (probably not necessary because SwiftUI has formatters like AppKit), I'm pretty sure it should be a struct (representing the projection of the actual model to the values required by the View).
Not, ever, a StateObject.
I'm working on a #SwiftUI view modifier that calculates a foreground Color that maintains sufficient contrast with the background and also takes the font into account. This can improve #accessibility without too much design-time overhead.
It's using APCA by @Myndex.
Answer from Perplexity:
To fix this issue, replace unsupported types with alternatives that SwiftData can handle:
For Duration: Use TimeInterval instead, as it is supported by SwiftData.
For Color.Resolved: Avoid using it directly in your models. Instead, store color-related data in a format like RGB values or another supported type.
This ensures compatibility with SwiftData's encoding requirements.
Heeeelp!
What does the following error mean, and how do I fix it? It happens, when I call `modelContext.save()` in a SwiftUI view.
"SwiftData/ModelCoders.swift:105: Fatal error: Composite Coder only supports Keyed Container”
Edit: Solved! It appears SwiftData does not support Duration properties in models. Changing it to a TimeInterval instead fixes it.
@caseyliss Honestly that is not the problem, but the sheer complexity of the #Swiftlang type system, and it actually being used by #SwiftUI.
Today:
- Merged QR Sticker universal links esupport!
- Very pleased with this new test suite: ViewModel unit tests and a small start for UI tests on universal links.
- Waiting for v1.3 App Review and integration testing soon
(Sorry for two links which some clients don't display well but…)
1. How to use Bike Index QR Stickers -- order yours today! https://bikeindex.org/info/how-to-use-bike-index-qr-stickers
2. Pull request with a mad-scientist Mermaid state diagram https://github.com/bikeindex/bike_index_ios/pull/55
Is anyone else seeing `brew bundle` fail? On GitHub Actions I'm seeing a 50% failure rate
"Error: homebrew/bundle was deprecated. This tap is now empty and all its contents were either depleted or migrated.”
But it succeeds locally with brew update!
Ex: https://github.com/bikeindex/bike_index_ios/actions/runs/14283418190/job/40035917728#step:5:8
#Brew #Homebrew #iOSDev #SwiftUI #BuildInPublic
Previously: Development Assets seemed broken (the post this one is replying to)
A: Fixed it with adding the assets to the build target, and to the development_assets_paths, as seen in changeset https://github.com/bikeindex/bike_index_ios/pull/50/files (and renamed the file in this change too)
#iOSDev #SwiftUI #BuildInPublic
Getting Started: macOS Apps with SwiftUI http://leanpub.com/courses/leanpub/macos-apps-with-swiftui by Grace Huang is the featured online course on the Leanpub homepage! https://leanpub.com #macOS #programming #SwiftUI
Just moved over from mastodon.design, so it's time for another #introduction!
I'm Toni
I’m a software #designer, though I’m spending more and more time writing code, mostly in #swiftui and #react
When I'm not heads down at work, you'll catch me #cycling, eating my weight in oranges, walking with my dog Xenon, or just getting lost in a new #book, #anime, or #manga.
I’m also a passionate #yugioh collector, #nba fan and I play #guitar occasionally.
More → https://www.toni.li/about
Once again I have stumbled onto something I don’t understand.
In the entry point for my app I set a NavigationContext in the environment, and when I run the app and navigate between views, at some random point, it throws the error in the second image, and the debugger indicates it is on the “struct FooApp: App {“ line.
What is going on? Help!
In the subviews I am accessing the context from the env like so: “@ Environment(NavigationContext.self) var context”.
Well ain't this a spooky feeling. First time ever. Bracing myself for my first rejection I'm assuming it's some sort of rite of passage.
Hm, are "Development Assets" broken on Xcode 16? I had it working before but haven't look at this preview data in a while.
I have Development Assets > json file, scanning Bundle.allBundles is not able to load this. Maybe this broke during my Convert To Folder change? This article from October is the only one I've found discussing loading json files (with the scan allBundles approach). https://medium.com/@wesleymatlock/how-to-use-swiftuis-preview-content-with-the-preview-macro-56037446603c
#iOSDev #SwiftUI #BuildInPublic
Custom images from an asset catalog don't automatically resize with text. If an image is not purely decorative, we should ensure it scales appropriately when users adjust their preferred font size. We can easily do it with the ScaledMetric API in SwiftUI: https://nilcoalescing.com/blog/AdaptingImagesAndSymbolsToDynamicTypeSizesInSwiftUI/#scaling-custom-images
#SwiftUI #iOSDev
Bingo! This was what I was looking for:
https://mastodon.social/@__mbh__/114208176193786278
By changing the `TimingSession.duration` to a `Duration` (much better alignment of name and type as well), I can now declaratively format the duration like so:
`Text(timingSession.duration, format: .time(pattern: .hourMinuteSecond(padHourToLength: 2)))`