Skip to content

Commit

Permalink
Now only compiling x86_64 arch for simulator target
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknoob authored and Gabe-Labs committed Oct 1, 2020
1 parent 36093e3 commit 1b0c583
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cocoapods-rome.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion lib/cocoapods-rome/gem_version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module CocoapodsRome
VERSION = "1.0.1"
VERSION = "1.0.2"
end
7 changes: 5 additions & 2 deletions lib/cocoapods-rome/post_install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand All @@ -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
Expand Down

0 comments on commit 1b0c583

Please sign in to comment.