Advertisement · 728 × 90

Posts by Keith Harrison

Non-Sendable First Design The easiest way to design concurrent systems in Swift was hiding in plain sight.

After a number of truly awful attempts, I have a post about "Non-Sendable First Design" that I think I can live with.

I like this approach and I think you might like it too. It's simple, flexible, and most importantly, it looks "normal".

www.massicotte.org/blog/non-sen...

3 months ago 11 2 1 0
Preview
Treating Warnings As Errors In Swift Packages In Swift 6.2, Swift Packages give us control over which compiler warnings to treat as errors.

Treating Warnings as Errors in Swift Packages #swiftlang useyourloaf.com/blog/treatin...

7 months ago 4 2 0 0
A screenshot of iOS 18 simulator, showing broken large navigation title layout.

A screenshot of iOS 18 simulator, showing broken large navigation title layout.

🚨 PSA for all of you updating your apps for iOS 26:
When you build using Xcode 26, the large navigation title gets broken (no left padding) when running on iOS 18.
🔗 Link to a fix below.

7 months ago 8 1 3 0

Anyone hit problems enabling approachable concurrency (or flags in its grouping) aside from the migration step required for NonisolatedNonsendingByDefault? Not talking about default isolation here.

I haven't encountered any anywhere and I'm curious. Seems like it is going quite smooth so far.

7 months ago 3 1 1 0

Agreed, it does feel clumsy

7 months ago 1 0 0 0
Preview
Swift Raw Identifiers Swift 6.2 adds raw identifiers to the language.

Swift Raw Identifiers #iOSDev #swiftlang useyourloaf.com/blog/swift-r...

7 months ago 2 1 1 0
Preview
SceneStorage For Custom Types How do you use the @AppStorage and @SceneStorage property wrappers with your own custom types?

thanks, I’ll take a look. I’ve used that approach in the past (see useyourloaf.com/blog/scenest...) not sure why I’m not doing it here

8 months ago 1 0 1 0
Preview
Swift Observations AsyncSequence for State Changes Swift 6.2 introduces a new Observations type to stream state changes from an Observable type.

When Observable replaced ObservableObject in iOS 17 it was missing a way to stream changes. That was fixed in iOS 26 (swift 6.2). #iosdev #swiftui useyourloaf.com/blog/swift-o...

8 months ago 9 3 1 0
Advertisement

that’s a good point, not sure it’s possible but would be nice to have as a fallback

9 months ago 1 0 0 0

Yes, I had the same problem, the WWDC video skips over what you’re supposed to do. In theory, the icon is backwards compatible so you only get the glass effect on iOS 26. In practice, seems there are some rendering issues on older versions.

9 months ago 1 0 1 0
Preview
Adding Icon Composer icons to Xcode How do you use Icon Composer to add App Icons to an Xcode project?

I found a workaround to the problem with Icon Composer not working for alternate app icons. Manually adding keys to the target's Info.plist seems to fix it for now. Seems to need separate keys for the ~ipad variant. Hopefully Apple fixes this soon. #Xcode useyourloaf.com/blog/adding-...

9 months ago 1 0 0 0
Info.plist with CFBundleIcons~iPad and CFBundleIcons dictionaries listing CFBundleAlternateIcons

Info.plist with CFBundleIcons~iPad and CFBundleIcons dictionaries listing CFBundleAlternateIcons

Here's what worked for me in the end after comparing to what Xcode generates for app icons in the asset catalog. The iPad variant seems to be necessary for it to work there. Hopefully Apple fixes Xcode in a future beta,

9 months ago 1 0 0 0

Thanks. One difference I can see is that I don't have the CFBundleAlternateIcons key listed in the Info.plist file. (I'm also using a SwiftUI app life-cycle but not sure that's relevant). Will play some more. Thanks again!

9 months ago 1 0 0 0
Asset catalog compiler - options. Alternate App Icon Sets: Applcon-purple. Include All App Icon Assets: Yes. Primary App Icon Set Name: AppIcon-primary

Asset catalog compiler - options. Alternate App Icon Sets: Applcon-purple. Include All App Icon Assets: Yes. Primary App Icon Set Name: AppIcon-primary

