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
1db8d02a
Commit
1db8d02a
authored
May 09, 2015
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Podfile] Add shortcut to access the podfile
parent
25e2940f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
6 deletions
+16
-6
xcconfig_helper.rb
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
+1
-1
aggregate_target_installer.rb
.../installer/target_installer/aggregate_target_installer.rb
+1
-1
aggregate_target.rb
lib/cocoapods/target/aggregate_target.rb
+6
-0
pod_target.rb
lib/cocoapods/target/pod_target.rb
+6
-0
xcconfig_helper_spec.rb
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
+2
-4
No files found.
lib/cocoapods/generator/xcconfig/xcconfig_helper.rb
View file @
1db8d02a
...
@@ -33,7 +33,7 @@ module Pod
...
@@ -33,7 +33,7 @@ module Pod
#
#
def
self
.
default_ld_flags
(
target
)
def
self
.
default_ld_flags
(
target
)
ld_flags
=
'-ObjC'
ld_flags
=
'-ObjC'
if
target
.
target_definition
.
podfile
.
set_arc_compatibility_flag?
&&
if
target
.
podfile
.
set_arc_compatibility_flag?
&&
target
.
spec_consumers
.
any?
(
&
:requires_arc?
)
target
.
spec_consumers
.
any?
(
&
:requires_arc?
)
ld_flags
<<
' -fobjc-arc'
ld_flags
<<
' -fobjc-arc'
end
end
...
...
lib/cocoapods/installer/target_installer/aggregate_target_installer.rb
View file @
1db8d02a
...
@@ -81,7 +81,7 @@ module Pod
...
@@ -81,7 +81,7 @@ module Pod
# @return [void]
# @return [void]
#
#
def
create_bridge_support_file
def
create_bridge_support_file
if
target
_definition
.
podfile
.
generate_bridge_support?
if
target
.
podfile
.
generate_bridge_support?
path
=
target
.
bridge_support_path
path
=
target
.
bridge_support_path
headers
=
native_target
.
headers_build_phase
.
files
.
map
{
|
bf
|
sandbox
.
root
+
bf
.
file_ref
.
path
}
headers
=
native_target
.
headers_build_phase
.
files
.
map
{
|
bf
|
sandbox
.
root
+
bf
.
file_ref
.
path
}
generator
=
Generator
::
BridgeSupport
.
new
(
headers
)
generator
=
Generator
::
BridgeSupport
.
new
(
headers
)
...
...
lib/cocoapods/target/aggregate_target.rb
View file @
1db8d02a
...
@@ -30,6 +30,12 @@ module Pod
...
@@ -30,6 +30,12 @@ module Pod
c99ext_identifier
(
label
)
c99ext_identifier
(
label
)
end
end
# @return [Podfile] The podfile which declares the dependency
#
def
podfile
target_definition
.
podfile
end
# @return [Pathname] the folder where the client is stored used for
# @return [Pathname] the folder where the client is stored used for
# computing the relative paths. If integrating it should be the
# computing the relative paths. If integrating it should be the
# folder where the user project is stored, otherwise it should
# folder where the user project is stored, otherwise it should
...
...
lib/cocoapods/target/pod_target.rb
View file @
1db8d02a
...
@@ -48,6 +48,12 @@ module Pod
...
@@ -48,6 +48,12 @@ module Pod
end
end
end
end
# @return [Podfile] The podfile which declares the dependency.
#
def
podfile
target_definitions
.
first
.
podfile
end
# @return [String] The name to use for the source code module constructed
# @return [String] The name to use for the source code module constructed
# for this target, and which will be used to import the module in
# for this target, and which will be used to import the module in
# implementation source files.
# implementation source files.
...
...
spec/unit/generator/xcconfig/xcconfig_helper_spec.rb
View file @
1db8d02a
...
@@ -13,17 +13,15 @@ module Pod
...
@@ -13,17 +13,15 @@ module Pod
describe
'::default_ld_flags'
do
describe
'::default_ld_flags'
do
it
'returns the default linker flags'
do
it
'returns the default linker flags'
do
podfile
=
stub
(
:set_arc_compatibility_flag?
=>
false
)
podfile
=
stub
(
:set_arc_compatibility_flag?
=>
false
)
target_definition
=
stub
(
:podfile
=>
podfile
)
target
=
stub
(
:podfile
=>
podfile
)
target
=
stub
(
:target_definition
=>
target_definition
)
result
=
@sut
.
default_ld_flags
(
target
)
result
=
@sut
.
default_ld_flags
(
target
)
result
.
should
==
'-ObjC'
result
.
should
==
'-ObjC'
end
end
it
'includes the ARC compatibility flag if required by the Podfile'
do
it
'includes the ARC compatibility flag if required by the Podfile'
do
podfile
=
stub
(
:set_arc_compatibility_flag?
=>
true
)
podfile
=
stub
(
:set_arc_compatibility_flag?
=>
true
)
target_definition
=
stub
(
:podfile
=>
podfile
)
spec_consumer
=
stub
(
:requires_arc?
=>
true
)
spec_consumer
=
stub
(
:requires_arc?
=>
true
)
target
=
stub
(
:
target_definition
=>
target_definition
,
:spec_consumers
=>
[
spec_consumer
])
target
=
stub
(
:
podfile
=>
podfile
,
:spec_consumers
=>
[
spec_consumer
])
result
=
@sut
.
default_ld_flags
(
target
)
result
=
@sut
.
default_ld_flags
(
target
)
result
.
should
==
'-ObjC -fobjc-arc'
result
.
should
==
'-ObjC -fobjc-arc'
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