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
bbbce5aa
Commit
bbbce5aa
authored
Sep 11, 2011
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Copy complete template dir and overwrite pbxproj file.
parent
cca8cdfb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
20 deletions
+31
-20
specification.rb
lib/cocoa_pods/specification.rb
+1
-1
xcode_project.rb
lib/cocoa_pods/xcode_project.rb
+17
-8
project.pbxproj
...cocoa-touch-static-library/Pods.xcodeproj/project.pbxproj
+13
-11
No files found.
lib/cocoa_pods/specification.rb
View file @
bbbce5aa
...
...
@@ -133,7 +133,7 @@ module Pod
project
.
add_source_file
(
file
)
end
#project.pretty_print
project
.
create_
at
(
config
.
project_pods_root
+
'Pods.xcodeproj'
)
project
.
create_
in
(
config
.
project_pods_root
)
end
include
Config
::
Mixin
...
...
lib/cocoa_pods/xcode_project.rb
View file @
bbbce5aa
...
...
@@ -6,12 +6,18 @@ module Pod
# TODO see if we really need different templates for iOS and OS X
def
self
.
static_library
new
TEMPLATES_DIR
+
'cocoa-touch-static-library
/Pods.xcodeproj/project.pbxproj
'
new
TEMPLATES_DIR
+
'cocoa-touch-static-library'
end
def
initialize
(
template
)
@template
=
NSMutableDictionary
.
dictionaryWithContentsOfFile
(
template
.
to_s
)
#pretty_print
def
initialize
(
template_dir
)
@template_dir
=
template_dir
file
=
template_dir
+
template_file
@template
=
NSMutableDictionary
.
dictionaryWithContentsOfFile
(
file
.
to_s
)
pretty_print
end
def
template_file
'Pods.xcodeproj/project.pbxproj'
end
def
add_source_file
(
file
)
...
...
@@ -50,9 +56,12 @@ module Pod
@template
end
def
create_at
(
xcodeproj
)
xcodeproj
.
mkpath
pbxproj
=
xcodeproj
+
'project.pbxproj'
def
create_in
(
pods_root
)
@template_dir
.
children
.
each
do
|
child
|
puts
"Copy
#{
child
}
to
#{
pods_root
+
child
.
relative_path_from
(
@template_dir
)
}
"
FileUtils
.
cp_r
(
child
,
pods_root
+
child
.
relative_path_from
(
@template_dir
))
end
pbxproj
=
pods_root
+
template_file
@template
.
writeToFile
(
pbxproj
.
to_s
,
atomically
:true
)
end
...
...
@@ -67,7 +76,7 @@ module Pod
def
add_file_to_files_group
(
file_ref_uuid
)
object_uuid
,
object
=
objects
.
find
do
|
_
,
object
|
object
[
'isa'
]
==
'PBXGroup'
&&
object
[
'name'
]
==
'
File
s'
object
[
'isa'
]
==
'PBXGroup'
&&
object
[
'name'
]
==
'
Pod
s'
end
#object['children'] ||= []
object
[
'children'
]
<<
file_ref_uuid
...
...
xcode-project-templates/cocoa-touch-static-library/Pods.xcodeproj/project.pbxproj
View file @
bbbce5aa
...
...
@@ -14,9 +14,9 @@
/* Begin PBXFileReference section */
515B0FB5141D52E0001DC3E6
/* libPods.a */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
archive.ar
;
includeInIndex
=
0
;
path
=
libPods.a
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
515B0FB8141D52E0001DC3E6
/* Foundation.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
Foundation.framework
;
path
=
System/Library/Frameworks/Foundation.framework
;
sourceTree
=
SDKROOT
;
};
515B0FBC141D52E0001DC3E6
/* Pods-Prefix.pch */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
"Pods-Prefix.pch"
;
sourceTree
=
"<group>"
;
};
515B0FBD141D52E0001DC3E6
/* Pods.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
Pods.h
;
sourceTree
=
"<group>"
;
};
515B0FBE141D52E0001DC3E6
/* Pods.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
Pods.m
;
sourceTree
=
"<group>"
;
};
515B0FBC141D52E0001DC3E6
/* Pods-Prefix.pch */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
"Pods-Prefix.pch"
;
path
=
"Pods/Pods-Prefix.pch"
;
sourceTree
=
SOURCE_ROOT
;
};
515B0FBD141D52E0001DC3E6
/* Pods.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
Pods.h
;
path
=
Pods/Pods.h
;
sourceTree
=
SOURCE_ROOT
;
};
515B0FBE141D52E0001DC3E6
/* Pods.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
name
=
Pods.m
;
path
=
Pods/Pods.m
;
sourceTree
=
SOURCE_ROOT
;
};
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
...
...
@@ -34,7 +34,7 @@
515B0FAA141D52E0001DC3E6
=
{
isa
=
PBXGroup
;
children
=
(
515B0F
BA141D52E0
001DC3E6
/* Pods */
,
515B0F
C9141D5FBE
001DC3E6
/* Pods */
,
515B0FB7141D52E0001DC3E6
/* Frameworks */
,
515B0FB6141D52E0001DC3E6
/* Products */
,
);
...
...
@@ -56,22 +56,23 @@
name
=
Frameworks
;
sourceTree
=
"<group>"
;
};
515B0FB
A141D52E0001DC3E6
/* Pod
s */
=
{
515B0FB
B141D52E0001DC3E6
/* Supporting File
s */
=
{
isa
=
PBXGroup
;
children
=
(
515B0FBD141D52E0001DC3E6
/* Pods.h */
,
515B0FBE141D52E0001DC3E6
/* Pods.m */
,
515B0FBB141D52E0001DC3E6
/* Supporting Files */
,
515B0FBC141D52E0001DC3E6
/* Pods-Prefix.pch */
,
);
name
=
"Supporting Files"
;
path
=
Pods
;
sourceTree
=
"<group>"
;
};
515B0F
BB141D52E0001DC3E6
/* Supporting File
s */
=
{
515B0F
C9141D5FBE001DC3E6
/* Pod
s */
=
{
isa
=
PBXGroup
;
children
=
(
515B0FBC141D52E0001DC3E6
/* Pods-Prefix.pch */
,
515B0FBD141D52E0001DC3E6
/* Pods.h */
,
515B0FBE141D52E0001DC3E6
/* Pods.m */
,
515B0FBB141D52E0001DC3E6
/* Supporting Files */
,
);
name
=
"Supporting Files"
;
name
=
Pods
;
sourceTree
=
"<group>"
;
};
/* End PBXGroup section */
...
...
@@ -221,6 +222,7 @@
515B0FC4141D52E0001DC3E6
/* Release */
,
);
defaultConfigurationIsVisible
=
0
;
defaultConfigurationName
=
Release
;
};
/* End XCConfigurationList section */
};
...
...
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