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
48422ac3
Commit
48422ac3
authored
Sep 07, 2014
by
Marius Rackwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure that the PRODUCT_NAME is a C99ext identifier
parent
ef4dfb29
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
10 deletions
+44
-10
target_installer.rb
lib/cocoapods/installer/target_installer.rb
+4
-0
target_integrator.rb
...ds/installer/user_project_integrator/target_integrator.rb
+1
-1
target.rb
lib/cocoapods/target.rb
+8
-2
aggregate_target.rb
lib/cocoapods/target/aggregate_target.rb
+8
-0
pod_target.rb
lib/cocoapods/target/pod_target.rb
+8
-0
aggregate_target_spec.rb
spec/unit/target/aggregate_target_spec.rb
+6
-2
pod_target_spec.rb
spec/unit/target/pod_target_spec.rb
+9
-5
No files found.
lib/cocoapods/installer/target_installer.rb
View file @
48422ac3
...
...
@@ -51,6 +51,10 @@ module Pod
settings
[
'ARCHS'
]
=
target
.
archs
end
if
target
.
requires_framework?
settings
[
'PRODUCT_NAME'
]
=
target
.
product_module_name
end
@native_target
.
build_configurations
.
each
do
|
configuration
|
configuration
.
build_settings
.
merge!
(
settings
)
end
...
...
lib/cocoapods/installer/user_project_integrator/target_integrator.rb
View file @
48422ac3
...
...
@@ -113,7 +113,7 @@ module Pod
end
# Find or create and add a reference for the current product type
target_basename
=
target
.
label
target_basename
=
target
.
product_basename
new_product_ref
=
frameworks
.
files
.
find
{
|
f
|
f
.
path
==
target
.
product_name
}
||
frameworks
.
new_product_ref_for_target
(
target_basename
,
target
.
product_type
)
unless
build_phase
.
files_references
.
include?
(
new_product_ref
)
...
...
lib/cocoapods/target.rb
View file @
48422ac3
...
...
@@ -37,10 +37,16 @@ module Pod
end
end
# @return [String] the name of the product excluding the file extension.
# @return [String] the name of the product excluding the file extension or
# a product type specific prefix, depends on #requires_framework?
# and #product_module_name or #label.
#
def
product_basename
label
if
requires_framework?
product_module_name
else
label
end
end
# @return [String] the name of the framework, depends on #product_basename.
...
...
lib/cocoapods/target/aggregate_target.rb
View file @
48422ac3
...
...
@@ -20,6 +20,14 @@ module Pod
target_definition
.
label
.
to_s
end
# @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
# implementation source files.
#
def
product_module_name
c99ext_identifier
(
label
)
end
# @return [Pathname] the folder where the client is stored used for
# computing the relative paths. If integrating it should be the
# folder where the user project is stored, otherwise it should
...
...
lib/cocoapods/target/pod_target.rb
View file @
48422ac3
...
...
@@ -30,6 +30,14 @@ module Pod
"
#{
target_definition
.
label
}
-
#{
root_spec
.
name
}
"
end
# @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
# implementation source files.
#
def
product_module_name
c99ext_identifier
(
pod_name
)
end
# @return [Array<Sandbox::FileAccessor>] the file accessors for the
# specifications of this target.
#
...
...
spec/unit/target/aggregate_target_spec.rb
View file @
48422ac3
...
...
@@ -188,12 +188,16 @@ module Pod
@target
.
uses_swift?
.
should
==
true
end
it
'returns the product module name'
do
@target
.
product_module_name
.
should
==
'Pods_iOS_Example'
end
it
'returns the product name'
do
@target
.
product_name
.
should
==
'Pods
-iOS
Example.framework'
@target
.
product_name
.
should
==
'Pods
_iOS_
Example.framework'
end
it
'returns the framework name'
do
@target
.
framework_name
.
should
==
'Pods
-iOS
Example.framework'
@target
.
framework_name
.
should
==
'Pods
_iOS_
Example.framework'
end
it
'returns the library name'
do
...
...
spec/unit/target/pod_target_spec.rb
View file @
48422ac3
...
...
@@ -124,11 +124,11 @@ module Pod
end
it
'returns the product name'
do
@pod_target
.
product_name
.
should
==
'
Pods-
BananaLib.framework'
@pod_target
.
product_name
.
should
==
'BananaLib.framework'
end
it
'returns the framework name'
do
@pod_target
.
framework_name
.
should
==
'
Pods-
BananaLib.framework'
@pod_target
.
framework_name
.
should
==
'BananaLib.framework'
end
it
'returns the library name'
do
...
...
@@ -150,7 +150,7 @@ module Pod
end
it
'returns the framework name'
do
@pod_target
.
framework_name
.
should
==
'
Pods-
BananaLib.framework'
@pod_target
.
framework_name
.
should
==
'BananaLib.framework'
end
it
'returns the library name'
do
...
...
@@ -176,12 +176,16 @@ module Pod
@pod_target
.
uses_swift?
.
should
==
true
end
it
'returns the product module name'
do
@pod_target
.
product_module_name
.
should
==
'OrangeFramework'
end
it
'returns the product name'
do
@pod_target
.
product_name
.
should
==
'
Pods-
OrangeFramework.framework'
@pod_target
.
product_name
.
should
==
'OrangeFramework.framework'
end
it
'returns the framework name'
do
@pod_target
.
framework_name
.
should
==
'
Pods-
OrangeFramework.framework'
@pod_target
.
framework_name
.
should
==
'OrangeFramework.framework'
end
it
'returns the library name'
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