Last active
May 12, 2016 11:30
-
-
Save fluidsonic/95834e5be70500441b154be60b935533 to your computer and use it in GitHub Desktop.
Migrating to CocoaPods 1.0 will be so much fun!
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
workspace 'OurApp' | |
xcodeproj 'App' | |
platform :ios, '8.2' | |
use_frameworks! | |
link_with 'App Store', 'Beta', 'Development', 'Testing' | |
# a lot of pods here | |
pre_install do |installer| | |
# workaround for https://github.com/CocoaPods/CocoaPods/issues/3957 | |
installer.config.deterministic_uuids = false | |
# workaround for https://github.com/CocoaPods/CocoaPods/issues/3289 | |
def installer.verify_no_static_framework_transitive_dependencies; end | |
end | |
post_install do |installer| | |
project = installer.pods_project | |
project.targets.each do |target| | |
target.build_configuration_list.set_setting('HEADER_SEARCH_PATHS', '') | |
# target.build_configuration_list.build_settings('Debug')['DEBUG_INFORMATION_FORMAT'] = 'dwarf' # breaks symbols in Profiler | |
target.build_configuration_list.build_settings('Debug')['OTHER_SWIFT_FLAGS'] = '$(inherited) -DDEBUG' | |
target.build_configuration_list.build_settings('Debug')['ENABLE_TESTABILITY'] = 'YES' | |
target.build_configuration_list.build_settings('Release')['SWIFT_OPTIMIZATION_LEVEL'] = '-Owholemodule' | |
end | |
workingDirectory = Dir.pwd # TODO don't use working directory as this is not necessarily the project's root directory | |
['debug', 'release'].each do |config| | |
configFilePath = "#{workingDirectory}/Pods/Target Support Files/Pods/Pods.#{config}.xcconfig" | |
configFile = File.read(configFilePath) | |
configFile = configFile.gsub(/-framework "AppsFlyer" /, '') | |
configFile = configFile.gsub(/-framework "GoogleAnalytics" /, '') | |
File.open(configFilePath, "w") { |file| file << configFile } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment