Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macCatalyst version numbers are wrong #106

Open
michaellenaghan opened this issue May 19, 2023 · 3 comments
Open

macCatalyst version numbers are wrong #106

michaellenaghan opened this issue May 19, 2023 · 3 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@michaellenaghan
Copy link

michaellenaghan commented May 19, 2023

SwiftClient is reporting the wrong macCatalyst version numbers here, here and here. Take a look a this screenshot from the dashboard:

Screenshot 2023-05-19 at 1 50 25 PM

macCatalyst runs on macOS, and they each have their own version numbers. macCatalyst version numbers should correspond to iOS versions, though, not macOS versions as they do above. See, for example, the availability info for Widget in Apple's docs:

Screenshot 2023-05-19 at 2 11 34 PM

Notice how the iOS and macCatalyst versions match, and how the macOS version is lower.

So what the screenshot shows as macCatalyst 13.3 is most likely, in fact, macCatalyst 16.4 (running on macOS 13.3).

The reason this matters is that in development we often have to use #available. Someone making a decision based on TelemetryDeck's reporting could accidentally use the wrong version number.

I nearly did that today!

I already had system reporting code in my own app. Here's what it looks like:

    private func deviceSummary() -> String {
        if processInfo.isiOSAppOnMac {
            if processInfo.isMacCatalystApp {
                return
                    "iOS on Mac (\(uiDevice.systemName) \(uiDevice.systemVersion) running on macOS \(processInfo.operatingSystemVersionMajor).\(processInfo.operatingSystemVersionMinor).\(processInfo.operatingSystemVersionPatch))"
            }
        }
        if processInfo.isMacCatalystApp {
            return
                "Mac (\(uiDevice.systemName) \(uiDevice.systemVersion) running on macOS \(processInfo.operatingSystemVersionMajor).\(processInfo.operatingSystemVersionMinor).\(processInfo.operatingSystemVersionPatch))"
        }
        return "\(uiDevice.model) (\(uiDevice.systemName) \(uiDevice.systemVersion))"
    }

And this is what it produces on my Mac:

Screenshot 2023-05-19 at 2 06 49 PM
@narendrajagne
Copy link

His, Can you assign me this issue ?

@winsmith winsmith added the help wanted Extra attention is needed label Oct 4, 2023
@winsmith
Copy link
Contributor

winsmith commented Oct 4, 2023

Sure, here you go!

@narendrajagne
Copy link

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants