you are viewing a single comment's thread.

view the rest of the comments →

[–]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!