Commit 210c8a68 authored by Boris Bügling's avatar Boris Bügling

Use user project's object version for pods project

parent 7e2faef5
...@@ -24,7 +24,7 @@ GIT ...@@ -24,7 +24,7 @@ GIT
GIT GIT
remote: https://github.com/CocoaPods/Xcodeproj.git remote: https://github.com/CocoaPods/Xcodeproj.git
revision: 6dbb3c73e5d0de6a2c171da0cabd90a5c4d20c09 revision: 7c37e41dafa5f6394900dab19eac9cc6580a9718
branch: master branch: master
specs: specs:
xcodeproj (0.24.0) xcodeproj (0.24.0)
......
...@@ -444,7 +444,15 @@ module Pod ...@@ -444,7 +444,15 @@ module Pod
# #
def prepare_pods_project def prepare_pods_project
UI.message '- Creating Pods project' do UI.message '- Creating Pods project' do
@pods_project = Pod::Project.new(sandbox.project_path) object_version = aggregate_targets.map(&:user_project_path).compact.map do |path|
Xcodeproj::Project.open(path)
end.map(&:object_version).map(&:to_i).sort.first
if object_version
@pods_project = Pod::Project.new(sandbox.project_path, false, object_version)
else
@pods_project = Pod::Project.new(sandbox.project_path)
end
analysis_result.all_user_build_configurations.each do |name, type| analysis_result.all_user_build_configurations.each do |name, type|
@pods_project.add_build_configuration(name, type) @pods_project.add_build_configuration(name, type)
......
...@@ -10,9 +10,12 @@ module Pod ...@@ -10,9 +10,12 @@ module Pod
# @param [Pathname, String] path @see path # @param [Pathname, String] path @see path
# @param [Bool] skip_initialization # @param [Bool] skip_initialization
# Whether the project should be initialized from scratch. # Whether the project should be initialized from scratch.
# @param [Int] object_version
# Object version to use for serialization, defaults to Xcode 3.2 compatible.
# #
def initialize(path, skip_initialization = false) def initialize(path, skip_initialization = false,
super(path, skip_initialization) object_version = Xcodeproj::Constants::DEFAULT_OBJECT_VERSION)
super(path, skip_initialization, object_version)
@support_files_group = new_group('Targets Support Files') @support_files_group = new_group('Targets Support Files')
@refs_by_absolute_path = {} @refs_by_absolute_path = {}
@pods = new_group('Pods') @pods = new_group('Pods')
......
...@@ -440,7 +440,11 @@ module Pod ...@@ -440,7 +440,11 @@ module Pod
pod_target_osx = PodTarget.new([], nil, config.sandbox) pod_target_osx = PodTarget.new([], nil, config.sandbox)
pod_target_ios.stubs(:platform).returns(Platform.new(:ios, '6.0')) pod_target_ios.stubs(:platform).returns(Platform.new(:ios, '6.0'))
pod_target_osx.stubs(:platform).returns(Platform.new(:osx, '10.8')) pod_target_osx.stubs(:platform).returns(Platform.new(:osx, '10.8'))
@installer.stubs(:aggregate_targets).returns([pod_target_ios, pod_target_osx]) aggregate_target_ios = AggregateTarget.new(nil, config.sandbox)
aggregate_target_osx = AggregateTarget.new(nil, config.sandbox)
aggregate_target_ios.stubs(:platform).returns(Platform.new(:ios, '6.0'))
aggregate_target_osx.stubs(:platform).returns(Platform.new(:osx, '10.8'))
@installer.stubs(:aggregate_targets).returns([aggregate_target_ios, aggregate_target_osx])
@installer.stubs(:pod_targets).returns([]) @installer.stubs(:pod_targets).returns([])
@installer.send(:prepare_pods_project) @installer.send(:prepare_pods_project)
build_settings = @installer.pods_project.build_configurations.map(&:build_settings) build_settings = @installer.pods_project.build_configurations.map(&:build_settings)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment