Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 130 lines (101 sloc) 4.205 kb
7cb4ea0 Eloy Durán Use a h2 for the version in CHANGELOG
alloy authored
1 ## 0.3.0
4f0d85d Eloy Durán Add CHANGELOG.md
alloy authored
2
6cf539a Eloy Durán Include examples in CHANGELOG.
alloy authored
3 ### Multiple targets
4f0d85d Eloy Durán Add CHANGELOG.md
alloy authored
4
6cf539a Eloy Durán Include examples in CHANGELOG.
alloy authored
5 Add support for multiple static library targets in the Pods Xcode project with
6 different sets of depedencies. This means that you can create a separate
7 library which contains all dependencies, including extra ones that you only use
8 in, for instance, a debug or test build. [[docs][1]]
4f0d85d Eloy Durán Add CHANGELOG.md
alloy authored
9
6cf539a Eloy Durán Include examples in CHANGELOG.
alloy authored
10 ```Ruby
11 # This Podfile will build three static libraries:
12 # * libPods.a
13 # * libPods-debug.a
14 # * libPods-test.a
4f0d85d Eloy Durán Add CHANGELOG.md
alloy authored
15
6cf539a Eloy Durán Include examples in CHANGELOG.
alloy authored
16 # This dependency is included in the `default` target, which generates the
17 # `libPods.a` library, and all non-exclusive targets.
18 dependency 'SSCatalog'
4f0d85d Eloy Durán Add CHANGELOG.md
alloy authored
19
6cf539a Eloy Durán Include examples in CHANGELOG.
alloy authored
20 target :debug do
21 # This dependency is only included in the `debug` target, which generates
22 # the `libPods-debug.a` library.
23 dependency 'CocoaLumberjack'
24 end
4f0d85d Eloy Durán Add CHANGELOG.md
alloy authored
25
6cf539a Eloy Durán Include examples in CHANGELOG.
alloy authored
26 target :test, :exclusive => true do
27 # This dependency is *only* included in the `test` target, which generates
28 # the `libPods-test.a` library.
29 dependency 'Kiwi'
30 end
31 ```
4f0d85d Eloy Durán Add CHANGELOG.md
alloy authored
32
6cf539a Eloy Durán Include examples in CHANGELOG.
alloy authored
33 ### Install libraries from anywhere
4f0d85d Eloy Durán Add CHANGELOG.md
alloy authored
34
6cf539a Eloy Durán Include examples in CHANGELOG.
alloy authored
35 A dependency can take a git url if the repo contains a podspec file in its
36 root, or a podspec can be loaded from a file or HTTP location. If no podspec is
37 available, a specification can be defined inline in the Podfile. [[docs][2]]
38
39 ```Ruby
40 # From a spec repo.
41 dependency 'SSToolkit'
42
43 # Directly from the Pod’s repo (if it contains a podspec).
44 dependency 'SSToolkit', :git => 'https://github.com/samsoffes/sstoolkit.git'
45
46 # Directly from the Pod’s repo (if it contains a podspec) with a specific commit (or tag).
47 dependency 'SSToolkit', :git => 'https://github.com/samsoffes/sstoolkit.git',
48 :commit => '2adcd0f81740d6b0cd4589af98790eee3bd1ae7b'
49
50 # From a podspec that's outside a spec repo _and_ the library’s repo. This can be a file or http url.
51 dependency 'SSToolkit', :podspec => 'https://raw.github.com/gist/1353347/ef1800da9c5f5d267a642b8d3950b41174f2a6d7/SSToolkit-0.1.1.podspec'
52
53 # If no podspec is available anywhere, you can define one right in your Podfile.
54 dependency do |s|
55 s.name = 'SSToolkit'
56 s.version = '0.1.3'
57 s.platform = :ios
58 s.source = { :git => 'https://github.com/samsoffes/sstoolkit.git', :commit => '2adcd0f81740d6b0cd4589af98790eee3bd1ae7b' }
59 s.resources = 'Resources'
60 s.source_files = 'SSToolkit/**/*.{h,m}'
61 s.frameworks = 'QuartzCore', 'CoreGraphics'
62
63 def s.post_install(target)
64 prefix_header = config.project_pods_root + target.prefix_header_filename
65 prefix_header.open('a') do |file|
66 file.puts(%{#ifdef __OBJC__\n#import "SSToolkitDefines.h"\n#endif})
67 end
68 end
69 end
70 ```
71
72 ### Add a `post_install` hook to the Podfile class
73
74 This allows the user to customize, for instance, the generated Xcode project
75 _before_ it’s written to disk. [[docs][3]]
76
77 ```Ruby
78 # Enable garbage collection support for MacRuby applications.
79 post_install do |installer|
80 installer.project.targets.each do |target|
81 target.buildConfigurations.each do |config|
82 config.buildSettings['GCC_ENABLE_OBJC_GC'] = 'supported'
83 end
84 end
85 end
86 ```
87
88 ### Manifest
89
90 Generate a Podfile.lock file next to the Podfile, which contains a manifest of
91 your application’s dependencies and their dependencies.
92
93 ```
94 PODS:
95 - JSONKit (1.4)
96 - LibComponentLogging-Core (1.1.4)
97 - LibComponentLogging-NSLog (1.0.2):
98 - LibComponentLogging-Core (>= 1.1.4)
99 - RestKit-JSON-JSONKit (0.9.3):
100 - JSONKit
101 - RestKit (= 0.9.3)
102 - RestKit-Network (0.9.3):
103 - LibComponentLogging-NSLog
104 - RestKit (= 0.9.3)
105 - RestKit-ObjectMapping (0.9.3):
106 - RestKit (= 0.9.3)
107 - RestKit-Network (= 0.9.3)
108
109 DOWNLOAD_ONLY:
110 - RestKit (0.9.3)
111
112 DEPENDENCIES:
113 - RestKit-JSON-JSONKit
114 - RestKit-ObjectMapping
115 ```
116
117 ### Generate Xcode projects from scratch
118
119 We no longer ship template projects with the gem, but instead generate them
120 programmatically. This code has moved out into its own [Xcodeproj gem][4],
121 allowing you to automate Xcode related tasks.
122
123
124
125
126 [1]: https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/podfile.rb#L151
127 [2]: https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/podfile.rb#L82
128 [3]: https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/podfile.rb#L185
129 [4]: https://github.com/CocoaPods/Xcodeproj
Something went wrong with that request. Please try again.