fermoya / cocoapods-catalyst-support

Ruby extensions to help you configure your pods project so that pods not compiled for Catalyst can still be used for iOS devices
MIT License
111 stars 18 forks source link

Add ios_unsupported_pods #12

Closed ky1vstar closed 3 years ago

ky1vstar commented 3 years ago

Hi. Your code is working great, but I think there is a lack of revert feature: include specific pods only for Catalyst builds, but not for iOS. My scenario: since Firebase/Analytics is not supported on Catalyst I've substituted it with AppCenter/Analytics which I don't use on iOS at all. So it would be great to remove it from iOS builds. Thanks in advance!

fermoya commented 3 years ago

Hi, can you use copy again the script and define:

def catalyst_only_pods
  [
    'AppCenter/Analytics'
  ]
end

in your Podfile? Don't forget to add this code in your swift file too:

#if !targetEnvironment(macCatalyst)
import Firebase
#else
import AppCenter
#endif
ky1vstar commented 3 years ago

Hi again. The code you provided is for excluding specific pod from macCatalyst build. But I was asking about excluding pods from iOS build. Because some pods can be used only on macCatalyst and excluding them from iOS would prevent this pod's framework from being included to Frameworks directory.

fermoya commented 3 years ago

@ky1vstar on one hand, catalyst_unsupported_pods excludes iOS pods from macCatalyst. On the other hand, catalyst_only_pods will exclude macCatalyst pods from iOS. Isn't this last one what you were asking for?

ky1vstar commented 3 years ago

Didn't notice that you have already made the commit 😅 Sorry I read your message wrong, I'll try your solution tomorrow, thank you!

ky1vstar commented 3 years ago

@fermoya thank you a lot for a quick response, it works like a charm!