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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d90a203dc3522c9997eb87aae3f6f1a29b4bebdf
4
- data.tar.gz: e62db789786883b44ec174e910b4f1ba97bdd384
3
+ metadata.gz: 0b1d369116a7d3da45d626c4b997b9d61fd9ccf8
4
+ data.tar.gz: 35c1dd673e635eebbaa636dcfa6db0e9e33bb6c3
5
5
  SHA512:
6
- metadata.gz: d41cd07ebcd1168337125625243e283371b346def515a290af19cbc2b5c8e360c4612b5f0021f8dabe45bd9f8190537a0a55bb4bdeb9abbdab56ec2a0fe1ec27
7
- data.tar.gz: d40a0254fdb0b7bbef8e63ed5189f8eaa04b93a0e3f51c3e597db5f59577e7dbe158af2910e6fc379a0d279e9a2b90fbad9fe872a3c28eadf1a9c7e8fc879a0c
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/github/CocoaPods/Xcodeproj.svg?style=flat)](https://codeclimate.com/github/CocoaPods/Xcodeproj)
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
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Xcodeproj
2
2
  # The version of the xcodeproj gem.
3
3
  #
4
- VERSION = '1.5.3'.freeze unless defined? Xcodeproj::VERSION
4
+ VERSION = '1.5.4'.freeze unless defined? Xcodeproj::VERSION
5
5
  end
@@ -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(config_setting, root_target)
122
- variable = match_variable(config_setting)
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 config_setting.eql?('CONFIGURATION')
125
+ return name if value.eql?('CONFIGURATION')
125
126
  if root_target
126
- return root_target.build_configuration_list[name].resolve_build_setting(config_setting, root_target) || config_setting
127
+ return root_target.build_configuration_list[name].resolve_build_setting(value, root_target) || value
127
128
  else
128
- return resolve_build_setting(config_setting, root_target) || config_setting
129
+ return resolve_build_setting(value, root_target) || value
129
130
  end
130
131
  end
131
- resolve_variable_substitution(config_setting.sub(CAPTURE_VARIABLE_IN_BUILD_CONFIG, resolve_variable_substitution(variable, root_target)), root_target)
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
- dep.target_proxy.remote_global_id_string == target.uuid
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
@@ -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.3
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-10-24 00:00:00.000000000 Z
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