xcodeproj 0.23.1 → 0.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xcodeproj/config.rb +1 -1
- data/lib/xcodeproj/gem_version.rb +1 -1
- data/lib/xcodeproj/plist_helper.rb +1 -1
- data/lib/xcodeproj/project.rb +34 -2
- data/lib/xcodeproj/project/object/file_reference.rb +1 -1
- data/lib/xcodeproj/project/object/group.rb +3 -2
- data/lib/xcodeproj/project/object/native_target.rb +2 -2
- data/lib/xcodeproj/project/object/root_object.rb +1 -1
- data/lib/xcodeproj/project/project_helper.rb +22 -2
- data/lib/xcodeproj/scheme.rb +1 -1
- metadata +17 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5724a3e3cb2b1913f237022c11277c66c0bf32bc
|
4
|
+
data.tar.gz: b0bfc425a1c68e5d260dc3f3b45df5a03d479ca3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11bad35703123c93d69dae1b88676b9534cdeacf4a11492c5fe12de3fb039aed5a9f4136c12319f7e1382025a05ec211573bb4f2ef10177331137042a9c36b35
|
7
|
+
data.tar.gz: a99f49f21b18873cd489ce6d38932094bbfd3ab68499ef70993a394994740f47216f3270463658bc25a710fdb9a19d28e6b0dd91f69ca45265bc07fdea22f9fc
|
data/lib/xcodeproj/config.rb
CHANGED
@@ -627,7 +627,7 @@ module DevToolsCore
|
|
627
627
|
extern :class_getName, [Class], CoreFoundation::CharPointer
|
628
628
|
end
|
629
629
|
|
630
|
-
XCODE_PATH = Pathname.new(`xcrun xcode-select -
|
630
|
+
XCODE_PATH = Pathname.new(`xcrun xcode-select --print-path`.strip).dirname
|
631
631
|
|
632
632
|
def self.load_xcode_framework(framework)
|
633
633
|
Fiddle.dlopen(XCODE_PATH.join(framework).to_s)
|
data/lib/xcodeproj/project.rb
CHANGED
@@ -446,7 +446,7 @@ module Xcodeproj
|
|
446
446
|
# project.
|
447
447
|
#
|
448
448
|
def files
|
449
|
-
objects.
|
449
|
+
objects.grep(PBXFileReference)
|
450
450
|
end
|
451
451
|
|
452
452
|
# Returns the file reference for the given absolute path.
|
@@ -469,13 +469,20 @@ module Xcodeproj
|
|
469
469
|
end
|
470
470
|
end
|
471
471
|
|
472
|
-
# @return [ObjectList<
|
472
|
+
# @return [ObjectList<AbstractTarget>] A list of all the targets in the
|
473
473
|
# project.
|
474
474
|
#
|
475
475
|
def targets
|
476
476
|
root_object.targets
|
477
477
|
end
|
478
478
|
|
479
|
+
# @return [ObjectList<PBXNativeTarget>] A list of all the targets in the
|
480
|
+
# project excluding aggregate targets.
|
481
|
+
#
|
482
|
+
def native_targets
|
483
|
+
root_object.targets.grep(PBXNativeTarget)
|
484
|
+
end
|
485
|
+
|
479
486
|
# @return [PBXGroup] The group which holds the product file references.
|
480
487
|
#
|
481
488
|
def products_group
|
@@ -598,6 +605,31 @@ module Xcodeproj
|
|
598
605
|
ProjectHelper.new_resources_bundle(self, name, platform, product_group)
|
599
606
|
end
|
600
607
|
|
608
|
+
# Creates a new target and adds it to the project.
|
609
|
+
#
|
610
|
+
# The target is configured for the given platform and its file reference it
|
611
|
+
# is added to the {products_group}.
|
612
|
+
#
|
613
|
+
# The target is pre-populated with common build settings, and the
|
614
|
+
# appropriate Framework according to the platform is added to to its
|
615
|
+
# Frameworks phase.
|
616
|
+
#
|
617
|
+
# @param [String] name
|
618
|
+
# the name of the target.
|
619
|
+
#
|
620
|
+
# @param [Array<AbstractTarget>] target_dependencies
|
621
|
+
# targets, which should be added as dependencies.
|
622
|
+
#
|
623
|
+
# @return [PBXNativeTarget] the target.
|
624
|
+
#
|
625
|
+
def new_aggregate_target(name, target_dependencies = [])
|
626
|
+
ProjectHelper.new_aggregate_target(self, name).tap do |aggregate_target|
|
627
|
+
target_dependencies.each do |dep|
|
628
|
+
aggregate_target.add_dependency(dep)
|
629
|
+
end
|
630
|
+
end
|
631
|
+
end
|
632
|
+
|
601
633
|
# Adds a new build configuration to the project and populates its with
|
602
634
|
# default settings according to the provided type.
|
603
635
|
#
|
@@ -149,7 +149,7 @@ module Xcodeproj
|
|
149
149
|
# children.
|
150
150
|
#
|
151
151
|
def files
|
152
|
-
children.
|
152
|
+
children.grep(PBXFileReference)
|
153
153
|
end
|
154
154
|
|
155
155
|
# @return [PBXFileReference] The file references whose path (regardless
|
@@ -162,6 +162,7 @@ module Xcodeproj
|
|
162
162
|
# @return [Array<PBXGroup>] the groups in the group children.
|
163
163
|
#
|
164
164
|
def groups
|
165
|
+
# Don't grep / is_a? as this would include child classes.
|
165
166
|
children.select { |obj| obj.class == PBXGroup }
|
166
167
|
end
|
167
168
|
|
@@ -169,7 +170,7 @@ module Xcodeproj
|
|
169
170
|
# children.
|
170
171
|
#
|
171
172
|
def version_groups
|
172
|
-
children.
|
173
|
+
children.grep(XCVersionGroup)
|
173
174
|
end
|
174
175
|
|
175
176
|
# @return [Array<PBXGroup,PBXFileReference,PBXReferenceProxy>] the
|
@@ -175,14 +175,14 @@ module Xcodeproj
|
|
175
175
|
# the copy files build phases of the target.
|
176
176
|
#
|
177
177
|
def copy_files_build_phases
|
178
|
-
build_phases.
|
178
|
+
build_phases.grep(PBXCopyFilesBuildPhase)
|
179
179
|
end
|
180
180
|
|
181
181
|
# @return [Array<PBXShellScriptBuildPhase>]
|
182
182
|
# the copy files build phases of the target.
|
183
183
|
#
|
184
184
|
def shell_script_build_phases
|
185
|
-
build_phases.
|
185
|
+
build_phases.grep(PBXShellScriptBuildPhase)
|
186
186
|
end
|
187
187
|
|
188
188
|
# Adds a dependency on the given target.
|
@@ -6,7 +6,7 @@ module Xcodeproj
|
|
6
6
|
class PBXProject < AbstractObject
|
7
7
|
# @!group Attributes
|
8
8
|
|
9
|
-
# @return [ObjectList<
|
9
|
+
# @return [ObjectList<AbstractTarget>] a list of all the targets in
|
10
10
|
# the project.
|
11
11
|
#
|
12
12
|
has_many :targets, AbstractTarget
|
@@ -123,6 +123,26 @@ module Xcodeproj
|
|
123
123
|
target
|
124
124
|
end
|
125
125
|
|
126
|
+
# Creates a new aggregate target and adds it to the project.
|
127
|
+
#
|
128
|
+
# The target is configured for the given platform.
|
129
|
+
#
|
130
|
+
# @param [Project] project
|
131
|
+
# the project to which the target should be added.
|
132
|
+
#
|
133
|
+
# @param [String] name
|
134
|
+
# the name of the aggregate target.
|
135
|
+
#
|
136
|
+
# @return [PBXAggregateTarget] the target.
|
137
|
+
#
|
138
|
+
def self.new_aggregate_target(project, name)
|
139
|
+
target = project.new(PBXAggregateTarget)
|
140
|
+
project.targets << target
|
141
|
+
target.name = name
|
142
|
+
target.build_configuration_list = configuration_list(project)
|
143
|
+
target
|
144
|
+
end
|
145
|
+
|
126
146
|
# @!group Private Helpers
|
127
147
|
|
128
148
|
#-----------------------------------------------------------------------#
|
@@ -148,7 +168,7 @@ module Xcodeproj
|
|
148
168
|
#
|
149
169
|
# @return [XCConfigurationList] the generated configuration list.
|
150
170
|
#
|
151
|
-
def self.configuration_list(project, platform, deployment_target = nil, target_product_type, language)
|
171
|
+
def self.configuration_list(project, platform = nil, deployment_target = nil, target_product_type = nil, language = nil)
|
152
172
|
cl = project.new(XCConfigurationList)
|
153
173
|
cl.default_configuration_is_visible = '0'
|
154
174
|
cl.default_configuration_name = 'Release'
|
@@ -199,7 +219,7 @@ module Xcodeproj
|
|
199
219
|
#
|
200
220
|
# @return [Hash] The common build settings
|
201
221
|
#
|
202
|
-
def self.common_build_settings(type, platform, deployment_target = nil, target_product_type = nil, language = :objc)
|
222
|
+
def self.common_build_settings(type, platform = nil, deployment_target = nil, target_product_type = nil, language = :objc)
|
203
223
|
target_product_type = (Constants::PRODUCT_TYPE_UTI.find { |_, v| v == target_product_type } || [target_product_type || :application])[0]
|
204
224
|
common_settings = Constants::COMMON_BUILD_SETTINGS
|
205
225
|
|
data/lib/xcodeproj/scheme.rb
CHANGED
@@ -110,7 +110,7 @@ module Xcodeproj
|
|
110
110
|
buildable_reference.attributes['ReferencedContainer'] = construct_referenced_container_uri(test_target)
|
111
111
|
end
|
112
112
|
|
113
|
-
# Sets a runnable target
|
113
|
+
# Sets a runnable target to be the target of the launch action of the scheme.
|
114
114
|
#
|
115
115
|
# @param [Xcodeproj::Project::Object::AbstractTarget] build_target
|
116
116
|
# A target used by scheme in the launch step.
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcodeproj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eloy Duran
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: colored
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.2'
|
41
41
|
description: Xcodeproj lets you create and modify Xcode projects from Ruby. Script
|
@@ -47,22 +47,26 @@ executables:
|
|
47
47
|
extensions: []
|
48
48
|
extra_rdoc_files: []
|
49
49
|
files:
|
50
|
-
- README.md
|
51
50
|
- LICENSE
|
51
|
+
- README.md
|
52
|
+
- bin/xcodeproj
|
53
|
+
- lib/xcodeproj.rb
|
54
|
+
- lib/xcodeproj/command.rb
|
52
55
|
- lib/xcodeproj/command/config_dump.rb
|
53
56
|
- lib/xcodeproj/command/project_diff.rb
|
54
57
|
- lib/xcodeproj/command/show.rb
|
55
58
|
- lib/xcodeproj/command/sort.rb
|
56
59
|
- lib/xcodeproj/command/target_diff.rb
|
57
|
-
- lib/xcodeproj/command.rb
|
58
|
-
- lib/xcodeproj/config/other_linker_flags_parser.rb
|
59
60
|
- lib/xcodeproj/config.rb
|
61
|
+
- lib/xcodeproj/config/other_linker_flags_parser.rb
|
60
62
|
- lib/xcodeproj/constants.rb
|
61
63
|
- lib/xcodeproj/differ.rb
|
62
64
|
- lib/xcodeproj/gem_version.rb
|
63
65
|
- lib/xcodeproj/helper.rb
|
64
66
|
- lib/xcodeproj/plist_helper.rb
|
67
|
+
- lib/xcodeproj/project.rb
|
65
68
|
- lib/xcodeproj/project/case_converter.rb
|
69
|
+
- lib/xcodeproj/project/object.rb
|
66
70
|
- lib/xcodeproj/project/object/build_configuration.rb
|
67
71
|
- lib/xcodeproj/project/object/build_file.rb
|
68
72
|
- lib/xcodeproj/project/object/build_phase.rb
|
@@ -77,19 +81,15 @@ files:
|
|
77
81
|
- lib/xcodeproj/project/object/reference_proxy.rb
|
78
82
|
- lib/xcodeproj/project/object/root_object.rb
|
79
83
|
- lib/xcodeproj/project/object/target_dependency.rb
|
80
|
-
- lib/xcodeproj/project/object.rb
|
81
84
|
- lib/xcodeproj/project/object_attributes.rb
|
82
85
|
- lib/xcodeproj/project/object_dictionary.rb
|
83
86
|
- lib/xcodeproj/project/object_list.rb
|
84
87
|
- lib/xcodeproj/project/project_helper.rb
|
85
|
-
- lib/xcodeproj/project.rb
|
86
88
|
- lib/xcodeproj/scheme.rb
|
87
89
|
- lib/xcodeproj/user_interface.rb
|
88
|
-
- lib/xcodeproj/workspace/file_reference.rb
|
89
90
|
- lib/xcodeproj/workspace.rb
|
91
|
+
- lib/xcodeproj/workspace/file_reference.rb
|
90
92
|
- lib/xcodeproj/xcodebuild_helper.rb
|
91
|
-
- lib/xcodeproj.rb
|
92
|
-
- bin/xcodeproj
|
93
93
|
homepage: https://github.com/cocoapods/xcodeproj
|
94
94
|
licenses:
|
95
95
|
- MIT
|
@@ -100,17 +100,17 @@ require_paths:
|
|
100
100
|
- lib
|
101
101
|
required_ruby_version: !ruby/object:Gem::Requirement
|
102
102
|
requirements:
|
103
|
-
- -
|
103
|
+
- - ">="
|
104
104
|
- !ruby/object:Gem::Version
|
105
105
|
version: 2.0.0
|
106
106
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
requirements: []
|
112
112
|
rubyforge_project:
|
113
|
-
rubygems_version: 2.
|
113
|
+
rubygems_version: 2.4.6
|
114
114
|
signing_key:
|
115
115
|
specification_version: 3
|
116
116
|
summary: Create and modify Xcode projects from Ruby.
|