Nimble: Xcode 12.5 beta: Nimble linking fails due to now-missing libswiftXCTest

Created on 5 Feb 2021  路  9Comments  路  Source: Quick/Nimble

  • [x] I have read CONTRIBUTING and have done my best to follow them.

What did you do?

Tried Xcode 12.5 beta.

What did you expect to happen?

I expected Nimble to continue building.

What actually happened instead?

Build is failing due to missing libswiftXCTest. According to the beta release notes, it's been replaced.

Environment

List the software versions you're using:

  • Quick: 3.0.0
  • Nimble: 9.0.0
  • Xcode Version: 12.5 beta (12E5220o)
  • Swift Version: 5.4

Please also mention which package manager you used and its version. Delete the
other package managers in this list:

  • Cocoapods: 1.10.1

Project that demonstrates the issue

Any project out there with with Nimble added via CocoaPods.

bug

Most helpful comment

Temp workaround

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == "Nimble"
            target.build_configurations.each do |config|
                xcconfig_path = config.base_configuration_reference.real_path
                xcconfig = File.read(xcconfig_path)
                new_xcconfig = xcconfig.sub('lswiftXCTest', 'lXCTestSwiftSupport')
                File.open(xcconfig_path, "w") { |file| file << new_xcconfig }
            end
        end
    end
end

All 9 comments

Is there a reason the PR from @evelynccordner was closed? It seems like #863 is all that's needed.

Is there a reason the PR from @evelynccordner was closed? It seems like #863 is all that's needed.

@CraigSiemens I wanted to test it on a forked repo first, thanks for the reminder, this fix is working for us, I'll re-open the PR.

resolved by #863.

@ikesyo Could you make a numbered release out of it, please?

Hello. Will be coming out soon a new version with the fix?

Temp workaround

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == "Nimble"
            target.build_configurations.each do |config|
                xcconfig_path = config.base_configuration_reference.real_path
                xcconfig = File.read(xcconfig_path)
                new_xcconfig = xcconfig.sub('lswiftXCTest', 'lXCTestSwiftSupport')
                File.open(xcconfig_path, "w") { |file| file << new_xcconfig }
            end
        end
    end
end

Temp workaround

post_install do |installer|
    installer.pods_project.targets.each do |target|
        if target.name == "Nimble"
            target.build_configurations.each do |config|
                xcconfig_path = config.base_configuration_reference.real_path
                xcconfig = File.read(xcconfig_path)
                new_xcconfig = xcconfig.sub('lswiftXCTest', 'lXCTestSwiftSupport')
                File.open(xcconfig_path, "w") { |file| file << new_xcconfig }
            end
        end
    end
end

@khramtsoff where do I have to put this code in?

@khramtsoff @hbtpoprock

As stated in https://github.com/Quick/Nimble/pull/863#issuecomment-826052018, this is fixed in v9.0.1 or later. You don't need that workaround anymore.

Was this page helpful?
0 / 5 - 0 ratings