Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Extension compatibility in Podspec #991

Merged
merged 1 commit into from Mar 28, 2020

Conversation

tobihagemann
Copy link
Contributor

Fixes #432

It's really an old issue but I think everyone can benefit from this small change when dealing with CocoaPods and App Extensions. Using subspecs is basically "how it should be done", see: CocoaPods/CocoaPods#5373 (comment)

@nab0y4enko
Copy link

@tobihagemann @juliensaad Can you check this PR?

@tobihagemann
Copy link
Contributor Author

tobihagemann commented Mar 17, 2020

For anyone still wondering what this change is about: It's great to have the SV_APP_EXTENSIONS preprocessor macro so that this library can be used with app extensions but when using CocoaPods it's not that trivial to set that macro (at least to my knowledge and as discussed in the linked issues).

With the change in this PR, you'd be able to define the following in your Podfile:

target 'MainApp' do
  pod 'SVProgressHUD'
end

target 'AppExtension' do
  pod 'SVProgressHUD/AppExtension'
end

That's it. You do not have to worry about preprocessor macros at all. And as you can see, it doesn't change the current behavior because the newly defined Core subspec is the default subspec.

@honkmaster honkmaster merged commit a47f3d3 into SVProgressHUD:master Mar 28, 2020
@guidev guidev mentioned this pull request Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to use SVProgressHUD in an App Extension?
4 participants