Repository navigation
[API Proposal]: Make IsApplePlatform public #113262
Copy link
Copy link
Open
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Runtime
Milestone
Description
Activity
- addedapi-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementation
on Mar 7, 2025 - ghost addedneeds-area-labelAn area label is needed to ensure this gets routed to the appropriate area ownersAn area label is needed to ensure this gets routed to the appropriate area owners
on Mar 7, 2025 - addeduntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area owner
on Mar 7, 2025 - added and removedneeds-area-labelAn area label is needed to ensure this gets routed to the appropriate area ownersAn area label is needed to ensure this gets routed to the appropriate area owners
on Mar 7, 2025 dotnet-policy-service commented
on Mar 7, 2025 ContributorMore actionsTagging subscribers to this area: @dotnet/area-system-runtime
See info in area-owners.md if you want to be subscribed.- addedin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
on Mar 7, 2025 This could be useful to select the correct library extension (i.e.
*.dylib) in aDllImportResolvercallback. See for example commit kleisauke/net-vips@0fa851c.Reacted by Makazeu@lewing / @steveisok -- What are your thoughts on this? Any risk you can see in exposing this as a public property?
- addedneeds-further-triageIssue has been initially triaged, but needs deeper consideration or reconsiderationIssue has been initially triaged, but needs deeper consideration or reconsiderationand removeduntriagedNew issue has not been triaged by the area ownerNew issue has not been triaged by the area ownerin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is merged
on Jul 26, 2025 @lewing / @steveisok -- What are your thoughts on this? Any risk you can see in exposing this as a public property?
I don't see much risk. It's a conveinence when dealing with all the apple configurations.
- addedapi-ready-for-reviewAPI is ready for review, it is NOT ready for implementationAPI is ready for review, it is NOT ready for implementationand removedapi-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementationneeds-further-triageIssue has been initially triaged, but needs deeper consideration or reconsiderationIssue has been initially triaged, but needs deeper consideration or reconsideration
on Jul 11, 2026 Looks good as proposed
namespace System; public partial class OperatingSystem { public static bool IsApplePlatform(); }
Reacted by Makazeu- addedapi-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedand removedapi-ready-for-reviewAPI is ready for review, it is NOT ready for implementationAPI is ready for review, it is NOT ready for implementation
on Sep 8, 2026 - added a commit that references this issue
on Oct 9, 2026
Metadata
Metadata
Assignees
Labels
api-approvedAPI was approved in API review, it can be implementedAPI was approved in API review, it can be implementedarea-System.Runtime
Background and motivation
When people want check if current application is running on Apple platforms, like macOS, iOS, watchOS, tvOS, they probably need to call
OperatingSystem.IsMacOS()andOperatingSystem.IsIOS(), etc.Perhaps we should provide a public method
IsApplePlatform().We already have such internal method:
runtime/src/libraries/System.Private.CoreLib/src/System/OperatingSystem.cs
Lines 245 to 250 in 8a9d492
API Proposal
API Usage
Alternative Designs
No response
Risks
No response