Xavier Rubio Jansana
A framework is a collection of...
In both cases, manual integration
export GEM_HOME=$HOME/.gem
export PATH=$GEM_HOME/bin:$PATH
$ gem install cocoapods --user-install
$ pod init
$ pod install
$ pod update
$ pod outdated
platform :ios, '9.0'
target 'MyApp' do
use_frameworks!
pod 'Alamofire', '~> 4.5.0'
target 'MyAppTests' do
inherit! :search_paths
end
end
MAJOR.MINOR.PATCH
semver.org0.1
> 0.1
>= 0.1
< 0.1
<= 0.1
~> 0.1.2
~> 0.1
$ pod spec create Lipsum
Specification created at Lipsum.podspec
$
Pod::Spec.new do |s|
s.name = "Lipsum"
s.version = "0.0.1"
s.summary = "Simple Lorem Ipsum generator framework example."
s.description = <<-DESC
Simple Lorem Ipsum generator to support the talk Swify Framework Development for
pragmatic developers.
DESC
s.homepage = "http://xrubio.com/talks"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = "Xavier Rubio Jansana"
s.social_media_url = "http://twitter.com/teknik_tdr"
s.platform = :ios, "9.0"
s.source = { :git => "https://github.com/xrubioj/swifty-framework-Lipsum.git",
:tag => "#{s.version}" }
s.source_files = "Lipsum", "Lipsum/**/*.{h,m,swift}"
end
platform :ios, '9.0'
target 'SampleLipsumApp' do
use_frameworks!
pod 'Lipsum', :path => '../Lipsum'
#target 'SampleLipsumAppTests' do
# inherit! :search_paths
#end
end
$ pod install
Analyzing dependencies
Fetching podspec for `Lipsum` from `../Lipsum`
Downloading dependencies
Installing Lipsum (0.0.1)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use
`SampleLipsumApp.xcworkspace` for this project from now on.
Sending stats
Pod installation complete! There is 1 dependency from the
Podfile and 1 total pod installed.
$ open SampleLipsumApp.xcworkspace
public
pod update
not neededecho "4.0" > .swift-version
pod lib lint
pod trunk push Lipsum.podspec
--allow-warnings
pod lib lint
pod trunk push Lipsum.podspec
--allow-warnings
pod repo add private-repo https://github.com/xrubioj/swifty-framework-private-repo.git
pod repo push private-repo Lipsum.podspec
source
platform :ios, '9.0'
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/xrubioj/swifty-framework-private-repo.git'
target 'SampleLipsumApp' do
use_frameworks!
pod 'Lipsum', '~> 0.0.1'
#target 'SampleLipsumAppTests' do
# inherit! :search_paths
#end
end
Xavier Rubio Jansana
@teknik_tdr
https://xrubio.com
https://github.com/xrubioj/
This talk is available at:
https://xrubio.com/talks/talk-swifty-frameworks/