John Brayton


Widgets and Content Margins

#

If you have an app with widgets, be sure to check how the widgets look after compiling with Xcode 15.

The new .widgetContentMargins are a nice addition, but I found adopting them in a way that allows the widgets to continue working well under iOS 16 to be a significant undertaking.

The new .contentMarginsDisabled() modifier on WidgetConfiguration is supposed to do nothing on iOS 16, but it makes the widget extension crash on iOS 16. Here is a modifier you can use instead:

extension WidgetConfiguration {

    func `contentMarginsDisabledOnNewOperatingSystem`() -> some WidgetConfiguration {
        if #available(iOSApplicationExtension 17.0, *) {
            return self.contentMarginsDisabled()
        } else {
            return self
        }
    }

}

Since .contentMarginsDisabled() is applied at the WidgetConfiguration level, .contentMarginsDisabled() cannot apply to just one size of a widget.

#

Seen while out walking.

Photo of two deer
#

App: You are not letting me send notifications to your device.

Me: Correct.

#

He was indicted again. ⚖️

#

I had a great Design Lab session with Apple earlier today. My app will be better because of their suggestions.

#

My trusty iPhone X will not run iOS 17, so I got an iPhone 13 mini.

I really like the physical size and feel of this device.

#

Looks like the prop 2 1/2 override passed! @mitch

www.facebook.com/100067533…

#

We had a special election in my city today. It was a proposition 2 1/2 override (a quirky Massachusetts thing). I worked at the polls. I am excited to catch up on WWDC news.

#

Merged a pull request with three weeks’ worth of work. 🎉

#

It’s Saint Patrick’s Day Somewhere.

Picture of beer colored green
#

8367D4AA-13B1-4B1F-814A-E6F79F31AAED.jpg

#
Picture of a deer
#

Good article by Edward Loveall (edward@indieweb.social): Let’s Make Sure Github Doesn’t Become the only Option

#

CocoaHeads Boston is meeting in-person at Cambridge Brewing Company Tuesday evening. New participants are always welcome.

#

Wisconsin! 🎉 🇺🇸

#

⚖️

#

I know AppKit is showing its age, but it still does a lot really well.

Odd SwiftUI Bug on macOS

#

This is an odd bug on macOS:

  1. Make the main content view a NavigationSplitView:
struct ContentView: View {
    var body: some View {
        NavigationSplitView {
            Spacer()
        } content: {
            Spacer()
        } detail: {
            Spacer()
        }
    }
}
  1. Launch the app.

  2. Observe that there is an “Enter Full Screen” menu item in the “View” menu.

  3. Go to the Finder.

  4. Go back to the app. Observe that the “Enter Full Screen” menu item in the “View” menu is gone.

Filed as FB12064842.

#

Snow day.

57AF37D0-67B4-4361-87E7-6344D37D2B59.jpg

#

Do I know someone who works on Feedburner?

#

Thursday evening’s Zoom-based CocoaHeads Boston meeting will include a presentation by @provuejim@techhub.social on the Panorama help system. New participants and participants outside the Boston area are always welcome.

#

I think it’s a great thing, but I am very surprised to learn that ASWebAuthenticationSession honors the default browser setting on macOS. I would have guessed that it uses Safari regardless.

#

“I’m too old for this.”

– My furnace.

The furnace is running fine, but we had -12℉ (-24℃) temperatures overnight.

#

FYI for anyone who uses Feedly – they announced a 6-hour maintenance window starting at 6am PST Saturday.

#

I released Unread 3.3 with the ability to create an article from a webpage, a Readwise article action, and more.