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

Xcode 14 compatibility #149

Open
mangerlahn opened this issue Sep 20, 2022 · 3 comments · May be fixed by #150
Open

Xcode 14 compatibility #149

mangerlahn opened this issue Sep 20, 2022 · 3 comments · May be fixed by #150

Comments

@mangerlahn
Copy link

mangerlahn commented Sep 20, 2022

We moved to Xcode 14 and are seeing some compatibility issues with ShortcutRecorder. Xcode 14 seems to require macOS 10.13 as deployment target. So the first question is whether the deployment target should be moved from 10.11 to 10.13. This also affects the Swift Package: https://developer.apple.com/documentation/packagedescription/supportedplatform/macosversion/v10_11

Once the deployment target is set, several deprecation warnings appear around os_trace calls. Most of them could be replaced with near identical calls to OSLog, introduced in 10.12. However this framework serves a slightly different purpose and lacks support for payload calls like os_trace_debug_with_payload. According to https://mackuba.eu/notes/wwdc14/using-activity-tracing/ some of these tracing methods became unreliable or stopped working anyways so it is debatable whether they still add value to the code.

We had issues with our CI due to the changes in Xcode 14, so for now I moved all calls to OSLog and commented out the payload functions. If you would like to raise the deployment target, I am happy to open a PR with the changes discussed here. If you would like to take a look at the affected code, you can check out my commit here.

@Kentzo
Copy link
Owner

Kentzo commented Sep 20, 2022

Ideally I'd prefer to drop the deprecated APIs together with adding and refining codebase using new APIs.

My plan was to have first class support for Catalyst, SwiftUI and i*OS. But no ETA for this.

@mangerlahn
Copy link
Author

Ok, so moving to 10.13 seems sensible then. OSLog is available on iOS and macOS, so it could be used as replacement for most of the tracing functions. Not sure about the payload stuff though. Logging or simple code deletion?

@Kentzo
Copy link
Owner

Kentzo commented Sep 21, 2022

TBH I'm behind current best practices for tracing. Perhaps those APIs were replaced with something new from Instruments.app?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants