Created
July 18, 2019 08:50
-
-
Save octover/fd7da48cd35794cc5f1766031ccc7994 to your computer and use it in GitHub Desktop.
Xcode 11 Beta 4 Carthage workaround
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
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
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 docarthage build --platform iOS
carthage will build your dependencies and link them fine.