From 28f1562169d77f740572eccfc3b742bfceb4ba29 Mon Sep 17 00:00:00 2001 From: Unknoob Date: Thu, 1 Oct 2020 11:44:18 -0300 Subject: [PATCH] Now only compiling x86_64 arch for simulator target --- cocoapods-rome.gemspec | 2 +- lib/cocoapods-rome/gem_version.rb | 2 +- lib/cocoapods-rome/post_install.rb | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cocoapods-rome.gemspec b/cocoapods-rome.gemspec index 607c518..137fdbf 100644 --- a/cocoapods-rome.gemspec +++ b/cocoapods-rome.gemspec @@ -18,7 +18,7 @@ Xcode} spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] - spec.add_dependency "cocoapods", '1.8.0.beta.1' + spec.add_dependency "cocoapods", "~> 1.9.0" spec.add_dependency "fourflusher", "~> 2.0" spec.add_development_dependency "bundler", "~> 1.3" diff --git a/lib/cocoapods-rome/gem_version.rb b/lib/cocoapods-rome/gem_version.rb index d57e0f1..4f6b9d8 100644 --- a/lib/cocoapods-rome/gem_version.rb +++ b/lib/cocoapods-rome/gem_version.rb @@ -1,3 +1,3 @@ module CocoapodsRome - VERSION = "1.0.1" + VERSION = "1.0.2" end diff --git a/lib/cocoapods-rome/post_install.rb b/lib/cocoapods-rome/post_install.rb index 8654d42..0ad68ad 100644 --- a/lib/cocoapods-rome/post_install.rb +++ b/lib/cocoapods-rome/post_install.rb @@ -9,7 +9,7 @@ def build_for_iosish_platform(sandbox, build_dir, target, device, simulator, con target_label = target.cocoapods_target_label xcodebuild(sandbox, target_label, device, deployment_target, configuration) - xcodebuild(sandbox, target_label, simulator, deployment_target, configuration) + xcodebuild(sandbox, target_label, simulator, deployment_target, configuration, 'ARCHS=x86_64') spec_names = target.specs.map { |spec| [spec.root.name, spec.root.module_name] }.uniq spec_names.each do |root_name, module_name| @@ -30,8 +30,11 @@ def build_for_iosish_platform(sandbox, build_dir, target, device, simulator, con end end -def xcodebuild(sandbox, target, sdk='macosx', deployment_target=nil, configuration) +def xcodebuild(sandbox, target, sdk='macosx', deployment_target=nil, configuration='Debug', build_settings=nil) args = %W(-project #{sandbox.project_path.realdirpath} -scheme #{target} -configuration #{configuration} -sdk #{sdk}) + if build_settings + args.append(build_settings) + end platform = PLATFORMS[sdk] args += Fourflusher::SimControl.new.destination(:oldest, platform, deployment_target) unless platform.nil? Pod::Executable.execute_command 'xcodebuild', args, true