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

[ROAD-1067] Report macOS version and device model for iOS / Catalyst apps #1055

Merged
merged 2 commits into from
Mar 30, 2021

Conversation

nickdowell
Copy link
Contributor

@nickdowell nickdowell commented Mar 30, 2021

Goal

Resolves PLAT-6100 and PLAT-6246

Makes device.model, osName and osVersion reflect the Mac when running iOS apps via Catalyst or natively on Apple Silicon Macs.

Changeset

Fetches the underlying OS version from /System/Library/CoreServices/SystemVersion.plist as APIs generally report the simulated iOS version. Had to bypass the usual APIs for reading this because Big Sur has a shim in libsyscall that redirects access to this file for iOS apps not built against Catalyst 🤯

Switches how hw.machine and hw.model are interpreted according to the underlying OS type so that the "Model Identifier" (e.g. iPhone1,1 or MacBookPro1,1) ends up in the expected field.

Testing

Tested manually using sample app on M1 Mac mini, Mac Catalyst, iOS devices running iOS 9 and 14, and tvOS.

@github-actions
Copy link

github-actions bot commented Mar 30, 2021

Infer: No issues found 🎉

OCLint: No issues found 🎉

Bugsnag.framework binary size increased by 392 bytes from 1,102,120 to 1,102,512

Generated by 🚫 Danger

@nickdowell nickdowell marked this pull request as ready for review March 30, 2021 13:11
@nickdowell nickdowell requested a review from kattrali March 30, 2021 13:11
@nickdowell nickdowell requested a review from kattrali March 30, 2021 14:49
@nickdowell nickdowell merged commit 46400cb into next Mar 30, 2021
@nickdowell nickdowell deleted the nickdowell/ios-on-macos-systeminfo branch March 30, 2021 15:52
@nickdowell nickdowell mentioned this pull request Mar 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants