Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
7ae3875f
Commit
7ae3875f
authored
Oct 29, 2014
by
Eloy Durán
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XCConfigIntegrator] Assign xcconfigs to all targets being integrated.
Fixes #2752.
parent
27012b50
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
3 deletions
+23
-3
CHANGELOG.md
CHANGELOG.md
+6
-0
xcconfig_integrator.rb
...oject_integrator/target_integrator/xcconfig_integrator.rb
+7
-3
xcconfig_integrator_spec.rb
..._integrator/target_integrator/xcconfig_integrator_spec.rb
+10
-0
No files found.
CHANGELOG.md
View file @
7ae3875f
...
@@ -81,6 +81,12 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
...
@@ -81,6 +81,12 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
##### Bug Fixes
##### Bug Fixes
*
`XCConfigIntegrator`
Fixes an issue where not all targets that need
integration where being integrated, but were getting incorrect warnings about
the user having specified a custom base configuration.
[
Eloy Durán
](
https://github.com/alloy
)
[
2752
](
https://github.com/CocoaPods/CocoaPods/issues/2752
)
*
Do not try to clone spec-repos in
`/`
.
*
Do not try to clone spec-repos in
`/`
.
[
Eloy Durán
](
https://github.com/alloy
)
[
Eloy Durán
](
https://github.com/alloy
)
[
#2723
](
https://github.com/CocoaPods/CocoaPods/issues/2723
)
[
#2723
](
https://github.com/CocoaPods/CocoaPods/issues/2723
)
...
...
lib/cocoapods/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb
View file @
7ae3875f
...
@@ -83,22 +83,26 @@ module Pod
...
@@ -83,22 +83,26 @@ module Pod
# @param [Xcodeproj::XCBuildConfiguration] config
# @param [Xcodeproj::XCBuildConfiguration] config
# The build configuration.
# The build configuration.
#
#
# @return [Boolean] Indicates whether or not any changes were made.
#
def
self
.
set_target_xcconfig
(
pod_bundle
,
target
,
config
)
def
self
.
set_target_xcconfig
(
pod_bundle
,
target
,
config
)
path
=
pod_bundle
.
xcconfig_relative_path
(
config
.
name
)
path
=
pod_bundle
.
xcconfig_relative_path
(
config
.
name
)
group
=
config
.
project
[
'Pods'
]
||
config
.
project
.
new_group
(
'Pods'
)
group
=
config
.
project
[
'Pods'
]
||
config
.
project
.
new_group
(
'Pods'
)
file_ref
=
group
.
files
.
find
{
|
f
|
f
.
path
==
path
}
file_ref
=
group
.
files
.
find
{
|
f
|
f
.
path
==
path
}
if
config
.
base_configuration_reference
!=
file_ref
if
config
.
base_configuration_reference
&&
config
.
base_configuration_reference
!=
file_ref
UI
.
warn
'CocoaPods did not set the base configuration of your '
\
UI
.
warn
'CocoaPods did not set the base configuration of your '
\
'project because your project already has a custom '
\
'project because your project already has a custom '
\
'config set. In order for CocoaPods integration to work at '
\
'config set. In order for CocoaPods integration to work at '
\
'all, please either set the base configurations of the target '
\
'all, please either set the base configurations of the target '
\
"`
#{
target
.
name
}
` to `
#{
path
}
` or include the `
#{
path
}
` in your "
\
"`
#{
target
.
name
}
` to `
#{
path
}
` or include the `
#{
path
}
` in your "
\
'build configuration.'
'build configuration.'
false
elsif
config
.
base_configuration_reference
.
nil?
||
file_ref
.
nil?
elsif
!
file_ref
file_ref
||=
group
.
new_file
(
path
)
file_ref
||=
group
.
new_file
(
path
)
config
.
base_configuration_reference
=
file_ref
config
.
base_configuration_reference
=
file_ref
return
true
end
end
false
end
end
private
private
...
...
spec/unit/installer/user_project_integrator/target_integrator/xcconfig_integrator_spec.rb
View file @
7ae3875f
...
@@ -62,5 +62,15 @@ module Pod
...
@@ -62,5 +62,15 @@ module Pod
UI
.
warnings
.
should
.
match
/not set.*base configuration/
UI
.
warnings
.
should
.
match
/not set.*base configuration/
end
end
it
'sets the Pods xcconfig as the base config on other targets if no base has been set yet'
do
target
=
@project
.
targets
[
1
]
XCConfigIntegrator
.
integrate
(
@pod_bundle
,
[
@target
,
target
])
target
.
build_configurations
.
each
do
|
config
|
config
.
base_configuration_reference
.
path
.
should
.
include
'Pods'
end
UI
.
warnings
.
should
.
not
.
match
/not set.*base configuration/
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment