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
534a2bf5
Commit
534a2bf5
authored
Mar 20, 2018
by
Paul Zabelin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use xcode default PRODUCT_MODULE_NAME for generated test targets
parent
18fd90e1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
CHANGELOG.md
CHANGELOG.md
+4
-0
pod_target_installer.rb
...ller/xcode/pods_project_generator/pod_target_installer.rb
+4
-1
pod_target_installer_spec.rb
...xcode/pods_project_generator/pod_target_installer_spec.rb
+2
-2
No files found.
CHANGELOG.md
View file @
534a2bf5
...
@@ -60,6 +60,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -60,6 +60,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
##### Bug Fixes
Use xcode default
`PRODUCT_MODULE_NAME`
for generated test targets
[
Paul Zabelin
](
https://github.com/paulz
)
[
#7506
](
https://github.com/CocoaPods/CocoaPods/issues/7506
)
*
Prevent
`xcassets`
compilation from stomping over the apps
`xcassets`
*
Prevent
`xcassets`
compilation from stomping over the apps
`xcassets`
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
Dimitris Koutsogiorgas
](
https://github.com/dnkoutso
)
[
#7003
](
https://github.com/CocoaPods/CocoaPods/issues/7003
)
[
#7003
](
https://github.com/CocoaPods/CocoaPods/issues/7003
)
...
...
lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
View file @
534a2bf5
...
@@ -277,7 +277,10 @@ module Pod
...
@@ -277,7 +277,10 @@ module Pod
# requires frameworks. For tests we always use the test target name as the product name
# requires frameworks. For tests we always use the test target name as the product name
# irrelevant to whether we use frameworks or not.
# irrelevant to whether we use frameworks or not.
configuration
.
build_settings
[
'PRODUCT_NAME'
]
=
name
configuration
.
build_settings
[
'PRODUCT_NAME'
]
=
name
configuration
.
build_settings
[
'PRODUCT_MODULE_NAME'
]
=
name
# Use xcode default product module name, which is $(PRODUCT_NAME:c99extidentifier)
# this gives us always valid name that is distinct from the parent spec module name
# which allow tests to use either import or @testable import to access the parent framework
configuration
.
build_settings
.
delete
(
'PRODUCT_MODULE_NAME'
)
# We must codesign iOS XCTest bundles that contain binary frameworks to allow them to be launchable in the simulator
# We must codesign iOS XCTest bundles that contain binary frameworks to allow them to be launchable in the simulator
unless
target
.
platform
==
:osx
unless
target
.
platform
==
:osx
configuration
.
build_settings
[
'CODE_SIGNING_REQUIRED'
]
=
'YES'
configuration
.
build_settings
[
'CODE_SIGNING_REQUIRED'
]
=
'YES'
...
...
spec/unit/installer/xcode/pods_project_generator/pod_target_installer_spec.rb
View file @
534a2bf5
...
@@ -199,7 +199,7 @@ module Pod
...
@@ -199,7 +199,7 @@ module Pod
native_test_target
.
product_reference
.
name
.
should
==
'CoconutLib-Unit-Tests'
native_test_target
.
product_reference
.
name
.
should
==
'CoconutLib-Unit-Tests'
native_test_target
.
build_configurations
.
each
do
|
bc
|
native_test_target
.
build_configurations
.
each
do
|
bc
|
bc
.
build_settings
[
'PRODUCT_NAME'
].
should
==
'CoconutLib-Unit-Tests'
bc
.
build_settings
[
'PRODUCT_NAME'
].
should
==
'CoconutLib-Unit-Tests'
bc
.
build_settings
[
'PRODUCT_MODULE_NAME'
].
should
==
'CoconutLib-Unit-Tests'
bc
.
build_settings
[
'PRODUCT_MODULE_NAME'
].
should
.
be
.
nil
bc
.
build_settings
[
'CODE_SIGNING_REQUIRED'
].
should
==
'YES'
bc
.
build_settings
[
'CODE_SIGNING_REQUIRED'
].
should
==
'YES'
bc
.
build_settings
[
'CODE_SIGNING_ALLOWED'
].
should
==
'YES'
bc
.
build_settings
[
'CODE_SIGNING_ALLOWED'
].
should
==
'YES'
bc
.
build_settings
[
'CODE_SIGN_IDENTITY'
].
should
==
'iPhone Developer'
bc
.
build_settings
[
'CODE_SIGN_IDENTITY'
].
should
==
'iPhone Developer'
...
@@ -217,7 +217,7 @@ module Pod
...
@@ -217,7 +217,7 @@ module Pod
native_test_target
.
product_reference
.
name
.
should
==
'CoconutLib-Unit-Tests'
native_test_target
.
product_reference
.
name
.
should
==
'CoconutLib-Unit-Tests'
native_test_target
.
build_configurations
.
each
do
|
bc
|
native_test_target
.
build_configurations
.
each
do
|
bc
|
bc
.
build_settings
[
'PRODUCT_NAME'
].
should
==
'CoconutLib-Unit-Tests'
bc
.
build_settings
[
'PRODUCT_NAME'
].
should
==
'CoconutLib-Unit-Tests'
bc
.
build_settings
[
'PRODUCT_MODULE_NAME'
].
should
==
'CoconutLib-Unit-Tests'
bc
.
build_settings
[
'PRODUCT_MODULE_NAME'
].
should
.
be
.
nil
bc
.
build_settings
[
'CODE_SIGNING_REQUIRED'
].
should
.
be
.
nil
bc
.
build_settings
[
'CODE_SIGNING_REQUIRED'
].
should
.
be
.
nil
bc
.
build_settings
[
'CODE_SIGNING_ALLOWED'
].
should
.
be
.
nil
bc
.
build_settings
[
'CODE_SIGNING_ALLOWED'
].
should
.
be
.
nil
bc
.
build_settings
[
'CODE_SIGN_IDENTITY'
].
should
==
''
bc
.
build_settings
[
'CODE_SIGN_IDENTITY'
].
should
==
''
...
...
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