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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set APPLICATION_EXTENSION_API_ONLY to Pods when set in the project's .xcconfig #9233

Closed
1 task done
juanjonol opened this issue Oct 9, 2019 · 1 comment 路 Fixed by #9305
Closed
1 task done

Set APPLICATION_EXTENSION_API_ONLY to Pods when set in the project's .xcconfig #9233

juanjonol opened this issue Oct 9, 2019 · 1 comment 路 Fixed by #9305
Labels
s7:workaround available A workaround for the issue is available
Milestone

Comments

@juanjonol
Copy link
Contributor

Report

Since pull request #4321, the APPLICATION_EXTENSION_API_ONLY build setting is automatically applied to Pods if it's set in the user target. But this doesn't work if APPLICATION_EXTENSION_API_ONLY is set in an Config file (.xcconfig).

This also applies to the BUILD_LIBRARY_FOR_DISTRIBUTION Build Setting if #9232 is fixed.

What did you do?

  1. Create a new project.
  2. Create an .xcconfig file and make the project use it.
  3. Add APPLICATION_EXTENSION_API_ONLY = YES to the .xcconfig.
  4. Use pod install to install any pod.

What did you expect to happen?

CocoaPods should set APPLICATION_EXTENSION_API_ONLY to YES in all Pods, like it does if the setting is applied directly to the project.

What happened instead?

Pods don't have the APPLICATION_EXTENSION_API_ONLY set to YES, so there's a Linking against a dylib which is not safe for use in application extensions warning for each Pod.

Workaround

Use a post_install hook to set APPLICATION_EXTENSION_API_ONLY to YES in all pods.

@dnkoutso dnkoutso added this to the 1.9.0 milestone Oct 29, 2019
@dnkoutso
Copy link
Contributor

dnkoutso commented Oct 30, 2019

This PR will allow for this to be fixed.

@dnkoutso dnkoutso added the s7:workaround available A workaround for the issue is available label Oct 30, 2019
@dnkoutso dnkoutso changed the title Set APPLICATION_EXTENSION_API_ONLY to Pods when set in the project's .xcconfig Search in users xcconfig's for figuring out when to set APPLICATION_EXTENSION_API_ONLY. Oct 31, 2019
@dnkoutso dnkoutso changed the title Search in users xcconfig's for figuring out when to set APPLICATION_EXTENSION_API_ONLY. Set APPLICATION_EXTENSION_API_ONLY to Pods when set in the project's .xcconfig Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s7:workaround available A workaround for the issue is available
Projects
None yet
2 participants