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
6d6d6bb3
Commit
6d6d6bb3
authored
Sep 13, 2017
by
Dimitris Koutsogiorgas
Committed by
GitHub
Sep 13, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7027 from justinseanmartin/jmartin/dont-codesign-osx-test-targets
Don't codesign :osx test targets
parents
087e894f
148348bf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
6 deletions
+34
-6
CHANGELOG.md
CHANGELOG.md
+5
-1
pod_target_installer.rb
...ller/xcode/pods_project_generator/pod_target_installer.rb
+2
-2
pod_target_installer_spec.rb
...xcode/pods_project_generator/pod_target_installer_spec.rb
+27
-3
No files found.
CHANGELOG.md
View file @
6d6d6bb3
...
...
@@ -30,7 +30,11 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Bug Fixes
*
Ensure a unique ID is generated for each resource bundle
*
Do not code sign OSX targets for testing bundles
[
Justin Martin
](
https://github.com/justinseanmartin
)
[
#7027
](
https://github.com/CocoaPods/CocoaPods/pull/7027
)
*
Ensure a unique ID is generated for each resource bundle
[
Justin Martin
](
https://github.com/justinseanmartin
)
[
#7015
](
https://github.com/CocoaPods/CocoaPods/pull/7015
)
...
...
lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
View file @
6d6d6bb3
...
...
@@ -199,8 +199,8 @@ module Pod
# requires frameworks. For tests we always use the test target name as the product name
# irrelevant to whether we use frameworks or not.
configuration
.
build_settings
[
'PRODUCT_NAME'
]
=
name
# We
need to codesign the contents of xctest bundles for Xcode to allow them to be launchable
configuration
.
build_settings
[
'CODE_SIGNING_REQUIRED'
]
=
'YES'
# We
must codesign iOS XCTest bundles that contain binary frameworks to allow them to be launchable in the simulator
configuration
.
build_settings
[
'CODE_SIGNING_REQUIRED'
]
=
'YES'
unless
target
.
platform
==
:osx
end
# Test native targets also need frameworks and resources to be copied over to their xctest bundle.
...
...
spec/unit/installer/xcode/pods_project_generator/pod_target_installer_spec.rb
View file @
6d6d6bb3
...
...
@@ -143,11 +143,16 @@ module Pod
before
do
config
.
sandbox
.
prepare
@podfile
=
Podfile
.
new
do
platform
:ios
,
'6.0'
project
'SampleProject/SampleProject'
target
'SampleProject'
target
'SampleProject'
do
platform
:ios
,
'6.0'
end
target
'SampleProject2'
do
platform
:osx
,
'10.8'
end
end
@target_definition
=
@podfile
.
target_definitions
[
'SampleProject'
]
@target_definition2
=
@podfile
.
target_definitions
[
'SampleProject2'
]
@project
=
Project
.
new
(
config
.
sandbox
.
project_path
)
config
.
sandbox
.
project
=
@project
...
...
@@ -179,9 +184,13 @@ module Pod
@coconut_pod_target
.
file_accessors
=
[
file_accessor
,
test_file_accessor
]
@coconut_pod_target
.
user_build_configurations
=
{
'Debug'
=>
:debug
,
'Release'
=>
:release
}
@installer
=
PodTargetInstaller
.
new
(
config
.
sandbox
,
@coconut_pod_target
)
@coconut_pod_target2
=
PodTarget
.
new
([
@coconut_spec
,
*
@coconut_spec
.
recursive_subspecs
],
[
@target_definition2
],
config
.
sandbox
)
@coconut_pod_target2
.
file_accessors
=
[
file_accessor
,
test_file_accessor
]
@coconut_pod_target2
.
user_build_configurations
=
{
'Debug'
=>
:debug
,
'Release'
=>
:release
}
@installer2
=
PodTargetInstaller
.
new
(
config
.
sandbox
,
@coconut_pod_target2
)
end
it
'adds the native test target to the project'
do
it
'adds the native test target to the project
for iOS targets with code signing
'
do
@installer
.
install!
@project
.
targets
.
count
.
should
==
2
@project
.
targets
.
first
.
name
.
should
==
'CoconutLib'
...
...
@@ -196,6 +205,21 @@ module Pod
@coconut_pod_target
.
test_native_targets
.
count
.
should
==
1
end
it
'adds the native test target to the project for OSX targets without code signing'
do
@installer2
.
install!
@project
.
targets
.
count
.
should
==
2
@project
.
targets
.
first
.
name
.
should
==
'CoconutLib'
native_test_target
=
@project
.
targets
[
1
]
native_test_target
.
name
.
should
==
'CoconutLib-Unit-Tests'
native_test_target
.
product_reference
.
name
.
should
==
'CoconutLib-Unit-Tests'
native_test_target
.
build_configurations
.
each
do
|
bc
|
bc
.
build_settings
[
'PRODUCT_NAME'
].
should
==
'CoconutLib-Unit-Tests'
bc
.
build_settings
[
'CODE_SIGNING_REQUIRED'
].
should
.
be
.
nil
end
native_test_target
.
symbol_type
.
should
==
:unit_test_bundle
@coconut_pod_target2
.
test_native_targets
.
count
.
should
==
1
end
it
'adds swiftSwiftOnoneSupport ld flag to the debug configuration'
do
@coconut_pod_target
.
stubs
(
:uses_swift?
).
returns
(
true
)
@installer
.
install!
...
...
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