SlideShare a Scribd company logo
Women Who Code
iOS Meetup
2016 AUG 21
Dependent things   dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshare
While on your journey of introducing a new experience for your amazing app
you hit a decision point.
Do you develop write your own code or do you use something someone has
written?
If you want to DIY, turn to page 57
If you want to use something someone has written, turn to page 154
Dependent things   dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshare
What this talk IS covering
Dependency Management Options
Pros and Cons of each
My personal bias
What this talk IS NOT
covering
Application Architecture (kind of)
Project Structure (sort of)
System Configuration (just a little)
154
Dependent things   dependency management for apple sw - slideshare
Cocoapods in 5 “easy” steps
$ sudo gem install cocoapods && pod setup —-verbose
$ pod init
$ pod install
$ nano Podfile
1
2
3
4
// sudo because it’s a global install
// gem because it’s written in Ruby
// Run setup… go take a break
// if setup breaks… there’s a fix
// creates a ‘Podfile’ with defaults
// Assumes you already are at the top level of your project
// (personal choice) use linux text editor for initial changes to Podfile
// select your platform
// select the libraries you want to use
// exit from the editor
// install libraries
5 $ open MyApp.xcworkspace // open workspace in XCode. W T H is a workspace?
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'PrettyRandom' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for PrettyRandom
pod 'CocoaLumberjack/Swift'
target 'PrettyRandomTests' do
inherit! :search_paths
# Pods for testing
end
target 'PrettyRandomUITests' do
inherit! :search_paths
# Pods for testing
end
end
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
target 'PrettyRandom' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for PrettyRandom
pod 'CocoaLumberjack/Swift'
target 'PrettyRandomTests' do
inherit! :search_paths
# Pods for testing
end
target 'PrettyRandomUITests' do
inherit! :search_paths
# Pods for testing
end
end
Dependent things   dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshare
I love homebrew
http://brew.sh
Dependent things   dependency management for apple sw - slideshare
Carthage in 5 “easy”-ish steps
$ brew install carthage
$ nano Cartfile
$ carthage update —-platform iOS
1
2
3
4
// shouldn’t take long
// it’s easier to start a Cartfile from here
// install libraries for the type of app you are building for
// extremely minimalistic
// This is platform dependent
// you must manually link your libraries
// It has to be done through the XCode UI
4?
github "CocoaLumberjack/CocoaLumberjack"
Carthage Step 4 (a) … (c)
macOS
iOS, watchOS, tvOS
• On your application targets’ “General” settings tab, in the “Embedded Binaries” section, drag and drop each
framework you want to use from the Carthage/Build folder on disk.
• On your application target’s “Build Phases” settings tab, click the “+” icon and choose “New Copy Files Phase”.
• For each framework you’re using, drag and drop its corresponding dSYM file.
• On your application targets’ “General” settings tab, in the “Linked Frameworks and Libraries” section, drag and
drop each framework you want to use from the Carthage/Build folder on disk.
• On your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase”.
Create a Run Script in which you specify your shell (ex: bin/sh), add the following contents to the script area below
the shell:
• and add the paths to the frameworks you want to use under “Input Files”, e.g.:
/usr/local/bin/carthage copy-frameworks
$(SRCROOT)/Carthage/Build/iOS/Box.framework
$(SRCROOT)/Carthage/Build/iOS/Result.framework
$(SRCROOT)/Carthage/Build/iOS/ReactiveCocoa.framework
Dependent things   dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshare
Dependent things   dependency management for apple sw - slideshare
Swift PM in 5
$ swift package init --type executable
$ swift package generate-xcodeproj
1
2
3
5
// creates a ‘Package.swift’ with defaults
// Assumes you already are at the top level of
your project
// depending on your internets, this could take a while
// add dependencies
// generates PrettyRandom.xcodeproj file
Install Xcode 8.0 (beta)
$ open PrettyRandom.xcodeproj
4
import PackageDescription
let package = Package(
name: "PrettyRandom",
dependencies: [
.Package(url: "https://github.com/thecb4/SwiftyJSON.git", versions: Version(3,0,2)..<Version(3,0,34)),
]
)
$ nano Package.swift
// open Xcode (beta) and realize nothing works because
the library isn’t Swift 3 compatible
Swift PM in 5… Nevermind
$ swift package init --type executable
$ swift package generate-xcodeproj
1
2
3
5
// creates a ‘Package.swift’ with defaults
// Assumes you already are at the top level of
your project
// depending on your internets, this could take a while
// add dependencies
// generates PrettyRandom.xcodeproj file
Install Xcode 8.0 (beta)
$ open PrettyRandom.xcodeproj
4
import PackageDescription
let package = Package(
name: "PrettyRandom",
dependencies: [
.Package(url: "https://github.com/thecb4/SwiftyJSON.git", versions: Version(3,0,2)..<Version(3,0,34)),
]
)
$ nano Package.swift
// open Xcode (beta) and realize nothing works because
the library isn’t Swift 3 compatible
Dependent things   dependency management for apple sw - slideshare
side by side comparison
Written In Ruby Swift Swift
Current Version 1.0.1 0.16.2 swiftpm-18
Control File Podfile Cartfile Package.swift
Repository Cocoapods Trunk git git
Libraries 3000+ 3000+1 ???
Search Index website,
command line
If it’s on github you can
use it1
IBM Catalog
Version support Semantic Semantic Semantic
Target Support Yes What target? On Roadmap
Integration Type Source Source or Binary Source
Platform Support
macOS, iOS, watchOS,
tvOS
macOS, iOS, watchOS,
tvOS
Linux, macOS2, iOS2,
watchOS2, tvOS2
Swift Support 2.2.3 2.2.3 3.0
1. The library has to have a Shared Scheme to work
2. If you are building a library you are fine. Anything with a UI is a lot of work
I love carthage
https://github.com/Carthage/Carthage
Written In Ruby Swift Swift
Current Version 1.0.1 0.16.2 swiftpm-18
Control File Podfile Cartfile Package.swift
Repository Cocoapods Trunk git git
Libraries 3000+ 3000+1 ???
Search Index website,
command line
If it’s on github you can
use it1
IBM Catalog
Version support Semantic Semantic Semantic
Target Support Yes What target? On Roadmap
Integration Type Source Source or Binary Source
Platform Support
macOS, iOS, watchOS,
tvOS
macOS, iOS, watchOS,
tvOS
Linux, macOS2, iOS2,
watchOS2, tvOS2
Swift Support 2.2.3 2.2.3 3.0
1. The library has to have a Shared Scheme to work
2. If you are building a library you are fine. Anything with a UI is a lot of work
Dependent things   dependency management for apple sw - slideshare
Any Questions?
references
These slides… http://goo.gl/oJM5Pf
Homebrew… http://brew.sh
Carthage… https://github.com/Carthage/Carthage
Cocoapods… https://cocoapods.org
Swift Package Manager… https://swift.org/package-manager
Libraries vs. Frameworks… http://www.knowstack.com/framework-vs-library-cocoa-ios/
contact
cavelle@thecb4.io
@_thecb4

