Yes. #if is a compile time check, #available is a run time check. You will need to apply one or the other or both in various places. It depends how much variety your package needs to support. Being as broad as possible would require using Combine something like this:
if #available(macOS 10.15, iOS 13, watchOS 6, tvOS 13, *) {
// Rules out older Apple platforms.
#if canImport(Combine)
// Rules out Linux, Windows, Android, etc.
// ...
#endif
}