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
c3821aa3
Commit
c3821aa3
authored
Feb 21, 2015
by
Kyle Fuller
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3164 from CocoaPods/check-watch-extension
Configure as extension only for watch extensions
parents
20c47761
b932b8e2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
10 deletions
+23
-10
CHANGELOG.md
CHANGELOG.md
+4
-0
installer.rb
lib/cocoapods/installer.rb
+2
-1
installer_spec.rb
spec/unit/installer_spec.rb
+17
-9
No files found.
CHANGELOG.md
View file @
c3821aa3
...
...
@@ -8,6 +8,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
##### Enhancements
*
Set the
`APPLICATION_EXTENSION_API_ONLY`
build setting if integrating with a watch extension target.
[
Boris Bügling
](
https://github.com/neonichu
)
[
#3153
](
https://github.com/CocoaPods/CocoaPods/issues/3153
)
*
Build for iOS simulator only during validation. This allows validation without having
provisioning profiles set up.
[
Boris Bügling
](
https://github.com/neonichu
)
...
...
lib/cocoapods/installer.rb
View file @
c3821aa3
...
...
@@ -485,7 +485,8 @@ module Pod
def
set_target_dependencies
frameworks_group
=
pods_project
.
frameworks_group
aggregate_targets
.
each
do
|
aggregate_target
|
is_app_extension
=
aggregate_target
.
user_targets
.
map
(
&
:symbol_type
).
include?
(
:app_extension
)
is_app_extension
=
!
(
aggregate_target
.
user_targets
.
map
(
&
:symbol_type
)
&
[
:app_extension
,
:watch_extension
]).
empty?
aggregate_target
.
pod_targets
.
each
do
|
pod_target
|
configure_app_extension_api_only_for_target
(
aggregate_target
)
if
is_app_extension
...
...
spec/unit/installer_spec.rb
View file @
c3821aa3
...
...
@@ -441,6 +441,19 @@ module Pod
#--------------------------------------#
describe
'#set_target_dependencies'
do
def
test_extension_target
(
symbol_type
)
mock_user_target
=
mock
(
'UserTarget'
,
:symbol_type
=>
symbol_type
)
@target
.
stubs
(
:user_targets
).
returns
([
mock_user_target
])
build_settings
=
{}
mock_configuration
=
mock
(
'BuildConfiguration'
,
:build_settings
=>
build_settings
)
@mock_target
.
stubs
(
:build_configurations
).
returns
([
mock_configuration
])
@installer
.
send
(
:set_target_dependencies
)
build_settings
.
should
==
{
'APPLICATION_EXTENSION_API_ONLY'
=>
'YES'
}
end
before
do
spec
=
fixture_spec
(
'banana-lib/BananaLib.podspec'
)
...
...
@@ -467,16 +480,11 @@ module Pod
end
it
'configures APPLICATION_EXTENSION_API_ONLY for app extension targets'
do
mock_user_target
=
mock
(
'UserTarget'
,
:symbol_type
=>
:app_extension
)
@target
.
stubs
(
:user_targets
).
returns
([
mock_user_target
])
build_settings
=
{}
mock_configuration
=
mock
(
'BuildConfiguration'
,
:build_settings
=>
build_settings
)
@mock_target
.
stubs
(
:build_configurations
).
returns
([
mock_configuration
])
@installer
.
send
(
:set_target_dependencies
)
test_extension_target
(
:app_extension
)
end
build_settings
.
should
==
{
'APPLICATION_EXTENSION_API_ONLY'
=>
'YES'
}
it
'configures APPLICATION_EXTENSION_API_ONLY for watch extension targets'
do
test_extension_target
(
:watch_extension
)
end
it
'does not try to set APPLICATION_EXTENSION_API_ONLY if there are no pod targets'
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