Add macOS support to FaultOrdering package#12
Add macOS support to FaultOrdering package#12macshome wants to merge 1 commit intogetsentry:mainfrom
Conversation
|
@trevor-e If this isn't something you guys want to pull I can close this PR and just use my fork. |
|
@macshome sorry this slipped on our radar! Let me review this a bit more closely next week, at a glance the changes look reasonable though and supporting macOS would be great. |
| // | ||
|
|
||
| #if TARGET_OS_IOS | ||
| @import UIKit; |
There was a problem hiding this comment.
I don't think this import is actually used in the file, can we just delete it?
|
Hey @macshome thanks for opening this and sorry for the delay! Just left one comment, could you update the PR to just have the changes for everything except Package.swift? Then we will make a new |
|
Hey. I just noticed this after a long delay of my own. I’ll look at making the requested changes |
Hi there! I'm pretty excited to see this project open sourced. I wanted to see if it also worked to generate order files for macOS targets as that's mostly what I work with. It was easy to add the support, and the demo app generates the expected files with the UI Tests.
Because robots can do work for us now I had Copilot generate a description of all the details below:
This pull request introduces platform support for macOS in the
FaultOrderingpackage, improves compatibility for Objective-C helpers, and refines code readability and correctness in test-related files. Below is a breakdown of the most important changes grouped by theme:Platform Support:
Package.swift: Added macOS support (.macOS(.v13)) to theplatformssection of the package definition. This expands the package's compatibility to macOS alongside iOS.Compatibility Enhancements:
Sources/EMGFaultOrdering/EMGObjCHelper.m: Added conditional imports forUIKit(iOS) andAppKit(macOS) based on the target platform, ensuring compatibility with both operating systems.Code Refinements:
Sources/FaultOrderingTests/FaultOrderingTest.swift: Replaced the unused variableswith_when initializing theServerobject, adhering to Swift conventions for unused variables.Sources/FaultOrderingTests/Linkmap.swift: Replacedvarwithletforcomponentsin multiple locations to ensure immutability and improve code clarity. [1] [2]Sources/FaultOrderingTests/Linkmap.swift: Updated usage ofindex(of:)tofirstIndex(of:)for better Swift API consistency and readability.