More Related Content

PDF
Cape Cod Web Technology Meetup - 3
PDF
CocoaHeads Rennes #13 : CocoaPods
PDF
composer_talk_20160209
PDF
Cocoa pods
PPTX
Developing Cross Platform Applications with Golang
PDF
Building a Drupal site with Git
PDF
Composer Helpdesk
PDF
Composer - The missing package manager for PHP
Cape Cod Web Technology Meetup - 3
CocoaHeads Rennes #13 : CocoaPods
composer_talk_20160209
Cocoa pods
Developing Cross Platform Applications with Golang
Building a Drupal site with Git
Composer Helpdesk
Composer - The missing package manager for PHP

What's hot (20)

PPTX
LVPHP.org
PDF
Php Dependency Management with Composer ZendCon 2016
PDF
WebRTC - Brings Real-Time to the Web
PPTX
drone continuous Integration
PPTX
PHP & JavaScript & CSS Coding style
PDF
Console Apps: php artisan forthe:win
PDF
Automate Yo' Self
PDF
A Modest Introduction to Swift
PDF
High Productivity Web Development Workflow
PDF
Moderne Android Builds mit Gradle
PDF
Cenário atual do PHP e Introdução ao Laravel no Devinvale 2014
PDF
手機自動化測試和持續整合
PDF
Perl Continous Integration
PDF
用 Go 語言實戰 Push Notification 服務
PDF
Dependency management in golang
PDF
Lesson 02 - React Native Development Environment Setup
PPT
Lunch and learn as3_frameworks
PDF
Getting Your Hooks into Cordova
PDF
Getting your Hooks into Cordova
ODP
Apache Cordova, Hybrid Application Development
LVPHP.org
Php Dependency Management with Composer ZendCon 2016
WebRTC - Brings Real-Time to the Web
drone continuous Integration
PHP & JavaScript & CSS Coding style
Console Apps: php artisan forthe:win
Automate Yo' Self
A Modest Introduction to Swift
High Productivity Web Development Workflow
Moderne Android Builds mit Gradle
Cenário atual do PHP e Introdução ao Laravel no Devinvale 2014
手機自動化測試和持續整合
Perl Continous Integration
用 Go 語言實戰 Push Notification 服務
Dependency management in golang
Lesson 02 - React Native Development Environment Setup
Lunch and learn as3_frameworks
Getting Your Hooks into Cordova
Getting your Hooks into Cordova
Apache Cordova, Hybrid Application Development
Ad

