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
7300c82c
Commit
7300c82c
authored
Jan 29, 2018
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Target] Always use the #product_module_name as the $PRODUCT_NAME
parent
83787fab
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
11 deletions
+22
-11
pod_target_installer.rb
...ller/xcode/pods_project_generator/pod_target_installer.rb
+18
-5
target_installer.rb
...nstaller/xcode/pods_project_generator/target_installer.rb
+3
-1
target.rb
lib/cocoapods/target.rb
+1
-5
No files found.
lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb
View file @
7300c82c
...
@@ -101,9 +101,6 @@ module Pod
...
@@ -101,9 +101,6 @@ module Pod
settings
[
'SWIFT_VERSION'
]
=
target
.
swift_version
settings
[
'SWIFT_VERSION'
]
=
target
.
swift_version
end
end
if
target
.
requires_frameworks?
||
target
.
uses_swift?
settings
[
'DEFINES_MODULE'
]
=
'YES'
end
settings
settings
end
end
...
@@ -610,8 +607,15 @@ module Pod
...
@@ -610,8 +607,15 @@ module Pod
return
super
unless
custom_module_map
return
super
unless
custom_module_map
path
=
target
.
module_map_path
path
=
target
.
module_map_path
UI
.
message
"- Copying module map file to
#{
UI
.
path
(
path
)
}
"
do
UI
.
message
"- Copying module map file to
#{
UI
.
path
(
path
)
}
"
do
unless
path
.
exist?
&&
FileUtils
.
identical?
(
custom_module_map
,
path
)
Tempfile
.
open
(
path
.
basename
.
to_s
)
do
|
tmp_module_map
|
FileUtils
.
cp
(
custom_module_map
,
path
)
contents
=
custom_module_map
.
read
unless
target
.
requires_frameworks?
contents
.
gsub!
(
/^(\s*)framework\s+module/
,
'\1module'
)
end
tmp_module_map
.
write
contents
tmp_module_map
.
rewind
unless
path
.
exist?
&&
FileUtils
.
identical?
(
tmp_module_map
,
path
)
FileUtils
.
cp
(
tmp_module_map
,
path
)
end
end
add_file_to_support_group
(
path
)
add_file_to_support_group
(
path
)
...
@@ -621,6 +625,7 @@ module Pod
...
@@ -621,6 +625,7 @@ module Pod
end
end
end
end
end
end
end
def
create_umbrella_header
def
create_umbrella_header
return
super
unless
custom_module_map
return
super
unless
custom_module_map
...
@@ -696,6 +701,14 @@ module Pod
...
@@ -696,6 +701,14 @@ module Pod
ditto "${PODS_ROOT}/
#{
target
.
module_map_path
.
relative_path_from
(
target
.
sandbox
.
root
)
}
" "${MODULE_MAP_PATH}"
ditto "${PODS_ROOT}/
#{
target
.
module_map_path
.
relative_path_from
(
target
.
sandbox
.
root
)
}
" "${MODULE_MAP_PATH}"
printf "
\\
n
\\
nmodule ${PRODUCT_MODULE_NAME}.Swift {
\\
n header
\\
"${COMPATIBILITY_HEADER_PATH}
\\
"
\\
n requires objc
\\
n}
\\
n" >> "${MODULE_MAP_PATH}"
printf "
\\
n
\\
nmodule ${PRODUCT_MODULE_NAME}.Swift {
\\
n header
\\
"${COMPATIBILITY_HEADER_PATH}
\\
"
\\
n requires objc
\\
n}
\\
n" >> "${MODULE_MAP_PATH}"
SH
SH
build_phase
.
input_paths
=
%W[
${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h
${PODS_ROOT}/
#{
target
.
module_map_path
.
relative_path_from
(
target
.
sandbox
.
root
)
}
]
build_phase
.
output_paths
=
%W[
${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap
${BUILT_PRODUCTS_DIR}/Swift
\
Compatibility
\
Header/${PRODUCT_MODULE_NAME}-Swift.h
]
end
end
#-----------------------------------------------------------------------#
#-----------------------------------------------------------------------#
...
...
lib/cocoapods/installer/xcode/pods_project_generator/target_installer.rb
View file @
7300c82c
...
@@ -74,7 +74,9 @@ module Pod
...
@@ -74,7 +74,9 @@ module Pod
# @return [Hash{String => String}]
# @return [Hash{String => String}]
#
#
def
custom_build_settings
def
custom_build_settings
settings
=
{}
settings
=
{
'PRODUCT_NAME'
=>
target
.
product_module_name
}
unless
target
.
archs
.
empty?
unless
target
.
archs
.
empty?
settings
[
'ARCHS'
]
=
target
.
archs
settings
[
'ARCHS'
]
=
target
.
archs
...
...
lib/cocoapods/target.rb
View file @
7300c82c
...
@@ -45,11 +45,7 @@ module Pod
...
@@ -45,11 +45,7 @@ module Pod
# and #product_module_name or #label.
# and #product_module_name or #label.
#
#
def
product_basename
def
product_basename
if
requires_frameworks?
product_module_name
product_module_name
else
label
end
end
end
# @return [String] the name of the framework, depends on #label.
# @return [String] the name of the framework, depends on #label.
...
@@ -67,7 +63,7 @@ module Pod
...
@@ -67,7 +63,7 @@ module Pod
# used for migration.
# used for migration.
#
#
def
static_library_name
def
static_library_name
"lib
#{
label
}
.a"
"lib
#{
product_module_name
}
.a"
end
end
# @return [Symbol] either :framework or :static_library, depends on
# @return [Symbol] either :framework or :static_library, depends on
...
...
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