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
637e2166
Commit
637e2166
authored
Aug 10, 2016
by
Ben Asher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES
parent
990cd0a9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
aggregate_xcconfig.rb
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
+3
-0
aggregate_xcconfig_spec.rb
spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
+16
-0
No files found.
lib/cocoapods/generator/xcconfig/aggregate_xcconfig.rb
View file @
637e2166
...
...
@@ -70,6 +70,9 @@ module Pod
# in embedded targets.
if
!
target
.
requires_host_target?
&&
pod_targets
.
any?
(
&
:uses_swift?
)
config
[
'EMBEDDED_CONTENT_CONTAINS_SWIFT'
]
=
'YES'
config
[
'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'
]
=
'YES'
else
config
[
'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'
]
=
'NO'
end
@xcconfig
=
Xcodeproj
::
Config
.
new
(
config
)
...
...
spec/unit/generator/xcconfig/aggregate_xcconfig_spec.rb
View file @
637e2166
...
...
@@ -256,6 +256,22 @@ module Pod
@generator
.
send
(
:pod_targets
).
first
.
stubs
(
:uses_swift?
).
returns
(
true
)
@generator
.
generate
.
to_hash
[
'EMBEDDED_CONTENT_CONTAINS_SWIFT'
].
should
.
be
.
nil
end
it
'sets ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to YES when there is swift'
do
@generator
.
send
(
:pod_targets
).
first
.
stubs
(
:uses_swift?
).
returns
(
true
)
@generator
.
generate
.
to_hash
[
'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'
].
should
==
'YES'
end
it
'sets ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to NO when there is no swift'
do
@generator
.
send
(
:pod_targets
).
first
.
stubs
(
:uses_swift?
).
returns
(
false
)
@generator
.
generate
.
to_hash
[
'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'
].
should
==
'NO'
end
it
'sets ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to NO when there is swift, but the target is an extension'
do
@target
.
stubs
(
:requires_host_target?
).
returns
(
true
)
@generator
.
send
(
:pod_targets
).
first
.
stubs
(
:uses_swift?
).
returns
(
true
)
@generator
.
generate
.
to_hash
[
'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'
].
should
==
'NO'
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