Skip to content

Instantly share code, notes, and snippets.

@octover
Created July 18, 2019 08:50
Show Gist options
  • Save octover/fd7da48cd35794cc5f1766031ccc7994 to your computer and use it in GitHub Desktop.
Save octover/fd7da48cd35794cc5f1766031ccc7994 to your computer and use it in GitHub Desktop.
Xcode 11 Beta 4 Carthage workaround
#!/usr/bin/env ruby
require 'find'
require 'xcodeproj'
Find.find("Carthage/Checkouts/.") do |f|
if f.end_with?(".xcodeproj")
project = Xcodeproj::Project.open(f)
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['LD_VERIFY_BITCODE'] ||= 'NO'
end
end
project.save
end
end
@octover
Copy link
Author

octover commented Jul 18, 2019

The workflow where I'm at is carthage update --platform ios --cache-builds --use-ssh --new-resolver which will fail with Xcode 11 beta 4. However if you run this ruby script and then do carthage build --platform iOS carthage will build your dependencies and link them fine.

@octover
Copy link
Author

octover commented Jul 18, 2019

There is a simpler solution, create a file like carthage_workaround.xcconfig put LD_VERIFY_BITCODE=NO in it, then just prepend your normal carthage call with XCODE_XCCONFIG_FILE=/absolute/path/to/carthage_workaround.xcconfig carthage update… and it will build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment