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

Setting SWIFT_OPTIMIZATION_LEVEL by pod_target_xcconfig, can't update. #12325

Open
RbBtSn0w opened this issue Mar 26, 2024 · 1 comment
Open

Comments

@RbBtSn0w
Copy link

Report

What did you do?

ℹ Please replace these two lines with what you did.
e.g. Run pod install

s.pod_target_xcconfig = {
    'GCC_OPTIMIZATION_LEVEL[config=Release]' => 's',
    'SWIFT_OPTIMIZATION_LEVEL[config=Release]' => '-Osize',
  }

and Run pod install

image

What did you expect to happen?

the SWIFT_OPTIMIZATION_LEVEL is working by pod_target_xcconfig

ℹ Please replace these two lines with what you expected to happen.
e.g. Install all pod dependencies correctly.

What happened instead?

ℹ Please replace these two lines with of what happened instead.
e.g. Pod A is missing the subspec B for target C.

SWIFT_OPTIMIZATION_LEVEL The RESOLVED value is the Project value, not the config.file

CocoaPods Environment

ℹ Please replace these two lines with the output of pod env.
e.g. via pod env | pbcopy

Stack

   CocoaPods : 1.15.2
        Ruby : ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin22]
    RubyGems : 3.5.4
        Host : macOS 13.6.5 (22G621)
       Xcode : 15.2 (15C500b)
         Git : git version 2.39.3 (Apple Git-145)
Ruby lib dir : /opt/homebrew/Cellar/ruby/3.3.0/lib
Repositories : mirror.internal - file system
               specs.cocoapods - file system
               specs.internal - file system
               trunk - CDN - https://cdn.cocoapods.org/

Installation Source

Executable Path: /opt/homebrew/Cellar/cocoapods/1.15.2/libexec/bin/pod

Plugins

cocoapods-deintegrate : 1.0.5
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.1
cocoapods-trunk       : 1.6.0
cocoapods-try         : 1.2.0

Podfile

use_frameworks!

platform :ios, '10.0'

target 'Optimize_Example' do
  pod 'Optimize', :path => '../'

  target 'Optimize_Tests' do
    inherit! :search_paths

    pod 'FBSnapshotTestCase' , '~> 2.1.4'
  end
end

Project that demonstrates the issue

ℹ Please link to a project we can download that reproduces the issue.
You can delete this section if your issue is unrelated to build problems,
i.e. it's only an issue with CocoaPods the tool.

use pod lib create any project, and insert content on the podspec.

s.pod_target_xcconfig = {
    'GCC_OPTIMIZATION_LEVEL[config=Release]' => 's',
    'SWIFT_OPTIMIZATION_LEVEL[config=Release]' => '-Osize',
  }

try pod update again, check the SWIFT_OPTIMIZATION_LEVEL's value

@RbBtSn0w
Copy link
Author

workaround,

  s.pod_target_xcconfig = {
    'GCC_OPTIMIZATION_LEVEL[config=Release]' => 's',
    'SWIFT_OPTIMIZATION_LEVEL' => '-Osize',
  }

don't set SWIFT_OPTIMIZATION_LEVEL on env

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

No branches or pull requests

1 participant