Add macOS support to FaultOrdering package #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.