require 'cfpropertylist' %%%sources%%% %%%use_frameworks%%% plugin 'podbuilder-rome', { dsym: true, configuration: '%%%build_configuration%%%', uses_frameworks: %%%uses_frameworks%%%, prebuilt_root_paths: '%%%prebuilt_root_paths%%%', pre_compile: Proc.new { |installer| def set_build_settings(target_name, build_configurations, installer) installer.pods_project.targets.each do |target| target.build_configurations.each do |config| if target.name == target_name build_configurations.each do |k, v| config.build_settings[k] = v end end end end end %%%build_settings%%% pods_dependencies = %%%pods_dependencies%%% # Add -l to other linker flags installer.pods_project.targets.each do |target| if dependencies = pods_dependencies[target.name] target.build_configurations.each do |config| dependencies.each do |dependency| if config.build_settings['OTHER_LDFLAGS'].nil? config.build_settings['OTHER_LDFLAGS'] = '$(inherited) -framework ' else config.build_settings['OTHER_LDFLAGS'] << '-framework ' end config.build_settings['OTHER_LDFLAGS'] << "\"#{dependency}\" " end end end end system("mkdir -p Pods/Pods.xcodeproj/project.xcworkspace/xcshareddata") data = { 'BuildSystemType' => '%%%build_system%%%' } # Latest is new build system, Legacy is Legacy one plist = CFPropertyList::List.new plist.value = CFPropertyList.guess(data) plist.save("Pods/Pods.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings", CFPropertyList::List::FORMAT_BINARY) installer.pods_project.save }} platform :%%%platform_name%%%, '%%%deployment_version%%%' # Targets target 'DummyTarget' do %%%targets%%% end pre_install do |installer| raise "\n\n🚨 Do not launch 'pod install' manually, use `pod_builder` instead!\n" if !File.exist?('pod_builder.lock') installer.pod_targets.each do |target| # set a random version to please CocoaPods, the proper version will be overridden by set_build_settings() target.root_spec.swift_version = "1.0" end # workaround for https://github.com/CocoaPods/CocoaPods/issues/3289 Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {} Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_duplicate_framework_and_library_names) {} end