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
dcbf5e2f
Commit
dcbf5e2f
authored
Apr 13, 2012
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some docs for Podfile#xcodeproj and Podfile#workspace.
parent
c76fb93a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
12 deletions
+44
-12
podfile.rb
lib/cocoapods/podfile.rb
+44
-12
No files found.
lib/cocoapods/podfile.rb
View file @
dcbf5e2f
...
@@ -119,24 +119,21 @@ module Pod
...
@@ -119,24 +119,21 @@ module Pod
# platform :ios, :deployment_target => "4.0"
# platform :ios, :deployment_target => "4.0"
#
#
# If the deployment target requires it (< 4.3), armv6 will be added to ARCHS.
# If the deployment target requires it (< 4.3), armv6 will be added to ARCHS.
#
def
platform
(
platform
,
options
=
{})
def
platform
(
platform
,
options
=
{})
@target_definition
.
platform
=
Platform
.
new
(
platform
,
options
)
@target_definition
.
platform
=
Platform
.
new
(
platform
,
options
)
end
end
# Specifies the target(s) in the user’s project that this Pods library
# Specifies the Xcode workspace that should contain all the projects.
# should be linked in.
#
# If no explicit Xcode workspace is specified and only **one** project exists
# in the same directory as the Podfile, then the name of that project is used
# as the workspace’s name.
#
#
# @example
# @example
#
#
# # Link with a target in the user’s project called ‘MyApp’.
# workspace 'MyWorkspace'
# link_with 'MyApp'
#
#
# # Link with the targets in the user’s project called ‘MyApp’ and ‘MyOtherApp’.
# link_with ['MyApp', 'MyOtherApp']
def
link_with
(
targets
)
@target_definition
.
link_with
=
targets
end
def
workspace
(
path
=
nil
)
def
workspace
(
path
=
nil
)
if
path
if
path
@workspace
=
config
.
project_root
+
(
File
.
extname
(
path
)
==
'.xcworkspace'
?
path
:
"
#{
path
}
.xcworkspace"
)
@workspace
=
config
.
project_root
+
(
File
.
extname
(
path
)
==
'.xcworkspace'
?
path
:
"
#{
path
}
.xcworkspace"
)
...
@@ -150,12 +147,47 @@ module Pod
...
@@ -150,12 +147,47 @@ module Pod
end
end
end
end
# Specifies the path of the xcode project so it doesn't require the project to be specified
# Specifies the Xcode project that contains the target that the Pods library
# when running pod install each time.
# should be linked with.
#
# If no explicit project is specified, it will use the Xcode project of the
# parent target. If none of the target definitions specify an explicit project
# and there is only **one** project in the same directory as the Podfile then
# that project will be used.
#
# @example
#
# # Look for target to link with in an Xcode project called ‘MyProject.xcodeproj’.
# xcodeproj 'MyProject'
#
# target :test do
# # This Pods library links with a target in another project.
# xcodeproj 'TestProject'
# end
#
def
xcodeproj
(
path
)
def
xcodeproj
(
path
)
@target_definition
.
xcodeproj
=
path
@target_definition
.
xcodeproj
=
path
end
end
# Specifies the target(s) in the user’s project that this Pods library
# should be linked in.
#
# If no explicit target is specified, then the Pods target will be linked
# with the first target in your project. So if you only have one target you
# do not need to specify the target to link with.
#
# @example
#
# # Link with a target called ‘MyApp’ (in the user's project).
# link_with 'MyApp'
#
# # Link with the targets in the user’s project called ‘MyApp’ and ‘MyOtherApp’.
# link_with ['MyApp', 'MyOtherApp']
#
def
link_with
(
targets
)
@target_definition
.
link_with
=
targets
end
# Specifies a dependency of the project.
# Specifies a dependency of the project.
#
#
# A dependency requirement is defined by the name of the Pod and _optionally_
# A dependency requirement is defined by the name of the Pod and _optionally_
...
...
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