cocoapods 0.38.2 → 0.39.0.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +175 -90
- data/lib/cocoapods.rb +0 -6
- data/lib/cocoapods/command/lib.rb +15 -10
- data/lib/cocoapods/command/repo/lint.rb +3 -1
- data/lib/cocoapods/command/repo/push.rb +13 -4
- data/lib/cocoapods/command/spec/create.rb +5 -6
- data/lib/cocoapods/command/spec/lint.rb +15 -10
- data/lib/cocoapods/executable.rb +36 -6
- data/lib/cocoapods/gem_version.rb +1 -1
- data/lib/cocoapods/generator/copy_resources_script.rb +1 -1
- data/lib/cocoapods/generator/embed_frameworks_script.rb +40 -10
- data/lib/cocoapods/generator/xcconfig.rb +1 -2
- data/lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb +9 -8
- data/lib/cocoapods/generator/xcconfig/{private_pod_xcconfig.rb → pod_xcconfig.rb} +14 -63
- data/lib/cocoapods/generator/xcconfig/xcconfig_helper.rb +1 -2
- data/lib/cocoapods/installer.rb +60 -32
- data/lib/cocoapods/installer/analyzer.rb +2 -0
- data/lib/cocoapods/installer/file_references_installer.rb +3 -3
- data/lib/cocoapods/installer/pod_source_installer.rb +24 -5
- data/lib/cocoapods/installer/source_provider_hooks_context.rb +32 -0
- data/lib/cocoapods/installer/target_installer/aggregate_target_installer.rb +6 -4
- data/lib/cocoapods/installer/target_installer/pod_target_installer.rb +2 -7
- data/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +59 -25
- data/lib/cocoapods/resolver.rb +10 -2
- data/lib/cocoapods/sandbox/file_accessor.rb +57 -0
- data/lib/cocoapods/sandbox/headers_store.rb +5 -6
- data/lib/cocoapods/target.rb +0 -12
- data/lib/cocoapods/target/pod_target.rb +7 -0
- data/lib/cocoapods/validator.rb +34 -23
- metadata +16 -16
- data/lib/cocoapods/generator/xcconfig/public_pod_xcconfig.rb +0 -53
@@ -71,7 +71,6 @@ module Pod
|
|
71
71
|
# The xcconfig to edit.
|
72
72
|
#
|
73
73
|
def self.add_spec_build_settings_to_xcconfig(consumer, xcconfig)
|
74
|
-
xcconfig.merge!(consumer.pod_target_xcconfig)
|
75
74
|
xcconfig.libraries.merge(consumer.libraries)
|
76
75
|
xcconfig.frameworks.merge(consumer.frameworks)
|
77
76
|
xcconfig.weak_frameworks.merge(consumer.weak_frameworks)
|
@@ -117,7 +116,7 @@ module Pod
|
|
117
116
|
dirname = '$(PODS_ROOT)/' + library_path.dirname.relative_path_from(sandbox_root).to_s
|
118
117
|
build_settings = {
|
119
118
|
'OTHER_LDFLAGS' => "-l#{name}",
|
120
|
-
'LIBRARY_SEARCH_PATHS' => quote([dirname]),
|
119
|
+
'LIBRARY_SEARCH_PATHS' => '$(inherited) ' + quote([dirname]),
|
121
120
|
}
|
122
121
|
xcconfig.merge!(build_settings)
|
123
122
|
end
|
data/lib/cocoapods/installer.rb
CHANGED
@@ -29,18 +29,19 @@ module Pod
|
|
29
29
|
# source control.
|
30
30
|
#
|
31
31
|
class Installer
|
32
|
-
autoload :AggregateTargetInstaller,
|
33
|
-
autoload :Analyzer,
|
34
|
-
autoload :FileReferencesInstaller,
|
35
|
-
autoload :PostInstallHooksContext,
|
36
|
-
autoload :PreInstallHooksContext,
|
37
|
-
autoload :
|
38
|
-
autoload :
|
39
|
-
autoload :
|
40
|
-
autoload :
|
41
|
-
autoload :
|
42
|
-
autoload :
|
43
|
-
autoload :
|
32
|
+
autoload :AggregateTargetInstaller, 'cocoapods/installer/target_installer/aggregate_target_installer'
|
33
|
+
autoload :Analyzer, 'cocoapods/installer/analyzer'
|
34
|
+
autoload :FileReferencesInstaller, 'cocoapods/installer/file_references_installer'
|
35
|
+
autoload :PostInstallHooksContext, 'cocoapods/installer/post_install_hooks_context'
|
36
|
+
autoload :PreInstallHooksContext, 'cocoapods/installer/pre_install_hooks_context'
|
37
|
+
autoload :SourceProviderHooksContext, 'cocoapods/installer/source_provider_hooks_context'
|
38
|
+
autoload :Migrator, 'cocoapods/installer/migrator'
|
39
|
+
autoload :PodfileValidator, 'cocoapods/installer/podfile_validator'
|
40
|
+
autoload :PodSourceInstaller, 'cocoapods/installer/pod_source_installer'
|
41
|
+
autoload :PodSourcePreparer, 'cocoapods/installer/pod_source_preparer'
|
42
|
+
autoload :PodTargetInstaller, 'cocoapods/installer/target_installer/pod_target_installer'
|
43
|
+
autoload :TargetInstaller, 'cocoapods/installer/target_installer'
|
44
|
+
autoload :UserProjectIntegrator, 'cocoapods/installer/user_project_integrator'
|
44
45
|
|
45
46
|
include Config::Mixin
|
46
47
|
|
@@ -114,7 +115,6 @@ module Pod
|
|
114
115
|
|
115
116
|
def prepare
|
116
117
|
UI.message 'Preparing' do
|
117
|
-
FileUtils.chmod_R('+w', sandbox.root)
|
118
118
|
sandbox.prepare
|
119
119
|
ensure_plugins_are_installed!
|
120
120
|
Migrator.migrate(sandbox)
|
@@ -125,6 +125,9 @@ module Pod
|
|
125
125
|
def resolve_dependencies
|
126
126
|
analyzer = create_analyzer
|
127
127
|
|
128
|
+
plugin_sources = run_source_provider_hooks
|
129
|
+
analyzer.sources.insert(0, *plugin_sources)
|
130
|
+
|
128
131
|
UI.section 'Updating local specs repositories' do
|
129
132
|
analyzer.update_repositories
|
130
133
|
end unless config.skip_repo_update?
|
@@ -303,18 +306,14 @@ module Pod
|
|
303
306
|
install_source_of_pod(spec.name)
|
304
307
|
end
|
305
308
|
else
|
306
|
-
UI.titled_section("Using #{spec}", title_options)
|
309
|
+
UI.titled_section("Using #{spec}", title_options) do
|
310
|
+
create_pod_installer(spec.name)
|
311
|
+
end
|
307
312
|
end
|
308
313
|
end
|
309
314
|
end
|
310
315
|
|
311
|
-
|
312
|
-
# installed and it exits, it is removed an then reinstalled. In any case if
|
313
|
-
# the Pod doesn't exits it is installed.
|
314
|
-
#
|
315
|
-
# @return [void]
|
316
|
-
#
|
317
|
-
def install_source_of_pod(pod_name)
|
316
|
+
def create_pod_installer(pod_name)
|
318
317
|
specs_by_platform = {}
|
319
318
|
pod_targets.each do |pod_target|
|
320
319
|
if pod_target.root_spec.name == pod_name
|
@@ -325,9 +324,20 @@ module Pod
|
|
325
324
|
|
326
325
|
@pod_installers ||= []
|
327
326
|
pod_installer = PodSourceInstaller.new(sandbox, specs_by_platform)
|
328
|
-
pod_installer.install!
|
329
327
|
@pod_installers << pod_installer
|
330
|
-
|
328
|
+
pod_installer
|
329
|
+
end
|
330
|
+
|
331
|
+
# Install the Pods. If the resolver indicated that a Pod should be
|
332
|
+
# installed and it exits, it is removed an then reinstalled. In any case if
|
333
|
+
# the Pod doesn't exits it is installed.
|
334
|
+
#
|
335
|
+
# @return [void]
|
336
|
+
#
|
337
|
+
def install_source_of_pod(pod_name)
|
338
|
+
pod_installer = create_pod_installer(pod_name)
|
339
|
+
pod_installer.install!
|
340
|
+
@installed_specs.concat(pod_installer.specs_by_platform.values.flatten.uniq)
|
331
341
|
end
|
332
342
|
|
333
343
|
# Cleans the sources of the Pods if the config instructs to do so.
|
@@ -340,6 +350,18 @@ module Pod
|
|
340
350
|
@pod_installers.each(&:clean!)
|
341
351
|
end
|
342
352
|
|
353
|
+
# Unlocks the sources of the Pods.
|
354
|
+
#
|
355
|
+
# @todo Why the @pod_installers might be empty?
|
356
|
+
#
|
357
|
+
def unlock_pod_sources
|
358
|
+
return unless @pod_installers
|
359
|
+
@pod_installers.each do |installer|
|
360
|
+
pod_target = pod_targets.find { |target| target.pod_name == installer.name }
|
361
|
+
installer.unlock_files!(pod_target.file_accessors)
|
362
|
+
end
|
363
|
+
end
|
364
|
+
|
343
365
|
# Locks the sources of the Pods if the config instructs to do so.
|
344
366
|
#
|
345
367
|
# @todo Why the @pod_installers might be empty?
|
@@ -395,11 +417,7 @@ module Pod
|
|
395
417
|
dependencies = pod_targets.select(&:should_build?).flat_map(&:dependencies)
|
396
418
|
dependended_upon_targets = pod_targets.select { |t| dependencies.include?(t.pod_name) && !t.should_build? }
|
397
419
|
|
398
|
-
static_libs = dependended_upon_targets.flat_map(&:file_accessors).flat_map
|
399
|
-
static_frameworks = fa.vendored_frameworks.reject { |fw| `file #{fw + fw.basename('.framework')} 2>&1` =~ /dynamically linked/ }
|
400
|
-
fa.vendored_libraries + static_frameworks
|
401
|
-
end
|
402
|
-
|
420
|
+
static_libs = dependended_upon_targets.flat_map(&:file_accessors).flat_map(&:vendored_static_artifacts)
|
403
421
|
unless static_libs.empty?
|
404
422
|
raise Informative, "The '#{aggregate_target.label}' target has " \
|
405
423
|
"transitive dependencies that include static binaries: (#{static_libs.to_sentence})"
|
@@ -417,9 +435,8 @@ module Pod
|
|
417
435
|
|
418
436
|
swift_pods = pod_targets.select(&:uses_swift?)
|
419
437
|
unless swift_pods.empty?
|
420
|
-
raise Informative, 'Pods written in Swift can only be integrated as frameworks;
|
421
|
-
'
|
422
|
-
'into using it. ' \
|
438
|
+
raise Informative, 'Pods written in Swift can only be integrated as frameworks; ' \
|
439
|
+
'add `use_frameworks!` to your Podfile or target to opt into using it. ' \
|
423
440
|
"The Swift #{swift_pods.size == 1 ? 'Pod being used is' : 'Pods being used are'}: " +
|
424
441
|
swift_pods.map(&:name).to_sentence
|
425
442
|
end
|
@@ -441,6 +458,7 @@ module Pod
|
|
441
458
|
# @return [void]
|
442
459
|
#
|
443
460
|
def perform_post_install_actions
|
461
|
+
unlock_pod_sources
|
444
462
|
run_plugins_post_install_hooks
|
445
463
|
warn_for_deprecations
|
446
464
|
lock_pod_sources
|
@@ -453,6 +471,16 @@ module Pod
|
|
453
471
|
HooksManager.run(:post_install, context, plugins)
|
454
472
|
end
|
455
473
|
|
474
|
+
# Runs the registered callbacks for the source provider plugin hooks.
|
475
|
+
#
|
476
|
+
# @return [void]
|
477
|
+
#
|
478
|
+
def run_source_provider_hooks
|
479
|
+
context = SourceProviderHooksContext.generate
|
480
|
+
HooksManager.run(:source_provider, context, plugins)
|
481
|
+
context.sources
|
482
|
+
end
|
483
|
+
|
456
484
|
# Ensures that all plugins specified in the {#podfile} are loaded.
|
457
485
|
#
|
458
486
|
# @return [void]
|
@@ -603,7 +631,7 @@ module Pod
|
|
603
631
|
frameworks_group = pods_project.frameworks_group
|
604
632
|
aggregate_targets.each do |aggregate_target|
|
605
633
|
is_app_extension = !(aggregate_target.user_targets.map(&:symbol_type) &
|
606
|
-
[:app_extension, :watch_extension]).empty?
|
634
|
+
[:app_extension, :watch_extension, :watch2_extension]).empty?
|
607
635
|
|
608
636
|
aggregate_target.pod_targets.each do |pod_target|
|
609
637
|
configure_app_extension_api_only_for_target(aggregate_target) if is_app_extension
|
@@ -306,6 +306,7 @@ module Pod
|
|
306
306
|
# transitive dependencies can't be deduplicated.
|
307
307
|
pod_targets.flat_map do |target|
|
308
308
|
dependent_targets = transitive_dependencies_for_pod_target(target, pod_targets)
|
309
|
+
target.dependent_targets = dependent_targets
|
309
310
|
if dependent_targets.any?(&:scoped?)
|
310
311
|
target.scoped
|
311
312
|
else
|
@@ -397,6 +398,7 @@ module Pod
|
|
397
398
|
else
|
398
399
|
pods_to_update = result.podfile_state.changed + result.podfile_state.deleted
|
399
400
|
pods_to_update += update[:pods] if update_mode == :selected
|
401
|
+
pods_to_update += podfile.dependencies.select(&:local?).map(&:name)
|
400
402
|
LockingDependencyAnalyzer.generate_version_locking_dependencies(lockfile, pods_to_update)
|
401
403
|
end
|
402
404
|
end
|
@@ -128,17 +128,17 @@ module Pod
|
|
128
128
|
end
|
129
129
|
|
130
130
|
header_mappings(headers_sandbox, file_accessor, file_accessor.headers).each do |namespaced_path, files|
|
131
|
-
pod_target.build_headers.add_files(namespaced_path, files.reject { |f| f.to_path =~ framework_exp }
|
131
|
+
pod_target.build_headers.add_files(namespaced_path, files.reject { |f| f.to_path =~ framework_exp })
|
132
132
|
end
|
133
133
|
|
134
134
|
unless pod_target.requires_frameworks? && pod_target.should_build?
|
135
135
|
header_mappings(headers_sandbox, file_accessor, file_accessor.public_headers).each do |namespaced_path, files|
|
136
|
-
sandbox.public_headers.add_files(namespaced_path, files.reject { |f| f.to_path =~ framework_exp }
|
136
|
+
sandbox.public_headers.add_files(namespaced_path, files.reject { |f| f.to_path =~ framework_exp })
|
137
137
|
end
|
138
138
|
end
|
139
139
|
|
140
140
|
vendored_frameworks_header_mappings(headers_sandbox, file_accessor).each do |namespaced_path, files|
|
141
|
-
sandbox.public_headers.add_files(namespaced_path, files
|
141
|
+
sandbox.public_headers.add_files(namespaced_path, files)
|
142
142
|
end
|
143
143
|
end
|
144
144
|
end
|
@@ -74,12 +74,22 @@ module Pod
|
|
74
74
|
#
|
75
75
|
def lock_files!(file_accessors)
|
76
76
|
return if local?
|
77
|
+
each_source_file(file_accessors) do |source_file|
|
78
|
+
FileUtils.chmod('u-w', source_file)
|
79
|
+
end
|
80
|
+
end
|
77
81
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
82
|
+
# Unlocks the source files if appropriate.
|
83
|
+
#
|
84
|
+
# @todo As the pre install hooks need to run before cleaning this
|
85
|
+
# method should be refactored.
|
86
|
+
#
|
87
|
+
# @return [void]
|
88
|
+
#
|
89
|
+
def unlock_files!(file_accessors)
|
90
|
+
return if local?
|
91
|
+
each_source_file(file_accessors) do |source_file|
|
92
|
+
FileUtils.chmod('u+w', source_file)
|
83
93
|
end
|
84
94
|
end
|
85
95
|
|
@@ -172,6 +182,15 @@ module Pod
|
|
172
182
|
!local? && !head_pod? && !predownloaded? && sandbox.specification(root_spec.name) != root_spec
|
173
183
|
end
|
174
184
|
|
185
|
+
def each_source_file(file_accessors, &blk)
|
186
|
+
file_accessors.each do |file_accessor|
|
187
|
+
file_accessor.source_files.each do |source_file|
|
188
|
+
next unless source_file.exist?
|
189
|
+
blk[source_file]
|
190
|
+
end
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
175
194
|
#-----------------------------------------------------------------------#
|
176
195
|
end
|
177
196
|
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module Pod
|
2
|
+
class Installer
|
3
|
+
# Context object designed to be used with the HooksManager which describes
|
4
|
+
# the context of the installer before spec sources have been created
|
5
|
+
#
|
6
|
+
class SourceProviderHooksContext
|
7
|
+
# @return [Array<Source>] The source objects to send to the installer
|
8
|
+
#
|
9
|
+
attr_reader :sources
|
10
|
+
|
11
|
+
# @return [SourceProviderHooksContext] Convenience class method to generate the
|
12
|
+
# static context.
|
13
|
+
#
|
14
|
+
def self.generate
|
15
|
+
result = new
|
16
|
+
result
|
17
|
+
end
|
18
|
+
|
19
|
+
def initialize
|
20
|
+
@sources = []
|
21
|
+
end
|
22
|
+
|
23
|
+
# @param [Source] Source object to be added to the installer
|
24
|
+
#
|
25
|
+
def add_source(source)
|
26
|
+
unless source.nil?
|
27
|
+
@sources << source
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -18,8 +18,8 @@ module Pod
|
|
18
18
|
create_info_plist_file
|
19
19
|
create_module_map
|
20
20
|
create_umbrella_header
|
21
|
-
create_embed_frameworks_script
|
22
21
|
end
|
22
|
+
create_embed_frameworks_script
|
23
23
|
create_bridge_support_file
|
24
24
|
create_copy_resources_script
|
25
25
|
create_acknowledgements
|
@@ -145,10 +145,12 @@ module Pod
|
|
145
145
|
frameworks_by_config = {}
|
146
146
|
target.user_build_configurations.keys.each do |config|
|
147
147
|
relevant_pod_targets = target.pod_targets.select do |pod_target|
|
148
|
-
pod_target.include_in_build_config?(target_definition, config)
|
148
|
+
pod_target.include_in_build_config?(target_definition, config)
|
149
149
|
end
|
150
|
-
frameworks_by_config[config] = relevant_pod_targets.
|
151
|
-
"
|
150
|
+
frameworks_by_config[config] = relevant_pod_targets.flat_map do |pod_target|
|
151
|
+
frameworks = pod_target.file_accessors.flat_map(&:vendored_dynamic_artifacts).map { |fw| "${PODS_ROOT}/#{fw.relative_path_from(sandbox.root)}" }
|
152
|
+
frameworks << "#{target_definition.label}/#{pod_target.product_name}" if pod_target.should_build? && pod_target.requires_frameworks?
|
153
|
+
frameworks
|
152
154
|
end
|
153
155
|
end
|
154
156
|
generator = Generator::EmbedFrameworksScript.new(frameworks_by_config)
|
@@ -163,13 +163,8 @@ module Pod
|
|
163
163
|
#
|
164
164
|
def create_xcconfig_file
|
165
165
|
path = target.xcconfig_path
|
166
|
-
|
167
|
-
|
168
|
-
add_file_to_support_group(path)
|
169
|
-
|
170
|
-
path = target.xcconfig_private_path
|
171
|
-
private_gen = Generator::XCConfig::PrivatePodXCConfig.new(target, public_gen.xcconfig)
|
172
|
-
private_gen.save_as(path)
|
166
|
+
xcconfig_gen = Generator::XCConfig::PodXCConfig.new(target)
|
167
|
+
xcconfig_gen.save_as(path)
|
173
168
|
xcconfig_file_ref = add_file_to_support_group(path)
|
174
169
|
|
175
170
|
native_target.build_configurations.each do |c|
|
@@ -12,7 +12,11 @@ module Pod
|
|
12
12
|
# @return [Array<Symbol>] the symbol types, which require that the pod
|
13
13
|
# frameworks are embedded in the output directory / product bundle.
|
14
14
|
#
|
15
|
-
EMBED_FRAMEWORK_TARGET_TYPES = [:application, :unit_test_bundle].freeze
|
15
|
+
EMBED_FRAMEWORK_TARGET_TYPES = [:application, :unit_test_bundle, :app_extension, :watch_extension, :watch2_extension].freeze
|
16
|
+
|
17
|
+
# @return [String] the name of the embed frameworks phase
|
18
|
+
#
|
19
|
+
EMBED_FRAMEWORK_PHASE_NAME = 'Embed Pods Frameworks'.freeze
|
16
20
|
|
17
21
|
# @return [AggregateTarget] the target that should be integrated.
|
18
22
|
#
|
@@ -38,10 +42,11 @@ module Pod
|
|
38
42
|
project_is_dirty = [
|
39
43
|
XCConfigIntegrator.integrate(target, native_targets),
|
40
44
|
update_to_cocoapods_0_34,
|
41
|
-
|
45
|
+
update_to_cocoapods_0_37_1,
|
46
|
+
update_to_cocoapods_0_39,
|
42
47
|
unless native_targets_to_integrate.empty?
|
43
48
|
add_pods_library
|
44
|
-
add_embed_frameworks_script_phase
|
49
|
+
add_embed_frameworks_script_phase
|
45
50
|
add_copy_resources_script_phase
|
46
51
|
add_check_manifest_lock_script_phase
|
47
52
|
true
|
@@ -100,6 +105,37 @@ module Pod
|
|
100
105
|
changes
|
101
106
|
end
|
102
107
|
|
108
|
+
# Removes the embed frameworks phase for target types.
|
109
|
+
#
|
110
|
+
# @return [Bool] whether any changes to the project were made.
|
111
|
+
#
|
112
|
+
# @todo This can be removed for CocoaPods 1.0
|
113
|
+
#
|
114
|
+
def update_to_cocoapods_0_37_1
|
115
|
+
targets_to_embed = native_targets.select do |target|
|
116
|
+
EMBED_FRAMEWORK_TARGET_TYPES.include?(target.symbol_type)
|
117
|
+
end
|
118
|
+
(native_targets - targets_to_embed).any? do |native_target|
|
119
|
+
remove_embed_frameworks_script_phase(native_target)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
# Adds the embed frameworks script when integrating as a static library.
|
124
|
+
#
|
125
|
+
# @return [Bool] whether any changes to the project were made.
|
126
|
+
#
|
127
|
+
# @todo This can be removed for CocoaPods 1.0
|
128
|
+
#
|
129
|
+
def update_to_cocoapods_0_39
|
130
|
+
requires_update = native_targets_to_embed_in.any? do |target|
|
131
|
+
!target.shell_script_build_phases.find { |bp| bp.name == 'Embed Pods Frameworks' }
|
132
|
+
end
|
133
|
+
if requires_update
|
134
|
+
add_embed_frameworks_script_phase
|
135
|
+
true
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
103
139
|
# Adds spec product reference to the frameworks build phase of the
|
104
140
|
# {TargetDefinition} integration libraries. Adds a file reference to
|
105
141
|
# the frameworks group of the project and adds it to the frameworks
|
@@ -142,36 +178,24 @@ module Pod
|
|
142
178
|
# @return [void]
|
143
179
|
#
|
144
180
|
def add_embed_frameworks_script_phase
|
145
|
-
|
146
|
-
|
147
|
-
end
|
148
|
-
targets_to_embed_in.each do |native_target|
|
149
|
-
phase = create_or_update_build_phase(native_target, 'Embed Pods Frameworks')
|
181
|
+
native_targets_to_embed_in.each do |native_target|
|
182
|
+
phase = create_or_update_build_phase(native_target, EMBED_FRAMEWORK_PHASE_NAME)
|
150
183
|
script_path = target.embed_frameworks_script_relative_path
|
151
184
|
phase.shell_script = %("#{script_path}"\n)
|
152
185
|
end
|
153
186
|
end
|
154
187
|
|
155
|
-
# Delete 'Embed Pods Frameworks' Build
|
156
|
-
#
|
157
|
-
#
|
188
|
+
# Delete a 'Embed Pods Frameworks' Copy Files Build Phase if present
|
189
|
+
#
|
190
|
+
# @param [PBXNativeTarget] native_target
|
158
191
|
#
|
159
192
|
# @return [Bool] whether any changes to the project were made.
|
160
193
|
#
|
161
|
-
def
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
native_targets.each do |native_target|
|
168
|
-
embed_build_phase = native_target.shell_script_build_phases.find { |bp| bp.name == phase_name }
|
169
|
-
next unless embed_build_phase.present?
|
170
|
-
native_target.build_phases.delete(embed_build_phase)
|
171
|
-
result = true
|
172
|
-
end
|
173
|
-
|
174
|
-
result
|
194
|
+
def remove_embed_frameworks_script_phase(native_target)
|
195
|
+
embed_build_phase = native_target.shell_script_build_phases.find { |bp| bp.name == EMBED_FRAMEWORK_PHASE_NAME }
|
196
|
+
return false unless embed_build_phase.present?
|
197
|
+
native_target.build_phases.delete(embed_build_phase)
|
198
|
+
true
|
175
199
|
end
|
176
200
|
|
177
201
|
# Adds a shell script build phase responsible to copy the resources
|
@@ -227,6 +251,16 @@ module Pod
|
|
227
251
|
@native_targets ||= target.user_targets(user_project)
|
228
252
|
end
|
229
253
|
|
254
|
+
# @return [Array<PBXNativeTarget>] The list of all the targets that
|
255
|
+
# require that the pod frameworks are embedded in the output
|
256
|
+
# directory / product bundle.
|
257
|
+
#
|
258
|
+
def native_targets_to_embed_in
|
259
|
+
native_targets_to_integrate.select do |target|
|
260
|
+
EMBED_FRAMEWORK_TARGET_TYPES.include?(target.symbol_type)
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
230
264
|
# @return [Array<PBXNativeTarget>] The list of the targets
|
231
265
|
# that have not been integrated by past installations
|
232
266
|
# of
|