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

Swift standard libraries embedding explicitly set to NO by CocoaPods #6064

Closed
wiedem opened this issue Oct 21, 2016 · 12 comments · Fixed by #6069
Closed

Swift standard libraries embedding explicitly set to NO by CocoaPods #6064

wiedem opened this issue Oct 21, 2016 · 12 comments · Fixed by #6069
Labels
s2:confirmed Issues that have been confirmed by a CocoaPods contributor t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!

Comments

@wiedem
Copy link

wiedem commented Oct 21, 2016

Report

What did you do?

Include ObjC only pod libraries in your project, project uses a custom Swift framework not managed by CocoaPods.

What did you expect to happen?

CocoaPods should not explicitly set the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to NO inside the xcconfig files if it thinks no Swift runtime library is needed. Actually it should not set this option at all if it determines no Swift runtime is needed by the pods and thus leave it up to the project settings. Or there should at least be an option to tell CocoaPods that the Swift runtime libraries are needed even though it is not able to detect the requirement.

What happened instead?

CocoaPods automatically sets the ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to NO inside the xcconfig files and shows a warning

[!] The `Test [Debug]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-Test/Pods-Test.debug.xcconfig'. This can lead to problems with the CocoaPods installation
    - Use the `$(inherited)` flag, or
    - Remove the build settings from the target.

CocoaPods Environment

Stack

   CocoaPods : 1.1.1
        Ruby : ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin16]
    RubyGems : 2.5.1
        Host : Mac OS X 10.12 (16A323)
       Xcode : 8.0 (8A218a)
         Git : git version 2.8.4 (Apple Git-73)
Ruby lib dir : /Users/Test/.rbenv/versions/2.3.1/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ cce89b3e3691f3ebe6841bf06b71639c3d105c0e

Podfile

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
source 'https://github.com/CocoaPods/Specs.git'

target 'Test' do
  # Uncomment this line if you're using Swift or would like to use dynamic frameworks
  use_frameworks!
end
@jacobh0
Copy link

jacobh0 commented Oct 21, 2016

Having a similar issue... except our app actually uses Swift 2.3 and it is still setting ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to NO

@benasher44
Copy link
Member

benasher44 commented Oct 22, 2016

@grioja this is because of a target that has Swift that isn't managed by CocoaPods as well?

@benasher44 benasher44 added t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome! s2:confirmed Issues that have been confirmed by a CocoaPods contributor labels Oct 24, 2016
@tryWabbit
Copy link

However I'm facing the exact issue i'm using audiokit that is build with swift as ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES set to no the crash pops
NO image found and when i set ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to YES the size of the app is ridiculously increased is there any way i can set ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to yes and still persist the size of my app because im using Objective-C any suggestions... @benasher44 @wiedem @grioja @kommen @ericallam

@benasher44
Copy link
Member

If you use any Swift pods, then you'll have to have that set to YES, which means you'll have to have the Swift standard libraries bundled with your app (increases app size).

@wiedem
Copy link
Author

wiedem commented Mar 1, 2017

is there any way i can set ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to yes and still persist the size of my app because im using Objective-C any suggestions

Unfortunately no. Using Swift in your app or using any framework written in Swift currently means the Swift standard libraries need to be copied into your app bundle (just like @benasher44 said).

Your only option is to not use frameworks written in Swift - that is until Apple makes the Swift ABI stable and ships iOS with the Swift standard libraries.

@srameshr
Copy link

@DreamBegin What is the increase in size?

@tryWabbit
Copy link

the size of the ipa that was 32mb (31 mb was consumed by the soundfonts that i've used in the app that is no issue) and now 60mb. @srameshr

@deliverymanager
Copy link

Did you find a solution on the size app increase?
I am having the same issue with a cordova/ionic build

@srameshr
Copy link

srameshr commented Jan 1, 2018

@deliverymanager It does not matter. Because, once you upload it to the app store, the size of ipa that is served is decreased significantly.

@deliverymanager
Copy link

I am not sure about that.
Could you please tell the me exactly the numbers in your case?
From 60MB where did you end up?

@srameshr Thank you very mush for your response!

@srameshr
Copy link

srameshr commented Jan 1, 2018

@top-master
Copy link

top-master commented Apr 12, 2021

Is there any way to silent it?
I mean, the warning:

[!] The `MyApp [Debug]` target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-MyApp/Pods-MyApp.debug.xcconfig'. This can lead to problems with the CocoaPods installation

We just don't support iOS 12.1 or earlier, any workaround is appreciated.
If it's not possible yet, should I create a feature request?

P.S. iOS is about 100 years behind Android (if not set the theme without 3rd-party library, or custom code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s2:confirmed Issues that have been confirmed by a CocoaPods contributor t2:defect These are known bugs. The issue should also contain steps to reproduce. PRs welcome!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants