xcodeproj 1.5.3 → 1.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/xcodeproj/constants.rb +1 -1
- data/lib/xcodeproj/gem_version.rb +1 -1
- data/lib/xcodeproj/project/object/build_configuration.rb +9 -8
- data/lib/xcodeproj/project/object/native_target.rb +3 -1
- data/lib/xcodeproj/scheme.rb +2 -0
- data/lib/xcodeproj/scheme/launch_action.rb +14 -0
- data/lib/xcodeproj/scheme/remote_runnable.rb +92 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b1d369116a7d3da45d626c4b997b9d61fd9ccf8
|
4
|
+
data.tar.gz: 35c1dd673e635eebbaa636dcfa6db0e9e33bb6c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f80155cd3b837c429f91a8efcbfe232eb6a27650d77945ccd461be6c957aa22a4fb1e2a8fa21703aeba76aa3ddfc130ca64dc1666ffb6822d83f2fbfc49e40e
|
7
|
+
data.tar.gz: fc8000ee50ffb1eb3a1b2b6a1cc05367fbb468cb12e02f838adb32baf788dc9c9901dc62b3011d4c39afc399cdf1437de38de1cbfe120e9c3718965e85df91e1
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://img.shields.io/travis/CocoaPods/Xcodeproj/master.svg?style=flat)](https://travis-ci.org/CocoaPods/Xcodeproj)
|
4
4
|
[![Coverage](https://img.shields.io/codeclimate/coverage/github/CocoaPods/Xcodeproj.svg?style=flat)](https://codeclimate.com/github/CocoaPods/Xcodeproj)
|
5
|
-
[![Code Climate](https://img.shields.io/codeclimate/
|
5
|
+
[![Code Climate](https://img.shields.io/codeclimate/maintainability/CocoaPods/Xcodeproj.svg?style=flat&label=code%20climate)](https://codeclimate.com/github/CocoaPods/Xcodeproj)
|
6
6
|
|
7
7
|
Xcodeproj lets you create and modify Xcode projects from [Ruby][ruby].
|
8
8
|
Script boring management tasks or build Xcode-friendly libraries. Also includes
|
data/lib/xcodeproj/constants.rb
CHANGED
@@ -408,7 +408,7 @@ module Xcodeproj
|
|
408
408
|
|
409
409
|
# @return [Array] The extensions which are associated with header files.
|
410
410
|
#
|
411
|
-
HEADER_FILES_EXTENSIONS = %w(.h .hh .hpp .ipp .tpp .hxx .def).freeze
|
411
|
+
HEADER_FILES_EXTENSIONS = %w(.h .hh .hpp .ipp .tpp .hxx .def .inl).freeze
|
412
412
|
|
413
413
|
# @return [Array] The keywords Xcode use to identify a build setting can
|
414
414
|
# inherit values from a previous precedence level
|
@@ -84,9 +84,9 @@ module Xcodeproj
|
|
84
84
|
#
|
85
85
|
def resolve_build_setting(key, root_target = nil)
|
86
86
|
setting = build_settings[key]
|
87
|
-
setting = resolve_variable_substitution(setting, root_target) if setting.is_a?(String)
|
87
|
+
setting = resolve_variable_substitution(key, setting, root_target) if setting.is_a?(String)
|
88
88
|
config_setting = base_configuration_reference && config[key]
|
89
|
-
config_setting = resolve_variable_substitution(config_setting, root_target) if config_setting.is_a?(String)
|
89
|
+
config_setting = resolve_variable_substitution(key, config_setting, root_target) if config_setting.is_a?(String)
|
90
90
|
|
91
91
|
project_setting = project.build_configuration_list[name]
|
92
92
|
project_setting = nil if project_setting == self
|
@@ -118,17 +118,18 @@ module Xcodeproj
|
|
118
118
|
build_setting_value.map { |value| Constants::INHERITED_KEYWORDS.include?(value) ? inherited : value }.flatten
|
119
119
|
end
|
120
120
|
|
121
|
-
def resolve_variable_substitution(
|
122
|
-
variable = match_variable(
|
121
|
+
def resolve_variable_substitution(key, value, root_target)
|
122
|
+
variable = match_variable(value)
|
123
|
+
return nil if key.eql?(variable)
|
123
124
|
if variable.nil?
|
124
|
-
return name if
|
125
|
+
return name if value.eql?('CONFIGURATION')
|
125
126
|
if root_target
|
126
|
-
return root_target.build_configuration_list[name].resolve_build_setting(
|
127
|
+
return root_target.build_configuration_list[name].resolve_build_setting(value, root_target) || value
|
127
128
|
else
|
128
|
-
return resolve_build_setting(
|
129
|
+
return resolve_build_setting(value, root_target) || value
|
129
130
|
end
|
130
131
|
end
|
131
|
-
resolve_variable_substitution(
|
132
|
+
resolve_variable_substitution(key, value.sub(CAPTURE_VARIABLE_IN_BUILD_CONFIG, resolve_variable_substitution(key, variable, root_target)), root_target)
|
132
133
|
end
|
133
134
|
|
134
135
|
def match_variable(config_setting)
|
@@ -264,7 +264,9 @@ module Xcodeproj
|
|
264
264
|
def dependency_for_target(target)
|
265
265
|
dependencies.find do |dep|
|
266
266
|
if dep.target_proxy.remote?
|
267
|
-
|
267
|
+
subproject_reference = project.reference_for_path(target.project.path)
|
268
|
+
uuid = subproject_reference.uuid if subproject_reference
|
269
|
+
dep.target_proxy.remote_global_id_string == target.uuid && dep.target_proxy.container_portal == uuid
|
268
270
|
else
|
269
271
|
dep.target == target
|
270
272
|
end
|
data/lib/xcodeproj/scheme.rb
CHANGED
@@ -10,6 +10,7 @@ require 'xcodeproj/scheme/archive_action'
|
|
10
10
|
require 'xcodeproj/scheme/buildable_product_runnable'
|
11
11
|
require 'xcodeproj/scheme/buildable_reference'
|
12
12
|
require 'xcodeproj/scheme/macro_expansion'
|
13
|
+
require 'xcodeproj/scheme/remote_runnable'
|
13
14
|
|
14
15
|
module Xcodeproj
|
15
16
|
# This class represents a Scheme document represented by a ".xcscheme" file
|
@@ -307,6 +308,7 @@ module Xcodeproj
|
|
307
308
|
end
|
308
309
|
scheme_folder_path.mkpath
|
309
310
|
scheme_path = scheme_folder_path + "#{name}.xcscheme"
|
311
|
+
@file_path = scheme_path
|
310
312
|
File.open(scheme_path, 'w') do |f|
|
311
313
|
f.write(to_s)
|
312
314
|
end
|
@@ -47,6 +47,20 @@ module Xcodeproj
|
|
47
47
|
@xml_element.attributes['allowLocationSimulation'] = bool_to_string(flag)
|
48
48
|
end
|
49
49
|
|
50
|
+
# @return [String]
|
51
|
+
# The launch automatically substyle
|
52
|
+
#
|
53
|
+
def launch_automatically_substyle
|
54
|
+
@xml_element.attributes['launchAutomaticallySubstyle']
|
55
|
+
end
|
56
|
+
|
57
|
+
# @param [String] flag
|
58
|
+
# Set the launch automatically substyle ('2' for extensions)
|
59
|
+
#
|
60
|
+
def launch_automatically_substyle=(value)
|
61
|
+
@xml_element.attributes['launchAutomaticallySubstyle'] = value.to_s
|
62
|
+
end
|
63
|
+
|
50
64
|
# @return [BuildableProductRunnable]
|
51
65
|
# The BuildReference to launch when executing the Launch Action
|
52
66
|
#
|
@@ -0,0 +1,92 @@
|
|
1
|
+
module Xcodeproj
|
2
|
+
class XCScheme
|
3
|
+
# This class wraps the RemoteRunnable node of a .xcscheme XML file
|
4
|
+
#
|
5
|
+
# A RemoteRunnable is a product that is both buildable
|
6
|
+
# (it contains a BuildableReference) and
|
7
|
+
# runnable remotely (it can be launched and debugged on a remote device, i.e. an Apple Watch)
|
8
|
+
#
|
9
|
+
class RemoteRunnable < XMLElementWrapper
|
10
|
+
# @param [Xcodeproj::Project::Object::AbstractTarget, REXML::Element] target_or_node
|
11
|
+
# Either the Xcode target to reference,
|
12
|
+
# or an existing XML 'RemoteRunnable' node element to reference
|
13
|
+
# or nil to create an new, empty RemoteRunnable
|
14
|
+
#
|
15
|
+
# @param [#to_s] runnable_debugging_mode
|
16
|
+
# The debugging mode (usually '2')
|
17
|
+
#
|
18
|
+
# @param [#to_s] bundle_identifier
|
19
|
+
# The bundle identifier (usually 'com.apple.Carousel')
|
20
|
+
#
|
21
|
+
# @param [#to_s] remote_path
|
22
|
+
# The remote path (not required, unknown usage)
|
23
|
+
#
|
24
|
+
def initialize(target_or_node = nil, runnable_debugging_mode = nil, bundle_identifier = nil, remote_path = nil)
|
25
|
+
create_xml_element_with_fallback(target_or_node, 'RemoteRunnable') do
|
26
|
+
self.buildable_reference = BuildableReference.new(target_or_node) if target_or_node
|
27
|
+
@xml_element.attributes['runnableDebuggingMode'] = runnable_debugging_mode.to_s if runnable_debugging_mode
|
28
|
+
@xml_element.attributes['BundleIdentifier'] = bundle_identifier.to_s if bundle_identifier
|
29
|
+
@xml_element.attributes['RemotePath'] = remote_path.to_s if remote_path
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
# @return [String]
|
34
|
+
# The runnable debugging mode (usually '2')
|
35
|
+
#
|
36
|
+
def runnable_debugging_mode
|
37
|
+
@xml_element.attributes['runnableDebuggingMode']
|
38
|
+
end
|
39
|
+
|
40
|
+
# @param [String] value
|
41
|
+
# Set the runnable debugging mode
|
42
|
+
#
|
43
|
+
def runnable_debugging_mode=(value)
|
44
|
+
@xml_element.attributes['runnableDebuggingMode'] = value.to_s
|
45
|
+
end
|
46
|
+
|
47
|
+
# @return [String]
|
48
|
+
# The runnable bundle identifier (usually 'com.apple.Carousel')
|
49
|
+
#
|
50
|
+
def bundle_identifier
|
51
|
+
@xml_element.attributes['BundleIdentifier']
|
52
|
+
end
|
53
|
+
|
54
|
+
# @param [String] value
|
55
|
+
# Set the runnable bundle identifier
|
56
|
+
#
|
57
|
+
def bundle_identifier=(value)
|
58
|
+
@xml_element.attributes['BundleIdentifier'] = value.to_s
|
59
|
+
end
|
60
|
+
|
61
|
+
# @return [String]
|
62
|
+
# The runnable remote path (not required, unknown usage)
|
63
|
+
#
|
64
|
+
def remote_path
|
65
|
+
@xml_element.attributes['RemotePath']
|
66
|
+
end
|
67
|
+
|
68
|
+
# @param [String] value
|
69
|
+
# Set the runnable remote path
|
70
|
+
#
|
71
|
+
def remote_path=(value)
|
72
|
+
@xml_element.attributes['RemotePath'] = value.to_s
|
73
|
+
end
|
74
|
+
|
75
|
+
# @return [BuildableReference]
|
76
|
+
# The buildable reference this remote runnable is gonna build and run
|
77
|
+
#
|
78
|
+
def buildable_reference
|
79
|
+
@buildable_reference ||= BuildableReference.new @xml_element.elements['BuildableReference']
|
80
|
+
end
|
81
|
+
|
82
|
+
# @param [BuildableReference] ref
|
83
|
+
# Set the buildable reference this remote runnable is gonna build and run
|
84
|
+
#
|
85
|
+
def buildable_reference=(ref)
|
86
|
+
@xml_element.delete_element('BuildableReference')
|
87
|
+
@xml_element.add_element(ref.xml_element)
|
88
|
+
@buildable_reference = ref
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcodeproj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eloy Duran
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: CFPropertyList
|
@@ -132,6 +132,7 @@ files:
|
|
132
132
|
- lib/xcodeproj/scheme/launch_action.rb
|
133
133
|
- lib/xcodeproj/scheme/macro_expansion.rb
|
134
134
|
- lib/xcodeproj/scheme/profile_action.rb
|
135
|
+
- lib/xcodeproj/scheme/remote_runnable.rb
|
135
136
|
- lib/xcodeproj/scheme/test_action.rb
|
136
137
|
- lib/xcodeproj/scheme/xml_element_wrapper.rb
|
137
138
|
- lib/xcodeproj/user_interface.rb
|