Viewers also liked (10)

PPTX
Apple - what's new in iOS 10, watchOS 3 & tvOS 10
PDF
Learn watchOS Programming!
PPTX
Apple Watch Technology & WatchOS 2
PDF
[CocoaHeads Tricity] watchOS 2 - native apps are coming
PDF
watchOS 2でゲーム作ってみた話
PPTX
Transfer data from iPhone to iWatch
PDF
C language in our world 2016
PDF
Apple watch course
PDF
D2 OPEN SEMINAR - WWDC 핫 이슈
PDF
Development of Mobile Applications
Apple - what's new in iOS 10, watchOS 3 & tvOS 10
Learn watchOS Programming!
Apple Watch Technology & WatchOS 2
[CocoaHeads Tricity] watchOS 2 - native apps are coming
watchOS 2でゲーム作ってみた話
Transfer data from iPhone to iWatch
C language in our world 2016
Apple watch course
D2 OPEN SEMINAR - WWDC 핫 이슈
Development of Mobile Applications
Ad

Similar to Dependent things dependency management for apple sw - slideshare (20)

PDF
"I have a framework idea" - Repeat less, share more.
PPTX
How Do I Pick the Best Platform for an iOS App?
PDF
MPD2011 | Александр Додатко "Процесс непрерывной интеграции для iOS проектов"
PPTX
How to Choose the Best Platform for iOS App Development?
PDF
Building a Cross-Platform Mobile SDK in Rust.pdf
PDF
How to build your own iOS framework
PDF
Nimble - iOS dependency management
PPTX
Bitrise: Make iOS Builds Faster - Tokyo 2019 March - Cookpad meetup
PDF
Jazoon12 355 aleksandra_gavrilovska-1
PDF
Fastlane - ATC 2016
PDF
[CONFidence 2016] Sławomir Kosowski - Introduction to iOS Application Securit...
PDF
Write cross platform native apps in Ruby
PDF
RubyMotion Inspect Conference - 2013. (With speaker notes.)
PPTX
CocoaPods.pptx
PDF
Automate your iOS deployment a bit
PPT
State ofappdevelopment
PDF
Building static libraries for iOS with CocoaPods
PDF
Gigigo Workshop - Create an iOS Framework, document it and not die trying
PDF
[Srijan Wednesday Webinars] Building Full-Fledged Native Apps Using RubyMotion
PPTX
Continous Integration for iOS Projects
"I have a framework idea" - Repeat less, share more.
How Do I Pick the Best Platform for an iOS App?
MPD2011 | Александр Додатко "Процесс непрерывной интеграции для iOS проектов"
How to Choose the Best Platform for iOS App Development?
Building a Cross-Platform Mobile SDK in Rust.pdf
How to build your own iOS framework
Nimble - iOS dependency management
Bitrise: Make iOS Builds Faster - Tokyo 2019 March - Cookpad meetup
Jazoon12 355 aleksandra_gavrilovska-1
Fastlane - ATC 2016
[CONFidence 2016] Sławomir Kosowski - Introduction to iOS Application Securit...
Write cross platform native apps in Ruby
RubyMotion Inspect Conference - 2013. (With speaker notes.)
CocoaPods.pptx
Automate your iOS deployment a bit
State ofappdevelopment
Building static libraries for iOS with CocoaPods
Gigigo Workshop - Create an iOS Framework, document it and not die trying
[Srijan Wednesday Webinars] Building Full-Fledged Native Apps Using RubyMotion
Continous Integration for iOS Projects