Not working for me in beta 2

9 months ago 0 0 1 0

Interesting, will have another look. To be clear you didn’t have to add the icons to the asset catalog?

9 months ago 0 0 1 0

Did anybody get Icon Composer .icon files to work for alternate app icons? #WWDC25 #Xcode

9 months ago 2 0 3 0
Advertisement
Preview
SwiftUI Picker With Optional Selection Creating a SwiftUI picker that works with optional selection.

How do you create a SwiftUI picker that works with optional selection so that not picking a value is possible? #iosdev #swiftui useyourloaf.com/blog/swiftui...

10 months ago 1 0 0 0
Preview
SwiftData Predicates For Parent Relationships How do you write SwiftData predicates to query for parent relationships.

How do you write SwiftData predicates to query for parent relationships? #iOSDev #SwiftData #SwiftUI useyourloaf.com/blog/swiftda...

11 months ago 4 0 0 0
UIApplication delegate deprecation coming in iOS 19 SDK

UIApplication delegate deprecation coming in iOS 19 SDK

lapcatsoftware.com/articles/202...

11 months ago 4 1 0 0
Preview
SwiftUI Keyboard Shortcut Scope A SwiftUI keyboard shortcut remains active as long as the control it's attached to is still in the view hierarchy, even when not onscreen.

My notes on the surprising (to me) scope of SwiftUI keyboard shortcuts #SwiftUI #iOSDev useyourloaf.com/blog/swiftui...

11 months ago 3 0 0 0
Preview
SwiftUI Accessibility Language How do you change the accessibility language used by VoiceOver with SwiftUI?

How do you change the accessibility language used by VoiceOver with SwiftUI? #SwiftUI #iOSDev
useyourloaf.com/blog/swiftui...

1 year ago 2 0 0 0
Preview
SwiftUI Default Scroll Anchor Changing the default behaviour of a scroll view to center content only when it's smaller than the scroll view container.

Changing the default behaviour of a scroll view to center content only when it’s smaller than the scroll view container #SwiftUI #iOSDev useyourloaf.com/blog/swiftui...

1 year ago 0 0 0 0

Is there no way to set the accessibility language for a SwiftUI view? UIKit has the accessibility language property but there’s no equivalent in SwiftUI. I’ve seen people using AttributedString with the .accessibilitySpeechLanguage attribute but I can’t get it to work. #SwiftUI #iOSDev

1 year ago 0 0 0 0
Preview
Swift Testing Completion Handlers How do you test completion handlers with Swift Testing.

Swift Testing completion handlers #SwiftLang #iosdev useyourloaf.com/blog/swift-t...

1 year ago 4 1 0 0
Preview
Provisional Authorization of User Notificatons Requesting provisional authorization to send local user notifications.

Provisional authorzation to send local user notifications. A feature old enough (iOS 12) for me to forget it exists. #iOSDev useyourloaf.com/blog/provisi...

1 year ago 2 0 0 0

Yes, I've seen that. Very frustrating. Hope Apple fixes that soon. I'll add a note to the post. Thanks.

1 year ago 0 0 0 0
Advertisement

Thanks for the reminder, that's much easier when you only need a fill variant. I'll add it to the post.

1 year ago 0 0 0 0
Preview
SwiftUI Button Image When Pressed How do you change the image a SwiftUI button shows while the user is pressing the button?

How do you change the image a SwiftUI button shows when pressed? #SwiftUI #iOSDev useyourloaf.com/blog/swiftui...

1 year ago 1 0 2 0
Preview
Reducing Motion of Animations Apply the reduce animation setting to your SwiftUI animations.

When the user chooses the reduce motion accessibility setting you should avoid large animations with objects that fly in/out of the screen #iOSDev #SwiftUI useyourloaf.com/blog/reducin...

1 year ago 6 0 0 0
Yellow Xcode warning Parameter 'bundle' is missing documentation with option to fix by adding bundle

Yellow Xcode warning Parameter 'bundle' is missing documentation with option to fix by adding bundle

Xcode also warns about the reverse error, a parameter in the method declaration that's not documented

1 year ago 2 0 0 0