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
c21acb82
Commit
c21acb82
authored
Oct 27, 2015
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set the CFBundleIdentifier using the PRODUCT_BUNDLE_IDENTIFIER build setting
This is how Xcode 7 likes to do things
parent
f7578085
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
7 deletions
+38
-7
info_plist_file.rb
lib/cocoapods/generator/info_plist_file.rb
+1
-1
pod_xcconfig.rb
lib/cocoapods/generator/xcconfig/pod_xcconfig.rb
+2
-1
aggregate_target_installer.rb
.../installer/target_installer/aggregate_target_installer.rb
+6
-5
info_plist_file_spec.rb
spec/unit/generator/info_plist_file_spec.rb
+18
-0
pod_xcconfig_spec.rb
spec/unit/generator/xcconfig/pod_xcconfig_spec.rb
+4
-0
aggregate_target_installer_spec.rb
...aller/target_installer/aggregate_target_installer_spec.rb
+7
-0
No files found.
lib/cocoapods/generator/info_plist_file.rb
View file @
c21acb82
...
@@ -64,7 +64,7 @@ module Pod
...
@@ -64,7 +64,7 @@ module Pod
<key>CFBundleExecutable</key>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<key>CFBundleIdentifier</key>
<string>
org.cocoapods.${PRODUCT_NAME:rfc1034identifier
}</string>
<string>
${PRODUCT_BUNDLE_IDENTIFIER
}</string>
<key>CFBundleInfoDictionaryVersion</key>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<string>6.0</string>
<key>CFBundleName</key>
<key>CFBundleName</key>
...
...
lib/cocoapods/generator/xcconfig/pod_xcconfig.rb
View file @
c21acb82
...
@@ -50,7 +50,8 @@ module Pod
...
@@ -50,7 +50,8 @@ module Pod
'HEADER_SEARCH_PATHS'
=>
XCConfigHelper
.
quote
(
search_paths
),
'HEADER_SEARCH_PATHS'
=>
XCConfigHelper
.
quote
(
search_paths
),
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
'GCC_PREPROCESSOR_DEFINITIONS'
=>
'$(inherited) COCOAPODS=1'
,
'SKIP_INSTALL'
=>
'YES'
,
'SKIP_INSTALL'
=>
'YES'
,
'FRAMEWORK_SEARCH_PATHS'
=>
'$(inherited) '
'FRAMEWORK_SEARCH_PATHS'
=>
'$(inherited) '
,
'PRODUCT_BUNDLE_IDENTIFIER'
=>
'org.cocoapods.${PRODUCT_NAME:rfc1034identifier}'
,
# 'USE_HEADERMAP' => 'NO'
# 'USE_HEADERMAP' => 'NO'
}
}
...
...
lib/cocoapods/installer/target_installer/aggregate_target_installer.rb
View file @
c21acb82
...
@@ -43,11 +43,12 @@ module Pod
...
@@ -43,11 +43,12 @@ module Pod
#
#
def
custom_build_settings
def
custom_build_settings
settings
=
{
settings
=
{
'OTHER_LDFLAGS'
=>
''
,
'MACH_O_TYPE'
=>
'staticlib'
,
'OTHER_LIBTOOLFLAGS'
=>
''
,
'OTHER_LDFLAGS'
=>
''
,
'PODS_ROOT'
=>
'$(SRCROOT)'
,
'OTHER_LIBTOOLFLAGS'
=>
''
,
'SKIP_INSTALL'
=>
'YES'
,
'PODS_ROOT'
=>
'$(SRCROOT)'
,
'MACH_O_TYPE'
=>
'staticlib'
,
'PRODUCT_BUNDLE_IDENTIFIER'
=>
'org.cocoapods.${PRODUCT_NAME:rfc1034identifier}'
,
'SKIP_INSTALL'
=>
'YES'
,
}
}
super
.
merge
(
settings
)
super
.
merge
(
settings
)
end
end
...
...
spec/unit/generator/info_plist_file_spec.rb
View file @
c21acb82
...
@@ -62,4 +62,22 @@ describe Pod::Generator::InfoPlistFile do
...
@@ -62,4 +62,22 @@ describe Pod::Generator::InfoPlistFile do
`plutil -lint
#{
file
}
`
`plutil -lint
#{
file
}
`
$?
.
should
.
be
.
success
$?
.
should
.
be
.
success
end
end
it
'generates a correct Info.plist file'
do
generator
=
Pod
::
Generator
::
InfoPlistFile
.
new
(
mock
(
'Target'
))
file
=
temporary_directory
+
'Info.plist'
generator
.
save_as
(
file
)
Xcodeproj
::
PlistHelper
.
read
(
file
).
should
==
{
'CFBundleDevelopmentRegion'
=>
'en'
,
'CFBundleExecutable'
=>
'${EXECUTABLE_NAME}'
,
'CFBundleIdentifier'
=>
'${PRODUCT_BUNDLE_IDENTIFIER}'
,
'CFBundleInfoDictionaryVersion'
=>
'6.0'
,
'CFBundleName'
=>
'${PRODUCT_NAME}'
,
'CFBundlePackageType'
=>
'FMWK'
,
'CFBundleShortVersionString'
=>
'1.0.0'
,
'CFBundleSignature'
=>
'????'
,
'CFBundleVersion'
=>
'${CURRENT_PROJECT_VERSION}'
,
'NSPrincipalClass'
=>
''
,
}
end
end
end
spec/unit/generator/xcconfig/pod_xcconfig_spec.rb
View file @
c21acb82
...
@@ -99,6 +99,10 @@ module Pod
...
@@ -99,6 +99,10 @@ module Pod
@xcconfig
.
to_hash
[
'SKIP_INSTALL'
].
should
==
'YES'
@xcconfig
.
to_hash
[
'SKIP_INSTALL'
].
should
==
'YES'
end
end
it
'sets PRODUCT_BUNDLE_IDENTIFIER'
do
@xcconfig
.
to_hash
[
'PRODUCT_BUNDLE_IDENTIFIER'
].
should
==
'org.cocoapods.${PRODUCT_NAME:rfc1034identifier}'
end
it
'saves the xcconfig'
do
it
'saves the xcconfig'
do
path
=
temporary_directory
+
'sample.xcconfig'
path
=
temporary_directory
+
'sample.xcconfig'
@generator
.
save_as
(
path
)
@generator
.
save_as
(
path
)
...
...
spec/unit/installer/target_installer/aggregate_target_installer_spec.rb
View file @
c21acb82
...
@@ -114,6 +114,13 @@ module Pod
...
@@ -114,6 +114,13 @@ module Pod
end
end
end
end
it
'has a PRODUCT_BUNDLE_IDENTIFIER set'
do
@installer
.
install!
@installer
.
target
.
native_target
.
build_configurations
.
each
do
|
config
|
config
.
build_settings
[
'PRODUCT_BUNDLE_IDENTIFIER'
].
should
==
'org.cocoapods.${PRODUCT_NAME:rfc1034identifier}'
end
end
#--------------------------------------#
#--------------------------------------#
it
'creates the xcconfig file'
do
it
'creates the xcconfig file'
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