Platform specific products

Most of the products in my Package.swift support iOS, tvOS, and macOS. However, there are a few that only support iOS.

Is there any way to specify a platform restriction on a product or target?

Is there any better workaround that adding #if tests to every single source file?

There is no way to restrict platforms.