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
96c79a05
Commit
96c79a05
authored
May 26, 2018
by
Eric Amorde
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix `INFOPLIST_FILE` being overridden when set in `pod_target_xcconfig`
parent
133d8367
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
1 deletion
+55
-1
CHANGELOG.md
CHANGELOG.md
+4
-0
pod_target_installer.rb
...ller/xcode/pods_project_generator/pod_target_installer.rb
+13
-1
pod_target_installer_spec.rb
...xcode/pods_project_generator/pod_target_installer_spec.rb
+38
-0
No files found.
CHANGELOG.md
View file @
96c79a05
...
...
@@ -24,6 +24,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
*
Fix
`INFOPLIST_FILE`
being overridden when set in a Podspec's
`pod_target_xcconfig`
[
Eric Amorde
](
https://github.com/amorde
)
[
#7530
](
https://github.com/CocoaPods/CocoaPods/issues/7530
)
*
Raise an error if user target
`SWIFT_VERSION`
is missing
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#7770
](
https://github.com/CocoaPods/CocoaPods/issues/7770
)
...
...
lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
View file @
96c79a05
...
...
@@ -79,7 +79,7 @@ module Pod
end
if
target
.
requires_frameworks?
unless
target
.
static_framework?
unless
skip_info_plist?
(
native_target
)
create_info_plist_file
(
target
.
info_plist_path
,
native_target
,
target
.
version
,
target
.
platform
)
end
create_build_phase_to_symlink_header_folders
(
native_target
)
...
...
@@ -114,6 +114,18 @@ module Pod
specs
.
any?
{
|
spec
|
spec
.
prefix_header_file
.
is_a?
(
FalseClass
)
}
end
# True if info.plist generation should be skipped
#
# @param [PXNativeTarget] native_target
#
# @return [Boolean] Whether the target should build an Info.plist file
#
def
skip_info_plist?
(
native_target
)
return
true
if
target
.
static_framework?
existing_setting
=
native_target
.
resolved_build_setting
(
'INFOPLIST_FILE'
,
true
).
values
.
compact
!
existing_setting
.
empty?
end
# Remove the default headers folder path settings for static library pod
# targets.
#
...
...
spec/unit/installer/xcode/pods_project_generator/pod_target_installer_spec.rb
View file @
96c79a05
...
...
@@ -90,6 +90,16 @@ module Pod
end
end
it
'respects INFOPLIST_FILE of pod_target_xcconfig'
do
@spec
.
pod_target_xcconfig
=
{
'INFOPLIST_FILE'
=>
'somefile.plist'
,
}
@installer
.
install!
@project
.
targets
.
first
.
build_configurations
.
each
do
|
config
|
config
.
resolve_build_setting
(
'INFOPLIST_FILE'
).
should
==
'somefile.plist'
end
end
#--------------------------------------#
describe
'headers folder paths'
do
...
...
@@ -757,6 +767,34 @@ module Pod
@pod_target
.
dummy_source_path
.
read
.
should
.
include?
(
'@interface PodsDummy_BananaLib'
)
end
it
'creates an info.plist file when frameworks are required'
do
@pod_target
.
stubs
(
:requires_frameworks?
).
returns
(
true
)
@installer
.
install!
group
=
@project
[
'Pods/BananaLib/Support Files'
]
group
.
children
.
map
(
&
:display_name
).
sort
.
should
==
[
'BananaLib-Info.plist'
,
'BananaLib-dummy.m'
,
'BananaLib-prefix.pch'
,
'BananaLib.modulemap'
,
'BananaLib.xcconfig'
,
]
end
it
'does not create an Info.plist file if INFOPLIST_FILE is set'
do
@pod_target
.
stubs
(
:requires_frameworks?
).
returns
(
true
)
@spec
.
pod_target_xcconfig
=
{
'INFOPLIST_FILE'
=>
'somefile.plist'
,
}
@installer
.
install!
group
=
@project
[
'Pods/BananaLib/Support Files'
]
group
.
children
.
map
(
&
:display_name
).
sort
.
should
==
[
'BananaLib-dummy.m'
,
'BananaLib-prefix.pch'
,
'BananaLib.modulemap'
,
'BananaLib.xcconfig'
,
]
end
#--------------------------------------------------------------------------------#
it
'creates an aggregate placeholder native target if the target should not be built'
do
...
...
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