I have a class with both targets, and I want to know if I'm running it's methods on Watch or iPhone target.
Please, just Swift answers.
Something like this
#if os(iOS)
print("iOS")
#else
print("anything else")
#endif
Or even this
if #available(watchOS 2,*){}
if #available(iOS 9, *){}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With