Recently uploaded (20)

PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
Introduction to Artificial Intelligence
PDF
System and Network Administration Chapter 2
PDF
top salesforce developer skills in 2025.pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
history of c programming in notes for students .pptx
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
ai tools demonstartion for schools and inter college
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
Digital Strategies for Manufacturing Companies
PDF
Understanding Forklifts - TECH EHS Solution
PDF
System and Network Administraation Chapter 3
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Nekopoi APK 2025 free lastest update
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Introduction to Artificial Intelligence
System and Network Administration Chapter 2
top salesforce developer skills in 2025.pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
history of c programming in notes for students .pptx
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
VVF-Customer-Presentation2025-Ver1.9.pptx
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
CHAPTER 2 - PM Management and IT Context
ai tools demonstartion for schools and inter college
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Digital Strategies for Manufacturing Companies
Understanding Forklifts - TECH EHS Solution
System and Network Administraation Chapter 3
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Wondershare Filmora 15 Crack With Activation Key [2025
Nekopoi APK 2025 free lastest update
Lecture 3: Operating Systems Introduction to Computer Hardware Systems

Dependent things dependency management for apple sw - slideshare

  • 1. Women Who Code iOS Meetup 2016 AUG 21
  • 4. While on your journey of introducing a new experience for your amazing app you hit a decision point. Do you develop write your own code or do you use something someone has written? If you want to DIY, turn to page 57 If you want to use something someone has written, turn to page 154
  • 10. What this talk IS covering Dependency Management Options Pros and Cons of each My personal bias
  • 11. What this talk IS NOT covering Application Architecture (kind of) Project Structure (sort of) System Configuration (just a little)
  • 12. 154
  • 14. Cocoapods in 5 “easy” steps $ sudo gem install cocoapods && pod setup —-verbose $ pod init $ pod install $ nano Podfile 1 2 3 4 // sudo because it’s a global install // gem because it’s written in Ruby // Run setup… go take a break // if setup breaks… there’s a fix // creates a ‘Podfile’ with defaults // Assumes you already are at the top level of your project // (personal choice) use linux text editor for initial changes to Podfile // select your platform // select the libraries you want to use // exit from the editor // install libraries 5 $ open MyApp.xcworkspace // open workspace in XCode. W T H is a workspace? # Uncomment this line to define a global platform for your project # platform :ios, '9.0' target 'PrettyRandom' do # Comment this line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! # Pods for PrettyRandom pod 'CocoaLumberjack/Swift' target 'PrettyRandomTests' do inherit! :search_paths # Pods for testing end target 'PrettyRandomUITests' do inherit! :search_paths # Pods for testing end end
  • 15. # Uncomment this line to define a global platform for your project # platform :ios, '9.0' target 'PrettyRandom' do # Comment this line if you're not using Swift and don't want to use dynamic frameworks use_frameworks! # Pods for PrettyRandom pod 'CocoaLumberjack/Swift' target 'PrettyRandomTests' do inherit! :search_paths # Pods for testing end target 'PrettyRandomUITests' do inherit! :search_paths # Pods for testing end end
  • 21. Carthage in 5 “easy”-ish steps $ brew install carthage $ nano Cartfile $ carthage update —-platform iOS 1 2 3 4 // shouldn’t take long // it’s easier to start a Cartfile from here // install libraries for the type of app you are building for // extremely minimalistic // This is platform dependent // you must manually link your libraries // It has to be done through the XCode UI 4? github "CocoaLumberjack/CocoaLumberjack"
  • 22. Carthage Step 4 (a) … (c) macOS iOS, watchOS, tvOS • On your application targets’ “General” settings tab, in the “Embedded Binaries” section, drag and drop each framework you want to use from the Carthage/Build folder on disk. • On your application target’s “Build Phases” settings tab, click the “+” icon and choose “New Copy Files Phase”. • For each framework you’re using, drag and drop its corresponding dSYM file. • On your application targets’ “General” settings tab, in the “Linked Frameworks and Libraries” section, drag and drop each framework you want to use from the Carthage/Build folder on disk. • On your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase”. Create a Run Script in which you specify your shell (ex: bin/sh), add the following contents to the script area below the shell: • and add the paths to the frameworks you want to use under “Input Files”, e.g.: /usr/local/bin/carthage copy-frameworks $(SRCROOT)/Carthage/Build/iOS/Box.framework $(SRCROOT)/Carthage/Build/iOS/Result.framework $(SRCROOT)/Carthage/Build/iOS/ReactiveCocoa.framework
  • 27. Swift PM in 5 $ swift package init --type executable $ swift package generate-xcodeproj 1 2 3 5 // creates a ‘Package.swift’ with defaults // Assumes you already are at the top level of your project // depending on your internets, this could take a while // add dependencies // generates PrettyRandom.xcodeproj file Install Xcode 8.0 (beta) $ open PrettyRandom.xcodeproj 4 import PackageDescription let package = Package( name: "PrettyRandom", dependencies: [ .Package(url: "https://github.com/thecb4/SwiftyJSON.git", versions: Version(3,0,2)..<Version(3,0,34)), ] ) $ nano Package.swift // open Xcode (beta) and realize nothing works because the library isn’t Swift 3 compatible
  • 28. Swift PM in 5… Nevermind $ swift package init --type executable $ swift package generate-xcodeproj 1 2 3 5 // creates a ‘Package.swift’ with defaults // Assumes you already are at the top level of your project // depending on your internets, this could take a while // add dependencies // generates PrettyRandom.xcodeproj file Install Xcode 8.0 (beta) $ open PrettyRandom.xcodeproj 4 import PackageDescription let package = Package( name: "PrettyRandom", dependencies: [ .Package(url: "https://github.com/thecb4/SwiftyJSON.git", versions: Version(3,0,2)..<Version(3,0,34)), ] ) $ nano Package.swift // open Xcode (beta) and realize nothing works because the library isn’t Swift 3 compatible
  • 30. side by side comparison
  • 31. Written In Ruby Swift Swift Current Version 1.0.1 0.16.2 swiftpm-18 Control File Podfile Cartfile Package.swift Repository Cocoapods Trunk git git Libraries 3000+ 3000+1 ??? Search Index website, command line If it’s on github you can use it1 IBM Catalog Version support Semantic Semantic Semantic Target Support Yes What target? On Roadmap Integration Type Source Source or Binary Source Platform Support macOS, iOS, watchOS, tvOS macOS, iOS, watchOS, tvOS Linux, macOS2, iOS2, watchOS2, tvOS2 Swift Support 2.2.3 2.2.3 3.0 1. The library has to have a Shared Scheme to work 2. If you are building a library you are fine. Anything with a UI is a lot of work
  • 33. Written In Ruby Swift Swift Current Version 1.0.1 0.16.2 swiftpm-18 Control File Podfile Cartfile Package.swift Repository Cocoapods Trunk git git Libraries 3000+ 3000+1 ??? Search Index website, command line If it’s on github you can use it1 IBM Catalog Version support Semantic Semantic Semantic Target Support Yes What target? On Roadmap Integration Type Source Source or Binary Source Platform Support macOS, iOS, watchOS, tvOS macOS, iOS, watchOS, tvOS Linux, macOS2, iOS2, watchOS2, tvOS2 Swift Support 2.2.3 2.2.3 3.0 1. The library has to have a Shared Scheme to work 2. If you are building a library you are fine. Anything with a UI is a lot of work
  • 36. references These slides… http://goo.gl/oJM5Pf Homebrew… http://brew.sh Carthage… https://github.com/Carthage/Carthage Cocoapods… https://cocoapods.org Swift Package Manager… https://swift.org/package-manager Libraries vs. Frameworks… http://www.knowstack.com/framework-vs-library-cocoa-ios/