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
fe850b80
Commit
fe850b80
authored
Apr 28, 2018
by
Dimitris Koutsogiorgas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not crash when creating build settings for a missing user build configuration
parent
ab98c0e6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
4 deletions
+31
-4
CHANGELOG.md
CHANGELOG.md
+4
-0
aggregate_target_installer.rb
...code/pods_project_generator/aggregate_target_installer.rb
+1
-0
aggregate_target_installer_spec.rb
...pods_project_generator/aggregate_target_installer_spec.rb
+26
-4
No files found.
CHANGELOG.md
View file @
fe850b80
...
@@ -23,6 +23,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -23,6 +23,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
##### Bug Fixes
*
Do not crash when creating build settings for a missing user build configuration
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#7698
](
https://github.com/CocoaPods/CocoaPods/pull/7698
)
*
Do not include test dependencies input and output paths
*
Do not include test dependencies input and output paths
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#7688
](
https://github.com/CocoaPods/CocoaPods/pull/7688
)
[
#7688
](
https://github.com/CocoaPods/CocoaPods/pull/7688
)
...
...
lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb
View file @
fe850b80
...
@@ -95,6 +95,7 @@ module Pod
...
@@ -95,6 +95,7 @@ module Pod
#
#
def
create_xcconfig_file
(
native_target
)
def
create_xcconfig_file
(
native_target
)
native_target
.
build_configurations
.
each
do
|
configuration
|
native_target
.
build_configurations
.
each
do
|
configuration
|
next
unless
target
.
user_build_configurations
.
key?
(
configuration
.
name
)
path
=
target
.
xcconfig_path
(
configuration
.
name
)
path
=
target
.
xcconfig_path
(
configuration
.
name
)
build_settings
=
target
.
build_settings
(
configuration
.
name
)
build_settings
=
target
.
build_settings
(
configuration
.
name
)
update_changed_file
(
build_settings
,
path
)
update_changed_file
(
build_settings
,
path
)
...
...
spec/unit/installer/xcode/pods_project_generator/aggregate_target_installer_spec.rb
View file @
fe850b80
...
@@ -19,6 +19,7 @@ module Pod
...
@@ -19,6 +19,7 @@ module Pod
config
.
sandbox
.
project
=
@project
config
.
sandbox
.
project
=
@project
path_list
=
Sandbox
::
PathList
.
new
(
fixture
(
'banana-lib'
))
path_list
=
Sandbox
::
PathList
.
new
(
fixture
(
'banana-lib'
))
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
@spec
.
prefix_header_contents
=
'#import "BlocksKit.h"'
file_accessor
=
Sandbox
::
FileAccessor
.
new
(
path_list
,
@spec
.
consumer
(
:ios
))
file_accessor
=
Sandbox
::
FileAccessor
.
new
(
path_list
,
@spec
.
consumer
(
:ios
))
@project
.
add_pod_group
(
'BananaLib'
,
fixture
(
'banana-lib'
))
@project
.
add_pod_group
(
'BananaLib'
,
fixture
(
'banana-lib'
))
group
=
@project
.
group_for_spec
(
'BananaLib'
)
group
=
@project
.
group_for_spec
(
'BananaLib'
)
...
@@ -26,12 +27,17 @@ module Pod
...
@@ -26,12 +27,17 @@ module Pod
@project
.
add_file_reference
(
file
,
group
)
@project
.
add_file_reference
(
file
,
group
)
end
end
user_build_configurations
=
{
'Debug'
=>
:debug
,
'Release'
=>
:release
,
'AppStore'
=>
:release
,
'Test'
=>
:debug
}
@platform
=
Platform
.
new
(
:ios
,
'6.0'
)
@pod_target
=
PodTarget
.
new
(
config
.
sandbox
,
false
,
user_build_configurations
,
[],
Platform
.
new
(
:ios
,
'6.0'
),
[
@spec
],
[
@target_definition
],
[
file_accessor
])
user_build_configurations
=
{
'Debug'
=>
:debug
,
'Release'
=>
:release
,
'AppStore'
=>
:release
,
'Test'
=>
:debug
}
@pod_target
=
PodTarget
.
new
(
config
.
sandbox
,
false
,
user_build_configurations
,
[],
@platform
,
[
@spec
],
[
@target_definition
],
[
file_accessor
])
pod_targets_by_config
=
Hash
[
user_build_configurations
.
each_key
.
map
{
|
c
|
[
c
,
[
@pod_target
]]
}]
pod_targets_by_config
=
Hash
[
user_build_configurations
.
each_key
.
map
{
|
c
|
[
c
,
[
@pod_target
]]
}]
@target
=
AggregateTarget
.
new
(
config
.
sandbox
,
false
,
user_build_configurations
,
[],
Platform
.
new
(
:ios
,
'6.0'
),
@target_definition
,
config
.
sandbox
.
root
.
dirname
,
nil
,
nil
,
pod_targets_by_config
)
@target
=
AggregateTarget
.
new
(
config
.
sandbox
,
false
,
user_build_configurations
,
[],
@platform
,
@target_definition
,
config
.
sandbox
.
root
.
dirname
,
nil
,
nil
,
pod_targets_by_config
)
@installer
=
AggregateTargetInstaller
.
new
(
config
.
sandbox
,
@project
,
@target
)
@installer
=
AggregateTargetInstaller
.
new
(
config
.
sandbox
,
@project
,
@target
)
@spec
.
prefix_header_contents
=
'#import "BlocksKit.h"'
end
end
it
'adds file references for the support files of the target'
do
it
'adds file references for the support files of the target'
do
...
@@ -261,6 +267,22 @@ module Pod
...
@@ -261,6 +267,22 @@ module Pod
build_file
.
should
.
not
.
be
.
nil
build_file
.
should
.
not
.
be
.
nil
build_file
.
settings
.
should
==
{
'ATTRIBUTES'
=>
[
'Public'
]
}
build_file
.
settings
.
should
==
{
'ATTRIBUTES'
=>
[
'Public'
]
}
end
end
it
'does not create xcconfigs for non existent user build configurations'
do
target
=
AggregateTarget
.
new
(
config
.
sandbox
,
false
,
{
'Debug'
=>
:debug
},
[],
@platform
,
@target_definition
,
config
.
sandbox
.
root
.
dirname
,
nil
,
nil
,
{})
@installer
=
AggregateTargetInstaller
.
new
(
config
.
sandbox
,
@project
,
target
)
@installer
.
install!
group
=
@project
.
support_files_group
[
'Pods-SampleProject'
]
group
.
children
.
map
(
&
:display_name
).
sort
.
should
==
[
'Pods-SampleProject-acknowledgements.markdown'
,
'Pods-SampleProject-acknowledgements.plist'
,
'Pods-SampleProject-dummy.m'
,
'Pods-SampleProject-frameworks.sh'
,
'Pods-SampleProject-resources.sh'
,
'Pods-SampleProject.debug.xcconfig'
,
]
end
end
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