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
a1204044
Commit
a1204044
authored
Sep 27, 2015
by
Boris Bügling
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4152 from CocoaPods/tvos
Add `tvos` as a new platform
parents
2b774017
50d460ba
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
34 additions
and
9 deletions
+34
-9
CHANGELOG.md
CHANGELOG.md
+4
-0
Gemfile.lock
Gemfile.lock
+3
-3
create.rb
lib/cocoapods/command/spec/create.rb
+1
-0
copy_resources_script.rb
lib/cocoapods/generator/copy_resources_script.rb
+1
-0
header.rb
lib/cocoapods/generator/header.rb
+1
-0
installer.rb
lib/cocoapods/installer.rb
+2
-0
post_install_hooks_context.rb
lib/cocoapods/installer/post_install_hooks_context.rb
+1
-1
pod_target_installer.rb
...oapods/installer/target_installer/pod_target_installer.rb
+1
-0
validator.rb
lib/cocoapods/validator.rb
+4
-0
push_spec.rb
spec/functional/command/repo/push_spec.rb
+2
-0
header_spec.rb
spec/unit/generator/header_spec.rb
+5
-0
validator_spec.rb
spec/unit/validator_spec.rb
+9
-5
No files found.
CHANGELOG.md
View file @
a1204044
...
@@ -34,6 +34,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
...
@@ -34,6 +34,10 @@ To install release candidates run `[sudo] gem install cocoapods --pre`
*
Podfile generated by
`pod init`
now specifies iOS 8.0 as the default platform
*
Podfile generated by
`pod init`
now specifies iOS 8.0 as the default platform
and includes
`use_frameworks!`
for Swift projects.
and includes
`use_frameworks!`
for Swift projects.
[
Jamie Evans
](
https://github.com/JamieREvans
)
[
Jamie Evans
](
https://github.com/JamieREvans
)
*
Support for the new
`tvos`
platform.
[
Boris Bügling
](
https://github.com/neonichu
)
[
#4152
](
https://github.com/CocoaPods/CocoaPods/pull/4152
)
*
Either generate just one pod target or generate it once for each target
*
Either generate just one pod target or generate it once for each target
definition.
definition.
...
...
Gemfile.lock
View file @
a1204044
...
@@ -7,11 +7,11 @@ GIT
...
@@ -7,11 +7,11 @@ GIT
GIT
GIT
remote: https://github.com/CocoaPods/Core.git
remote: https://github.com/CocoaPods/Core.git
revision: 9
b06e3d9a6212cabf7ab6e3a77c849df3a983a4f
revision: 9
cc774457e8326e7fed6961bab83cefeac67f266
branch: master
branch: master
specs:
specs:
cocoapods-core (0.39.0.beta.4)
cocoapods-core (0.39.0.beta.4)
activesupport (>=
3.2.15
)
activesupport (>=
4.0.2
)
fuzzy_match (~> 2.0.4)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
nap (~> 1.0)
...
@@ -24,7 +24,7 @@ GIT
...
@@ -24,7 +24,7 @@ GIT
GIT
GIT
remote: https://github.com/CocoaPods/Xcodeproj.git
remote: https://github.com/CocoaPods/Xcodeproj.git
revision:
27aecbfd66e883d1df616355347246b30fec551
d
revision:
8347cca0149d6506c0a785a8faa7f6a17dee29f
d
branch: master
branch: master
specs:
specs:
xcodeproj (0.27.2)
xcodeproj (0.27.2)
...
...
lib/cocoapods/command/spec/create.rb
View file @
a1204044
...
@@ -178,6 +178,7 @@ Pod::Spec.new do |s|
...
@@ -178,6 +178,7 @@ Pod::Spec.new do |s|
# s.ios.deployment_target = "5.0"
# s.ios.deployment_target = "5.0"
# s.osx.deployment_target = "10.7"
# s.osx.deployment_target = "10.7"
# s.watchos.deployment_target = "2.0"
# s.watchos.deployment_target = "2.0"
# s.tvos.deployment_target = "9.0"
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
...
...
lib/cocoapods/generator/copy_resources_script.rb
View file @
a1204044
...
@@ -52,6 +52,7 @@ module Pod
...
@@ -52,6 +52,7 @@ module Pod
:ios
=>
Version
.
new
(
'6.0'
),
:ios
=>
Version
.
new
(
'6.0'
),
:osx
=>
Version
.
new
(
'10.8'
),
:osx
=>
Version
.
new
(
'10.8'
),
:watchos
=>
Version
.
new
(
'2.0'
),
:watchos
=>
Version
.
new
(
'2.0'
),
:tvos
=>
Version
.
new
(
'9.0'
),
}
}
# @return [Bool] Whether the external strings file is supported by the
# @return [Bool] Whether the external strings file is supported by the
...
...
lib/cocoapods/generator/header.rb
View file @
a1204044
...
@@ -84,6 +84,7 @@ module Pod
...
@@ -84,6 +84,7 @@ module Pod
def
generate_platform_import_header
def
generate_platform_import_header
case
platform
.
name
case
platform
.
name
when
:ios
then
"#import <UIKit/UIKit.h>
\n
"
when
:ios
then
"#import <UIKit/UIKit.h>
\n
"
when
:tvos
then
"#import <UIKit/UIKit.h>
\n
"
when
:osx
then
"#import <Cocoa/Cocoa.h>
\n
"
when
:osx
then
"#import <Cocoa/Cocoa.h>
\n
"
else
"#import <Foundation/Foundation.h>
\n
"
else
"#import <Foundation/Foundation.h>
\n
"
end
end
...
...
lib/cocoapods/installer.rb
View file @
a1204044
...
@@ -569,10 +569,12 @@ module Pod
...
@@ -569,10 +569,12 @@ module Pod
osx_deployment_target
=
platforms
.
select
{
|
p
|
p
.
name
==
:osx
}.
map
(
&
:deployment_target
).
min
osx_deployment_target
=
platforms
.
select
{
|
p
|
p
.
name
==
:osx
}.
map
(
&
:deployment_target
).
min
ios_deployment_target
=
platforms
.
select
{
|
p
|
p
.
name
==
:ios
}.
map
(
&
:deployment_target
).
min
ios_deployment_target
=
platforms
.
select
{
|
p
|
p
.
name
==
:ios
}.
map
(
&
:deployment_target
).
min
watchos_deployment_target
=
platforms
.
select
{
|
p
|
p
.
name
==
:watchos
}.
map
(
&
:deployment_target
).
min
watchos_deployment_target
=
platforms
.
select
{
|
p
|
p
.
name
==
:watchos
}.
map
(
&
:deployment_target
).
min
tvos_deployment_target
=
platforms
.
select
{
|
p
|
p
.
name
==
:tvos
}.
map
(
&
:deployment_target
).
min
@pods_project
.
build_configurations
.
each
do
|
build_configuration
|
@pods_project
.
build_configurations
.
each
do
|
build_configuration
|
build_configuration
.
build_settings
[
'MACOSX_DEPLOYMENT_TARGET'
]
=
osx_deployment_target
.
to_s
if
osx_deployment_target
build_configuration
.
build_settings
[
'MACOSX_DEPLOYMENT_TARGET'
]
=
osx_deployment_target
.
to_s
if
osx_deployment_target
build_configuration
.
build_settings
[
'IPHONEOS_DEPLOYMENT_TARGET'
]
=
ios_deployment_target
.
to_s
if
ios_deployment_target
build_configuration
.
build_settings
[
'IPHONEOS_DEPLOYMENT_TARGET'
]
=
ios_deployment_target
.
to_s
if
ios_deployment_target
build_configuration
.
build_settings
[
'WATCHOS_DEPLOYMENT_TARGET'
]
=
watchos_deployment_target
.
to_s
if
watchos_deployment_target
build_configuration
.
build_settings
[
'WATCHOS_DEPLOYMENT_TARGET'
]
=
watchos_deployment_target
.
to_s
if
watchos_deployment_target
build_configuration
.
build_settings
[
'TVOS_DEPLOYMENT_TARGET'
]
=
tvos_deployment_target
.
to_s
if
tvos_deployment_target
build_configuration
.
build_settings
[
'STRIP_INSTALLED_PRODUCT'
]
=
'NO'
build_configuration
.
build_settings
[
'STRIP_INSTALLED_PRODUCT'
]
=
'NO'
build_configuration
.
build_settings
[
'CLANG_ENABLE_OBJC_ARC'
]
=
'YES'
build_configuration
.
build_settings
[
'CLANG_ENABLE_OBJC_ARC'
]
=
'YES'
end
end
...
...
lib/cocoapods/installer/post_install_hooks_context.rb
View file @
a1204044
...
@@ -66,7 +66,7 @@ module Pod
...
@@ -66,7 +66,7 @@ module Pod
#
#
attr_accessor
:specs
attr_accessor
:specs
# @return [Symbol] The platform (either `:ios`, `:watchos` or `:osx`).
# @return [Symbol] The platform (either `:ios`, `:watchos`
, `:tvos`,
or `:osx`).
#
#
attr_accessor
:platform_name
attr_accessor
:platform_name
...
...
lib/cocoapods/installer/target_installer/pod_target_installer.rb
View file @
a1204044
...
@@ -199,6 +199,7 @@ module Pod
...
@@ -199,6 +199,7 @@ module Pod
:ios
=>
Version
.
new
(
'6'
),
:ios
=>
Version
.
new
(
'6'
),
:osx
=>
Version
.
new
(
'10.8'
),
:osx
=>
Version
.
new
(
'10.8'
),
:watchos
=>
Version
.
new
(
'2.0'
),
:watchos
=>
Version
.
new
(
'2.0'
),
:tvos
=>
Version
.
new
(
'9.0'
),
}
}
# Returns the compiler flags for the source files of the given specification.
# Returns the compiler flags for the source files of the given specification.
...
...
lib/cocoapods/validator.rb
View file @
a1204044
...
@@ -94,6 +94,8 @@ module Pod
...
@@ -94,6 +94,8 @@ module Pod
platform_message
=
'[OSX] '
platform_message
=
'[OSX] '
elsif
result
.
platforms
==
[
:watchos
]
elsif
result
.
platforms
==
[
:watchos
]
platform_message
=
'[watchOS] '
platform_message
=
'[watchOS] '
elsif
result
.
platforms
==
[
:tvos
]
platform_message
=
'[tvOS] '
end
end
subspecs_message
=
''
subspecs_message
=
''
...
@@ -615,6 +617,8 @@ module Pod
...
@@ -615,6 +617,8 @@ module Pod
command
<<
' CODE_SIGN_IDENTITY=- -sdk iphonesimulator'
command
<<
' CODE_SIGN_IDENTITY=- -sdk iphonesimulator'
when
:watchos
when
:watchos
command
<<
' CODE_SIGN_IDENTITY=- -sdk watchsimulator'
command
<<
' CODE_SIGN_IDENTITY=- -sdk watchsimulator'
when
:tvos
command
<<
' CODE_SIGN_IDENTITY=- -sdk appletvsimulator'
end
end
output
,
status
=
_xcodebuild
"
#{
command
}
2>&1"
output
,
status
=
_xcodebuild
"
#{
command
}
2>&1"
...
...
spec/functional/command/repo/push_spec.rb
View file @
a1204044
...
@@ -141,6 +141,7 @@ module Pod
...
@@ -141,6 +141,7 @@ module Pod
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
true
).
times
(
3
)
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
true
).
times
(
3
)
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
true
).
twice
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
true
).
twice
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
true
).
twice
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
true
).
twice
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:tvos
,
nil
,
true
).
twice
cmd
=
command
(
'repo'
,
'push'
,
'master'
)
cmd
=
command
(
'repo'
,
'push'
,
'master'
)
Dir
.
chdir
(
temporary_directory
)
{
cmd
.
run
}
Dir
.
chdir
(
temporary_directory
)
{
cmd
.
run
}
...
@@ -150,6 +151,7 @@ module Pod
...
@@ -150,6 +151,7 @@ module Pod
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
false
).
times
(
3
)
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
false
).
times
(
3
)
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
false
).
twice
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
false
).
twice
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
false
).
twice
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
false
).
twice
Validator
.
any_instance
.
expects
(
:podfile_from_spec
).
with
(
:tvos
,
nil
,
false
).
twice
cmd
=
command
(
'repo'
,
'push'
,
'master'
,
'--use-libraries'
)
cmd
=
command
(
'repo'
,
'push'
,
'master'
,
'--use-libraries'
)
Dir
.
chdir
(
temporary_directory
)
{
cmd
.
run
}
Dir
.
chdir
(
temporary_directory
)
{
cmd
.
run
}
...
...
spec/unit/generator/header_spec.rb
View file @
a1204044
...
@@ -40,6 +40,11 @@ module Pod
...
@@ -40,6 +40,11 @@ module Pod
@gen
.
generate
.
should
.
include?
(
'#import <Foundation/Foundation.h>'
)
@gen
.
generate
.
should
.
include?
(
'#import <Foundation/Foundation.h>'
)
end
end
it
'imports Foundation for tvOS platforms'
do
@gen
.
stubs
(
:platform
).
returns
(
Pod
::
Platform
.
tvos
)
@gen
.
generate
.
should
.
include?
(
'#import <UIKit/UIKit.h>'
)
end
it
'writes the header file to the disk'
do
it
'writes the header file to the disk'
do
path
=
temporary_directory
+
'Test.h'
path
=
temporary_directory
+
'Test.h'
@gen
.
save_as
(
path
)
@gen
.
save_as
(
path
)
...
...
spec/unit/validator_spec.rb
View file @
a1204044
...
@@ -268,9 +268,9 @@ module Pod
...
@@ -268,9 +268,9 @@ module Pod
file
=
write_podspec
(
stub_podspec
)
file
=
write_podspec
(
stub_podspec
)
validator
=
Validator
.
new
(
file
,
SourcesManager
.
master
.
map
(
&
:url
))
validator
=
Validator
.
new
(
file
,
SourcesManager
.
master
.
map
(
&
:url
))
validator
.
stubs
(
:validate_url
)
validator
.
stubs
(
:validate_url
)
validator
.
expects
(
:install_pod
).
times
(
3
)
validator
.
expects
(
:install_pod
).
times
(
4
)
validator
.
expects
(
:build_pod
).
times
(
3
)
validator
.
expects
(
:build_pod
).
times
(
4
)
validator
.
expects
(
:check_file_patterns
).
times
(
3
)
validator
.
expects
(
:check_file_patterns
).
times
(
4
)
validator
.
validate
validator
.
validate
end
end
...
@@ -314,6 +314,7 @@ module Pod
...
@@ -314,6 +314,7 @@ module Pod
validator
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
'7.0'
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
'7.0'
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:tvos
,
nil
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
nil
).
once
validator
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
nil
).
once
validator
.
send
(
:perform_extensive_analysis
,
validator
.
spec
)
validator
.
send
(
:perform_extensive_analysis
,
validator
.
spec
)
end
end
...
@@ -385,7 +386,7 @@ module Pod
...
@@ -385,7 +386,7 @@ module Pod
validator
.
stubs
(
:validate_url
)
validator
.
stubs
(
:validate_url
)
git
=
Executable
.
which
(
:git
)
git
=
Executable
.
which
(
:git
)
Executable
.
stubs
(
:which
).
with
(
'git'
).
returns
(
git
)
Executable
.
stubs
(
:which
).
with
(
'git'
).
returns
(
git
)
Executable
.
expects
(
:which
).
with
(
'xcodebuild'
).
times
(
3
).
returns
(
'/usr/bin/xcodebuild'
)
Executable
.
expects
(
:which
).
with
(
'xcodebuild'
).
times
(
4
).
returns
(
'/usr/bin/xcodebuild'
)
status
=
mock
status
=
mock
status
.
stubs
(
:success?
).
returns
(
false
)
status
.
stubs
(
:success?
).
returns
(
false
)
validator
.
stubs
(
:_xcodebuild
).
returns
([
'Output'
,
status
])
validator
.
stubs
(
:_xcodebuild
).
returns
([
'Output'
,
status
])
...
@@ -402,9 +403,10 @@ module Pod
...
@@ -402,9 +403,10 @@ module Pod
validator
.
stubs
(
:validate_url
)
validator
.
stubs
(
:validate_url
)
git
=
Executable
.
which
(
:git
)
git
=
Executable
.
which
(
:git
)
Executable
.
stubs
(
:which
).
with
(
'git'
).
returns
(
git
)
Executable
.
stubs
(
:which
).
with
(
'git'
).
returns
(
git
)
Executable
.
expects
(
:which
).
with
(
'xcodebuild'
).
times
(
3
).
returns
(
'/usr/bin/xcodebuild'
)
Executable
.
expects
(
:which
).
with
(
'xcodebuild'
).
times
(
4
).
returns
(
'/usr/bin/xcodebuild'
)
command
=
'xcodebuild clean build -target Pods'
command
=
'xcodebuild clean build -target Pods'
validator
.
expects
(
:`
).
with
(
"
#{
command
}
2>&1"
).
once
.
returns
(
''
)
validator
.
expects
(
:`
).
with
(
"
#{
command
}
2>&1"
).
once
.
returns
(
''
)
validator
.
expects
(
:`
).
with
(
"
#{
command
}
CODE_SIGN_IDENTITY=- -sdk appletvsimulator 2>&1"
).
once
.
returns
(
''
)
validator
.
expects
(
:`
).
with
(
"
#{
command
}
CODE_SIGN_IDENTITY=- -sdk iphonesimulator 2>&1"
).
once
.
returns
(
''
)
validator
.
expects
(
:`
).
with
(
"
#{
command
}
CODE_SIGN_IDENTITY=- -sdk iphonesimulator 2>&1"
).
once
.
returns
(
''
)
validator
.
expects
(
:`
).
with
(
"
#{
command
}
CODE_SIGN_IDENTITY=- -sdk watchsimulator 2>&1"
).
once
.
returns
(
''
)
validator
.
expects
(
:`
).
with
(
"
#{
command
}
CODE_SIGN_IDENTITY=- -sdk watchsimulator 2>&1"
).
once
.
returns
(
''
)
validator
.
validate
validator
.
validate
...
@@ -536,6 +538,7 @@ module Pod
...
@@ -536,6 +538,7 @@ module Pod
@validator
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
true
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
true
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
true
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
true
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:tvos
,
nil
,
true
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
true
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
true
).
once
@validator
.
send
(
:perform_extensive_analysis
,
@validator
.
spec
)
@validator
.
send
(
:perform_extensive_analysis
,
@validator
.
spec
)
end
end
...
@@ -547,6 +550,7 @@ module Pod
...
@@ -547,6 +550,7 @@ module Pod
@validator
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
false
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:osx
,
nil
,
false
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
false
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:ios
,
nil
,
false
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:tvos
,
nil
,
false
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
false
).
once
@validator
.
expects
(
:podfile_from_spec
).
with
(
:watchos
,
nil
,
false
).
once
@validator
.
send
(
:perform_extensive_analysis
,
@validator
.
spec
)
@validator
.
send
(
:perform_extensive_analysis
,
@validator
.
spec
)
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