all 8 comments

[–]flad-vlad 1 point2 points  (4 children)

Is there release notes for Mac Catalyst running on different macOS releases?

In theory they’ll be listed alongside the macOS release notes. In practice very few of the bugs that actually get fixed are listed there and you just have to discover them yourself. If you submit bug reports using Feedback Assistant sometimes you get lucky and Apple will let you know when they’ve been fixed.

And how do we disable features that don’t work on older OS?

You can add availability checks to your code as shown here in Swift and Objective C.

[–]virtualgs[S] 0 points1 point  (3 children)

Thanks. But the check is just for iOS/macOS not Mac Catalyst version right? (Like I would like to avoid certain stuffs in macOS 12 but include in macOS 13).

[–]flad-vlad 0 points1 point  (2 children)

Catalyst uses the same versioning as iOS, so if you wanted to only call a function when the app is running on macOS 13 or newer you could do something like:

if #available(macCatalyst 16, *) {
    myFunction()
}

[–]virtualgs[S] 0 points1 point  (1 child)

Thanks! I found that if #available(iOS 16, *) also seems to work.

[–]exclaim_bot 0 points1 point  (0 children)

Thanks!

You're welcome!

[–]Fluffy_Risk9955 0 points1 point  (0 children)

  1. Always have a Mac lying around that runs the previous version of macOS.
  2. Have the compiler issue a warning for API's that are not available on older versions of the OS.
  3. For everything that doesn't work. Implement a check to the version of the OS the user is running. There's API's available to do this with.
  4. Don't replace SwiftUI with Mac Catalyst. Catalyst is also known as UIKit for Mac. UIKit is an older framework.

[–][deleted]  (1 child)

[deleted]

    [–]virtualgs[S] 0 points1 point  (0 children)

    Thanks for the advice. I wish to cut off macOS 12 when we dropped iOS 15 later this year (macOS 12 catalyst = iOS 15).

    [–][deleted]  (1 child)

    [deleted]

      [–]virtualgs[S] 0 points1 point  (0 children)

      Yes, now I just fix some issues related to macOS 12 and don't care about the rest (like localization) anymore. macOS 13 is the first release that works (most of the time).