-
-
Notifications
You must be signed in to change notification settings - Fork 309
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
Add platformFilters
attribute
#737
Add platformFilters
attribute
#737
Conversation
Adds this attribute to PBXBuildFile and PBXTargetDependency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for adding this.
A small suggestion for future contributions, it would be really helpful to capture where / when some of the attributes appear to aid testing and verifying the behaviours.
Luckily I was able to figure out where to look for this :)
In Xcode the filters option appears for targets and allows selecting all, single or multiple platforms
It appears selecting an individual platform filter results in the attribute platformFilter
being used:
3DFCA495EE0D3913DAD9804B /* Framework2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7F0EC5C1D588EC72A1C5AEA /* Framework2.framework */; platformFilter = ios; };
vs selecting multiple platforms, results in the attribute platformFilters
(plural) being used:
3DFCA495EE0D3913DAD9804B /* Framework2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B7F0EC5C1D588EC72A1C5AEA /* Framework2.framework */; platformFilters = (ios, macos, tvos, ); };
From what I gather those are mutually exclusive. Xcode seems to prioritise platformFilters
if both are present however upon making any changes would get rid on platformFilter
. To maintain a backwards compatible API the approach taken here looks reasonable, but perhaps for a future major version we could consider consolidating the properties and internally have XcodeProj
use the appropriate attribute based on single vs multiple filters.
Just a counter-point, Xcode sometimes sets single element versions of the plural value:
|
I will make sure to follow this workflow next time. |
fun times 😅
Thank you |
Adds this attribute to PBXBuildFile and
PBXTargetDependency