SlideShare ist ein Scribd-Unternehmen logo
1 von 41
Downloaden Sie, um offline zu lesen
CocoaPods
          More than you need to know.

         @CocoaPods ‱ cocoapods.org ‱ github.com/CocoaPods
                              Eloy Durán ‱ @alloy

I will not be speaking about testing today, but please feel free to ask me anything on the
subject. After the talk, of course ;)

So, CocoaPods, what is it?
What is it?




It’s a... [DRUMROLL] ... dependency manager. Boring, I know :)
CocoaPods is like a combination of the RubyGems and Bundler projects. For those not familiar
with them (which I highly doubt); RubyGems is a Ruby source package manager. It takes care
of fetching and installing a package, _plus_ its dependencies, into a central location on the
system. Bundler uses RubyGems to retrieve packages, but instead installs these locally on a
per-project basis.

In addition, RubyGems provides an ‘ecosystem’ where open-source libraries can more easily
be discovered.

So like I said before, CocoaPods is a combination of these projects. That is, it provides the
tools to manage dependencies on a per-project basis and it provides an ‘ecosystem’ for
open-source libraries to be found and ïŹ‚ourish in the form of a repository of speciïŹcations for
open-source libraries, which are searchable through cocoapods.org or from the command-
line.

The complete ‘CocoaPods’ project encompasses the tools – ‘Xcodeproj’ and ‘CocoaPods’ –
and the library speciïŹcations. These are all written in Ruby. In fact, CocoaPods re-uses some
classes from RubyGems.

So how does working with CocoaPods work?
How is it used in
             Objective-C projects?




The average CocoaPods user will be a Objective-C user, so ïŹrst let me do a quick rundown of
what that looks like.

‘Normal’ usage:
* DRAG THE SOURCES, LUKE!
* Add subproject
* Then apply all the required settings.

Doing it the ‘normal’ way leads to issues with for instance shared dependencies. This will
lead to duplicated symbols, which can be solved manually, but if you’re using for instance
submodules, then you have local changes, so you need a fork, yada yada yada. It’s a pain.

[Show AFNetworking example movie 1]
TODO Add video that
         shows manual process.



Video showing the ‘normal’ way of including third-party code. See https://vimeo.com/
63891717.
Video showing the same process, but handled by CocoaPods. See https://vimeo.com/
63891716.
RubyMotion greatly
  simpliïŹes the build process.




There are no pesky platform or deployment target speciïŹc build settings or any compiler
ïŹ‚ags.

[Show Pods.xcconïŹg in Terminal]
Can’t we just Rubyify
               ALL THE LIBS?!




There are good reasons to use battle-tested objective-c libraries vs creating new ones.

* In general, it’s often a good idea to use a lib that others use as well, because there is more
chance that others will be contributing to make the lib better. And since there are in general
more Objective-C devs than RubyMotion devs (which I totally pull out of thin air, I have no
empirical data to back this up), this makes sense.

But more importantly... [Next slide!]
Too much dependencies
             will kill you.




Some feel that dependency managers are bad for communities/produced products, because
it makes it too easy to fall for ‘widget shopping’.

There are all sorts of philosophical debates we could have about this, but for now let’s keep it
at that it’s the users that need to be responsible, not the tool.

In this context, it is of the utmost importance to remember that deploying updates on iOS
through the AppStore is very expensive. By which I mean, releasing a bug-ïŹx update can
quickly take around a week to be available. Given this, it’s very important to keep being
responsible in mind.
Minimal Dependency Policy.




For instance, at Fingertips we have a ‘minimal dependency policy’. It’s surprisingly easy to
follow; when you work on a new feature and want to add a dependency you ask yourself if
you really need it.

Minimal dependency is not just about the number of libraries you use, but also about the
total amount of code you pull into your project. Less code means less bugs.

Finally, less dependencies makes long-term maintenance easier because there is less that can
go wrong when it’s time to upgrade to a new major iOS version.

So, with that all in mind:
1. Second guess yourself.




Do I really, really need this? Or is my object-oriented-abstract-away-all-the-details mind
playing tricks on me?
1. Second guess yourself.
  2. Will it solve my problem?




Does the library I want to use ïŹt my problem really well or am I better off writing 20 lines of
code myself? For example: pull in AFNetworking or use plain NSURLConnection?
1. Second guess yourself.
  2. Will it solve my problem?
  3. Should I use this library?




Sometimes using another library allows you to drop one you were using for another feature.
For example: use AFNetworking for both networking and JSON serialization/de-serialization
and drop JSONKit. (AFNetworking will use NSJSONSerialization when available.)

[Actually I think they dropped any other support than NSJSONSerialization, but the general
idea still holds.]
1. Second guess yourself.
 2. Will it solve my problem?
 3. Should I use this library?
 4. Check child dependencies
   and weigh it against the
      beneïŹt of using it.


For example: add your own UIAlertView block delegate custom class instead of using
BlocksKit, which pulls in libffi.
Details, details, details

“Bundler has
                 destroyed my life”
                   – Carl Lerche




This quote has been my guide to staying sane. There is only so much that we can, but more
importantly, *want* to do in our spare-time. So we took a conservative naive approach and
followed it religiously.
Git ‘spec repo’ architecture
        versus hosted like
          rubygems.org?




It has allowed us to focus on the important work ïŹrst, which is obviously the actual
dependency resolving and installation, instead of having to ïŹrst create a speciïŹcation server
as well.

The thing is, we take a very agile approach to this whole thing, meaning that until CP 1.0, we
reserve the right to add/update/remove any of the spec DSL at will. (We do generally
deprecate, but we won’t allow ourselves to be restricted by this.) So given this, it would have
been very hard to keep the specs themselves up-to-date and the server features might
inïŹ‚uence the design process in a limiting fashion.

We don’t want that, so we ‘keep it simple, silly’.
Using the ïŹlesystem as the ‘database’ and distributing it through Git has proven to be an
extremely ïŹ‚exible way to deal with these types of spec changes.

That is, when we add, remove, or update an attribute, we can very easily go back and update
all of the speciïŹcations or even merge those changes back into to the ‘master’ branch only
once a new version is released.

Finally, in order to push adoption, it is **very** important to recognize that Objective-C has
been used in commercial settings for a very long time already. Companies already tend to
have _private_ internal frameworks and not catering to those would make it hard for them to
adopt CocoaPods for all of their open-source needs and in turn wouldn’t push them to open-
source more of their internal code. With CocoaPods, these companies only need to add an
extra Git repository in `~/.cocoapods/` that contains speciïŹcations for their _private_
frameworks and **BOOM**, they’re in business.
The future is out there.
Centralized speciïŹcation
          authority service




This is primarily meant to have access-control. This will work exactly the same as RubyGems
currently does: ïŹrst pusher is owner and owners can add other owners.

This has a very high priority, because the number of spec contributors has grown too large to
rely purely on a trust based system. For instance, not too long ago, someone pushed a spec
for AFNetworking for an non-existing version, this is obviously NOT cool when the author of
the lib actually maintains the lib specs.

The way it will work is roughly like follows:
* Person creates spec and lints it locally.
* CP creates a serialized version of the spec (YAML/JSON) and posts it together with the
actual spec to the ‘push’ service.
* The ‘push’ service checks if a previous version of the lib has been pushed and if so checks
wether the person is authorized to push a new version.
* The ‘push’ service creates a pull-request on the spec repo, which in turn notiïŹes Travis to
perform a full-lint. (Yes, Travis has mac workers in beta.) Once Travis notiïŹes the ‘push’
service that the spec has passed, it will automatically merge the pull-request.
* If for some reason the build doesn’t ïŹnish (e.g. network outage), we can easily trigger a new
build or even perform the lint checks ourselves.

This process means we can add a control layer, while still keeping the ïŹ‚exibility of dealing
with the specs through Git and GitHub.
Download count
                      web-application




Something that has been asked for by the community on many occasions, is stats on things
like download-count of libs.

Since in our architecture we don’t actually serve any packages, we aren’t able to count
downloads this way. Together with Mattt (of Heroku), we’ve been thinking about this and
concluded that the best way to go about it is to, again, be naive. The app will have a ‘counter’
endpoint, to which CP will post the libraries that it has downloaded during installation.

One problem with this was that we don’t want to count libs that we don’t actually host
through the ‘master’ spec repo (e.g. private libs), but with the ‘push’ service on the horizon
this will no longer be an issue, as we already have a DB in the cloud that contains a list of all
the libs it knows of.

In short, sometime in the near future, our website will not only provide info on the available
libs, but also how many times they have been downloaded.

Now to be clear, this stat is only really meant for the owners. For end-users this metric is nice
to have, but it doesn’t say anything about the quality of a lib.

Moreover, since we count by accepting count POSTs, we will not show overall ranks, because
we do not want people to try and game the system.
CocoaDocs.org




CocoaDocs is a side project created by one of our spec maintainers, namely Orta Therox.

If you’re familiar to rubydoc.info, this is essentially the same kind of service. So everytime a
new spec is pushed to the spec repo, this application receives a notiïŹcation and will build
documentation for the lib by using the appledoc tool.

It’s still very much in development and currently only has docs for the most recent libs. Then
again, this is not yet officially released, but it’s a great example of how we can help the
community, even if they wouldn’t use CocoaPods.

Actually, he at some point generated docs for ALL OF THE LIBRARIES an it works, but
obviously this takes at least a whole night, so it’s not very helpful while he’s still working on
it.
Magic is hard work.
1. Resolve dependencies




Find child dependencies and fail in case of a conïŹ‚ict.

CocoaPods does do dependency resolution, but it does not automatically resolve conïŹ‚icts.
This means that, when a conïŹ‚ict occurs, CocoaPods will raise an error and leave conïŹ‚ict
resolving up to the user. (The user can do this by depending on a speciïŹc version of a
common dependency before requiring the dependencies that lead to the conïŹ‚ict.)

If you’re familiar with Ruby then you can compare the former (the current CocoaPods style) to
RubyGems’ style resolution and the latter (with conïŹ‚ict resolving) to Bundler’s.

Adding conïŹ‚ict resolution to CocoaPods is on our TODO list and we will try to work with the
Bundler team to see if we can share their algorithm, but this will be one of the last things
we’ll work on. A feature like this will require a stable basis and since we’re not there yet,
working on it now would only make working on the basis more complex than necessary.
1. Resolve dependencies
       2. Fetch library sources




From git/svn/mercurial, http tarballs/zipballs, or a local development repo.
1. Resolve dependencies
        2. Fetch library sources
        3. Collect build-settings




Per Pods target.
1. Resolve dependencies
       2. Fetch library sources
       3. Collect build-settings
       4. Create Xcode project




Ah yes, the Xcode document format.
1. Resolve dependencies
     2. Fetch library sources
     3. Collect build-settings
     4. Create Xcode project
    5. User project integration



Ah yes, the Xcode document format, again.
1. Resolve dependencies
    2. Fetch library sources
     3. Collect build-settings
     4. Create Xcode project
   5. User project integration
   6. Create API documention


Like RubyGems does, we generate API documentation for each library by using the appledoc
tool and we install that into the Xcode documentation viewer. (This also works with Dash.app
in case you do not love Xcode, for some reason
)

[SHOW example of AFNetworking docs in Xcode]

The appledoc tool is unfortunately not complete yet and misses some information like
constants, but hopefully work on CocoaDocs.org will eventually lead to completing appledoc
coverage.
Available Libraries

      1250


      1000


       750


       500


       250


         0
        Sep 2011 Nov Jan 2012 Mar       May     Jul    Sep    Nov Jan 2013 Mar




You can deïŹnitely see that people have better things to do in the summer than creating
specs. (June/July)
CocoaPods Downloads Over All Minor Versions

    105000



     78750



     52500



     26250



          0
               .0   .1   .2   .3   .4   .5   .6   .7   .8   .9 .10 .11 .12 .13 .14 .15 .16




The only version range that had 0 downloads was 0.4.x, because I accidentally skipped it :)
It needs a lot more attention.
Improve command-line
          interface experience.




With objc projects, people run `pod install` only when they need it. RubyMotion’s build
process runs every time a build has to be made, so it needs better heuristics on when to do
any work at all. As CocoaPods becomes smarter itself, this becomes less of an issue during
normal usage, but things like updating the spec repos when there is no internet connection
available should be avoided.

Actually, we have improved this a lot in the upcoming 0.17 version and it should already be a
lot nicer. But there is probably still room for improvement.
Support multiple targets.




In objc projects it is quite common to build multiple ‘targets’, e.g. apps, from one project.
RubyMotion does this too, but is normally limited to an ‘app’ target and a ‘test’ target.
Currently the CocoaPods integration is limited to just the ‘app’ target, though. While I think it
might be uncessary to open up full multiple target support, there should be standard support
for including dependencies speciïŹc to the RubyMotion test target.
Support different
                    conïŹgurations.




E.g. within one target, conïŹgure dependencies differently based on debug / release / deploy.

This is still lacking form CocoaPods itself and should really be ïŹxed there. Having said that, I
can imagine that with RubyMotion’s build system and handling of conïŹgurations it might be
very simple to already implement this in motion-cocoapods.
Translate API
                  documentation for
                     RubyMotion




As we saw before, CocoaPods already generates API docs for each library, however, these are
of course all in Objective-C. What would be great is to integrate the RubyMotion doc tool to
translate these generated docs for RubyMotion.

[Where does the tool actually live? Is it on GitHub?]
We Need You




github.com/HipByte/motion-cocoapods
63 contributors to the CocoaPods tool repo and 100 contributors on the specs repo.

For all of these people, and companies that have sponsored work on CocoaPods or provide
services, I’d like a big applause, for this would never have been possible without all of their
love and care.

[MAKE HEART LOVE SIGN]

Oh, and one more thing

One More Thing
Version 0.17 NOW!




    $ gem install cocoapods
$ gem install motion-cocoapods
@CocoaPods
    cocoapods.org
github.com/CocoaPods

      @alloy
   @fabiopelosin
   @SmileyKeith
      @orta

Weitere Àhnliche Inhalte

Was ist angesagt?

Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins
Fabric8: Better Software Faster with Docker, Kubernetes, JenkinsFabric8: Better Software Faster with Docker, Kubernetes, Jenkins
Fabric8: Better Software Faster with Docker, Kubernetes, JenkinsBurr Sutter
 
Implementing your own Google App Engine
Implementing your own Google App Engine Implementing your own Google App Engine
Implementing your own Google App Engine Virtual JBoss User Group
 
Shipping NodeJS with Docker and CoreOS
Shipping NodeJS with Docker and CoreOSShipping NodeJS with Docker and CoreOS
Shipping NodeJS with Docker and CoreOSRoss Kukulinski
 
DockerCon SF 2015: Docker in the New York Times Newsroom
DockerCon SF 2015: Docker in the New York Times NewsroomDockerCon SF 2015: Docker in the New York Times Newsroom
DockerCon SF 2015: Docker in the New York Times NewsroomDocker, Inc.
 
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Andrew Bayer
 
Jenkins Overview
Jenkins OverviewJenkins Overview
Jenkins OverviewAhmed M. Gomaa
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsMichael Lihs
 
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
Introduction to GitHub Actions - How to easily automate and integrate with Gi...Introduction to GitHub Actions - How to easily automate and integrate with Gi...
Introduction to GitHub Actions - How to easily automate and integrate with Gi...All Things Open
 
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 .Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 Tikal Knowledge
 
Brujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalabilityBrujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalabilityDamien Coraboeuf
 
Cross-platform Mobile Development on Open Source
Cross-platform Mobile Development on Open SourceCross-platform Mobile Development on Open Source
Cross-platform Mobile Development on Open SourceAll Things Open
 
Monitoring Akka with Kamon 1.0
Monitoring Akka with Kamon 1.0Monitoring Akka with Kamon 1.0
Monitoring Akka with Kamon 1.0Steffen Gebert
 
Automate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & ChefAutomate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & Chef Michael Lihs
 
Continuous Updating with VersionEye at code.talks 2014
Continuous Updating with VersionEye at code.talks 2014Continuous Updating with VersionEye at code.talks 2014
Continuous Updating with VersionEye at code.talks 2014Robert Reiz
 
Jenkins CI presentation
Jenkins CI presentationJenkins CI presentation
Jenkins CI presentationJonathan Holloway
 
Testing with Docker
Testing with DockerTesting with Docker
Testing with Dockertoffermann
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners HubSpot
 
Jenkins Pipeline 101 and TCI - presentation and workshop
Jenkins Pipeline 101 and TCI - presentation and workshopJenkins Pipeline 101 and TCI - presentation and workshop
Jenkins Pipeline 101 and TCI - presentation and workshopYoram Michaeli
 

Was ist angesagt? (20)

Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins
Fabric8: Better Software Faster with Docker, Kubernetes, JenkinsFabric8: Better Software Faster with Docker, Kubernetes, Jenkins
Fabric8: Better Software Faster with Docker, Kubernetes, Jenkins
 
Implementing your own Google App Engine
Implementing your own Google App Engine Implementing your own Google App Engine
Implementing your own Google App Engine
 
Shipping NodeJS with Docker and CoreOS
Shipping NodeJS with Docker and CoreOSShipping NodeJS with Docker and CoreOS
Shipping NodeJS with Docker and CoreOS
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
DockerCon SF 2015: Docker in the New York Times Newsroom
DockerCon SF 2015: Docker in the New York Times NewsroomDockerCon SF 2015: Docker in the New York Times Newsroom
DockerCon SF 2015: Docker in the New York Times Newsroom
 
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)Seven Habits of Highly Effective Jenkins Users (2014 edition!)
Seven Habits of Highly Effective Jenkins Users (2014 edition!)
 
Jenkins Overview
Jenkins OverviewJenkins Overview
Jenkins Overview
 
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source ToolsTYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
TYPO3 Camp Stuttgart 2015 - Continuous Delivery with Open Source Tools
 
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
Introduction to GitHub Actions - How to easily automate and integrate with Gi...Introduction to GitHub Actions - How to easily automate and integrate with Gi...
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
 
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013 .Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
.Net OSS Ci & CD with Jenkins - JUC ISRAEL 2013
 
Brujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalabilityBrujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalability
 
Cross-platform Mobile Development on Open Source
Cross-platform Mobile Development on Open SourceCross-platform Mobile Development on Open Source
Cross-platform Mobile Development on Open Source
 
Monitoring Akka with Kamon 1.0
Monitoring Akka with Kamon 1.0Monitoring Akka with Kamon 1.0
Monitoring Akka with Kamon 1.0
 
Automate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & ChefAutomate your Development Environment with Vagrant & Chef
Automate your Development Environment with Vagrant & Chef
 
Continuous Updating with VersionEye at code.talks 2014
Continuous Updating with VersionEye at code.talks 2014Continuous Updating with VersionEye at code.talks 2014
Continuous Updating with VersionEye at code.talks 2014
 
Docker
DockerDocker
Docker
 
Jenkins CI presentation
Jenkins CI presentationJenkins CI presentation
Jenkins CI presentation
 
Testing with Docker
Testing with DockerTesting with Docker
Testing with Docker
 
Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners Git 101: Git and GitHub for Beginners
Git 101: Git and GitHub for Beginners
 
Jenkins Pipeline 101 and TCI - presentation and workshop
Jenkins Pipeline 101 and TCI - presentation and workshopJenkins Pipeline 101 and TCI - presentation and workshop
Jenkins Pipeline 101 and TCI - presentation and workshop
 

Ähnlich wie RubyMotion Inspect Conference - 2013. (With speaker notes.)

Bugs Found by LibreOffice in PVS-Studio
Bugs Found by LibreOffice in PVS-StudioBugs Found by LibreOffice in PVS-Studio
Bugs Found by LibreOffice in PVS-StudioPVS-Studio
 
AliExpress’ Way to Microservices - microXchg 2017
AliExpress’ Way to Microservices  - microXchg 2017AliExpress’ Way to Microservices  - microXchg 2017
AliExpress’ Way to Microservices - microXchg 2017juvenxu
 
RubyMotion Inspect Conference - 2013. (Without speaker notes.)
RubyMotion Inspect Conference - 2013. (Without speaker notes.)RubyMotion Inspect Conference - 2013. (Without speaker notes.)
RubyMotion Inspect Conference - 2013. (Without speaker notes.)alloy020
 
Learn reactjs, how to code with example and general understanding thinkwik
Learn reactjs, how to code with example and general understanding   thinkwikLearn reactjs, how to code with example and general understanding   thinkwik
Learn reactjs, how to code with example and general understanding thinkwikHetaxi patel
 
Creating and Maintaining an Open Source Library
Creating and Maintaining an Open Source LibraryCreating and Maintaining an Open Source Library
Creating and Maintaining an Open Source LibraryNicholas Schweitzer
 
Workshop - The Little Pattern That Could.pdf
Workshop - The Little Pattern That Could.pdfWorkshop - The Little Pattern That Could.pdf
Workshop - The Little Pattern That Could.pdfTobiasGoeschel
 
Inside GitHub
Inside GitHubInside GitHub
Inside GitHuberr
 
System design for Web Application
System design for Web ApplicationSystem design for Web Application
System design for Web ApplicationMichael Choi
 
Introduction to Docker and Containers- Learning Simple
Introduction to Docker and Containers- Learning SimpleIntroduction to Docker and Containers- Learning Simple
Introduction to Docker and Containers- Learning SimpleSandeep Hijam
 
Developing iOS apps on your iPad with XCAB
Developing iOS apps on your iPad with XCABDeveloping iOS apps on your iPad with XCAB
Developing iOS apps on your iPad with XCABCarl Brown
 
What would your own version of Ruby look like?
What would your own version of Ruby look like?What would your own version of Ruby look like?
What would your own version of Ruby look like?Hung Wu Lo
 
Multi-threaded web crawler in Ruby
Multi-threaded web crawler in RubyMulti-threaded web crawler in Ruby
Multi-threaded web crawler in RubyPolcode
 
Built to Scale: The Mozilla Release Engineering toolbox
Built to Scale: The Mozilla Release Engineering toolboxBuilt to Scale: The Mozilla Release Engineering toolbox
Built to Scale: The Mozilla Release Engineering toolboxKim Moir
 
Spring, Functions, Serverless and You
Spring, Functions, Serverless and YouSpring, Functions, Serverless and You
Spring, Functions, Serverless and YouVMware Tanzu
 
Frame or not to Frame
Frame or not to FrameFrame or not to Frame
Frame or not to FrameAvinash Ketkar
 
Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01Rafael Camacho Dejay
 
Inside GitHub with Chris Wanstrath
Inside GitHub with Chris WanstrathInside GitHub with Chris Wanstrath
Inside GitHub with Chris WanstrathSV Ruby on Rails Meetup
 

Ähnlich wie RubyMotion Inspect Conference - 2013. (With speaker notes.) (20)

Bugs Found by LibreOffice in PVS-Studio
Bugs Found by LibreOffice in PVS-StudioBugs Found by LibreOffice in PVS-Studio
Bugs Found by LibreOffice in PVS-Studio
 
AliExpress’ Way to Microservices - microXchg 2017
AliExpress’ Way to Microservices  - microXchg 2017AliExpress’ Way to Microservices  - microXchg 2017
AliExpress’ Way to Microservices - microXchg 2017
 
DevOps Workshop Part 1
DevOps Workshop Part 1DevOps Workshop Part 1
DevOps Workshop Part 1
 
RubyMotion Inspect Conference - 2013. (Without speaker notes.)
RubyMotion Inspect Conference - 2013. (Without speaker notes.)RubyMotion Inspect Conference - 2013. (Without speaker notes.)
RubyMotion Inspect Conference - 2013. (Without speaker notes.)
 
Learn reactjs, how to code with example and general understanding thinkwik
Learn reactjs, how to code with example and general understanding   thinkwikLearn reactjs, how to code with example and general understanding   thinkwik
Learn reactjs, how to code with example and general understanding thinkwik
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Creating and Maintaining an Open Source Library
Creating and Maintaining an Open Source LibraryCreating and Maintaining an Open Source Library
Creating and Maintaining an Open Source Library
 
Workshop - The Little Pattern That Could.pdf
Workshop - The Little Pattern That Could.pdfWorkshop - The Little Pattern That Could.pdf
Workshop - The Little Pattern That Could.pdf
 
Inside GitHub
Inside GitHubInside GitHub
Inside GitHub
 
System design for Web Application
System design for Web ApplicationSystem design for Web Application
System design for Web Application
 
Introduction to Docker and Containers- Learning Simple
Introduction to Docker and Containers- Learning SimpleIntroduction to Docker and Containers- Learning Simple
Introduction to Docker and Containers- Learning Simple
 
Developing iOS apps on your iPad with XCAB
Developing iOS apps on your iPad with XCABDeveloping iOS apps on your iPad with XCAB
Developing iOS apps on your iPad with XCAB
 
What would your own version of Ruby look like?
What would your own version of Ruby look like?What would your own version of Ruby look like?
What would your own version of Ruby look like?
 
Multi-threaded web crawler in Ruby
Multi-threaded web crawler in RubyMulti-threaded web crawler in Ruby
Multi-threaded web crawler in Ruby
 
Built to Scale: The Mozilla Release Engineering toolbox
Built to Scale: The Mozilla Release Engineering toolboxBuilt to Scale: The Mozilla Release Engineering toolbox
Built to Scale: The Mozilla Release Engineering toolbox
 
Spring, Functions, Serverless and You
Spring, Functions, Serverless and YouSpring, Functions, Serverless and You
Spring, Functions, Serverless and You
 
Frame or not to Frame
Frame or not to FrameFrame or not to Frame
Frame or not to Frame
 
Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01Programming Sessions KU Leuven - Session 01
Programming Sessions KU Leuven - Session 01
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
Inside GitHub with Chris Wanstrath
Inside GitHub with Chris WanstrathInside GitHub with Chris Wanstrath
Inside GitHub with Chris Wanstrath
 

KĂŒrzlich hochgeladen

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

KĂŒrzlich hochgeladen (20)

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

RubyMotion Inspect Conference - 2013. (With speaker notes.)

  • 1. CocoaPods More than you need to know. @CocoaPods ‱ cocoapods.org ‱ github.com/CocoaPods Eloy DurĂĄn ‱ @alloy I will not be speaking about testing today, but please feel free to ask me anything on the subject. After the talk, of course ;) So, CocoaPods, what is it?
  • 2. What is it? It’s a... [DRUMROLL] ... dependency manager. Boring, I know :)
  • 3. CocoaPods is like a combination of the RubyGems and Bundler projects. For those not familiar with them (which I highly doubt); RubyGems is a Ruby source package manager. It takes care of fetching and installing a package, _plus_ its dependencies, into a central location on the system. Bundler uses RubyGems to retrieve packages, but instead installs these locally on a per-project basis. In addition, RubyGems provides an ‘ecosystem’ where open-source libraries can more easily be discovered. So like I said before, CocoaPods is a combination of these projects. That is, it provides the tools to manage dependencies on a per-project basis and it provides an ‘ecosystem’ for open-source libraries to be found and ïŹ‚ourish in the form of a repository of speciïŹcations for open-source libraries, which are searchable through cocoapods.org or from the command- line. The complete ‘CocoaPods’ project encompasses the tools – ‘Xcodeproj’ and ‘CocoaPods’ – and the library speciïŹcations. These are all written in Ruby. In fact, CocoaPods re-uses some classes from RubyGems. So how does working with CocoaPods work?
  • 4. How is it used in Objective-C projects? The average CocoaPods user will be a Objective-C user, so ïŹrst let me do a quick rundown of what that looks like. ‘Normal’ usage: * DRAG THE SOURCES, LUKE! * Add subproject * Then apply all the required settings. Doing it the ‘normal’ way leads to issues with for instance shared dependencies. This will lead to duplicated symbols, which can be solved manually, but if you’re using for instance submodules, then you have local changes, so you need a fork, yada yada yada. It’s a pain. [Show AFNetworking example movie 1]
  • 5. TODO Add video that shows manual process. Video showing the ‘normal’ way of including third-party code. See https://vimeo.com/ 63891717.
  • 6. Video showing the same process, but handled by CocoaPods. See https://vimeo.com/ 63891716.
  • 7. RubyMotion greatly simpliïŹes the build process. There are no pesky platform or deployment target speciïŹc build settings or any compiler ïŹ‚ags. [Show Pods.xcconïŹg in Terminal]
  • 8. Can’t we just Rubyify ALL THE LIBS?! There are good reasons to use battle-tested objective-c libraries vs creating new ones. * In general, it’s often a good idea to use a lib that others use as well, because there is more chance that others will be contributing to make the lib better. And since there are in general more Objective-C devs than RubyMotion devs (which I totally pull out of thin air, I have no empirical data to back this up), this makes sense. But more importantly... [Next slide!]
  • 9. Too much dependencies will kill you. Some feel that dependency managers are bad for communities/produced products, because it makes it too easy to fall for ‘widget shopping’. There are all sorts of philosophical debates we could have about this, but for now let’s keep it at that it’s the users that need to be responsible, not the tool. In this context, it is of the utmost importance to remember that deploying updates on iOS through the AppStore is very expensive. By which I mean, releasing a bug-ïŹx update can quickly take around a week to be available. Given this, it’s very important to keep being responsible in mind.
  • 10. Minimal Dependency Policy. For instance, at Fingertips we have a ‘minimal dependency policy’. It’s surprisingly easy to follow; when you work on a new feature and want to add a dependency you ask yourself if you really need it. Minimal dependency is not just about the number of libraries you use, but also about the total amount of code you pull into your project. Less code means less bugs. Finally, less dependencies makes long-term maintenance easier because there is less that can go wrong when it’s time to upgrade to a new major iOS version. So, with that all in mind:
  • 11. 1. Second guess yourself. Do I really, really need this? Or is my object-oriented-abstract-away-all-the-details mind playing tricks on me?
  • 12. 1. Second guess yourself. 2. Will it solve my problem? Does the library I want to use ïŹt my problem really well or am I better off writing 20 lines of code myself? For example: pull in AFNetworking or use plain NSURLConnection?
  • 13. 1. Second guess yourself. 2. Will it solve my problem? 3. Should I use this library? Sometimes using another library allows you to drop one you were using for another feature. For example: use AFNetworking for both networking and JSON serialization/de-serialization and drop JSONKit. (AFNetworking will use NSJSONSerialization when available.) [Actually I think they dropped any other support than NSJSONSerialization, but the general idea still holds.]
  • 14. 1. Second guess yourself. 2. Will it solve my problem? 3. Should I use this library? 4. Check child dependencies and weigh it against the beneïŹt of using it. For example: add your own UIAlertView block delegate custom class instead of using BlocksKit, which pulls in libffi.
  • 16. “Bundler has destroyed my life” – Carl Lerche This quote has been my guide to staying sane. There is only so much that we can, but more importantly, *want* to do in our spare-time. So we took a conservative naive approach and followed it religiously.
  • 17. Git ‘spec repo’ architecture versus hosted like rubygems.org? It has allowed us to focus on the important work ïŹrst, which is obviously the actual dependency resolving and installation, instead of having to ïŹrst create a speciïŹcation server as well. The thing is, we take a very agile approach to this whole thing, meaning that until CP 1.0, we reserve the right to add/update/remove any of the spec DSL at will. (We do generally deprecate, but we won’t allow ourselves to be restricted by this.) So given this, it would have been very hard to keep the specs themselves up-to-date and the server features might inïŹ‚uence the design process in a limiting fashion. We don’t want that, so we ‘keep it simple, silly’.
  • 18. Using the ïŹlesystem as the ‘database’ and distributing it through Git has proven to be an extremely ïŹ‚exible way to deal with these types of spec changes. That is, when we add, remove, or update an attribute, we can very easily go back and update all of the speciïŹcations or even merge those changes back into to the ‘master’ branch only once a new version is released. Finally, in order to push adoption, it is **very** important to recognize that Objective-C has been used in commercial settings for a very long time already. Companies already tend to have _private_ internal frameworks and not catering to those would make it hard for them to adopt CocoaPods for all of their open-source needs and in turn wouldn’t push them to open- source more of their internal code. With CocoaPods, these companies only need to add an extra Git repository in `~/.cocoapods/` that contains speciïŹcations for their _private_ frameworks and **BOOM**, they’re in business.
  • 19. The future is out there.
  • 20. Centralized speciïŹcation authority service This is primarily meant to have access-control. This will work exactly the same as RubyGems currently does: ïŹrst pusher is owner and owners can add other owners. This has a very high priority, because the number of spec contributors has grown too large to rely purely on a trust based system. For instance, not too long ago, someone pushed a spec for AFNetworking for an non-existing version, this is obviously NOT cool when the author of the lib actually maintains the lib specs. The way it will work is roughly like follows: * Person creates spec and lints it locally. * CP creates a serialized version of the spec (YAML/JSON) and posts it together with the actual spec to the ‘push’ service. * The ‘push’ service checks if a previous version of the lib has been pushed and if so checks wether the person is authorized to push a new version. * The ‘push’ service creates a pull-request on the spec repo, which in turn notiïŹes Travis to perform a full-lint. (Yes, Travis has mac workers in beta.) Once Travis notiïŹes the ‘push’ service that the spec has passed, it will automatically merge the pull-request. * If for some reason the build doesn’t ïŹnish (e.g. network outage), we can easily trigger a new build or even perform the lint checks ourselves. This process means we can add a control layer, while still keeping the ïŹ‚exibility of dealing with the specs through Git and GitHub.
  • 21. Download count web-application Something that has been asked for by the community on many occasions, is stats on things like download-count of libs. Since in our architecture we don’t actually serve any packages, we aren’t able to count downloads this way. Together with Mattt (of Heroku), we’ve been thinking about this and concluded that the best way to go about it is to, again, be naive. The app will have a ‘counter’ endpoint, to which CP will post the libraries that it has downloaded during installation. One problem with this was that we don’t want to count libs that we don’t actually host through the ‘master’ spec repo (e.g. private libs), but with the ‘push’ service on the horizon this will no longer be an issue, as we already have a DB in the cloud that contains a list of all the libs it knows of. In short, sometime in the near future, our website will not only provide info on the available libs, but also how many times they have been downloaded. Now to be clear, this stat is only really meant for the owners. For end-users this metric is nice to have, but it doesn’t say anything about the quality of a lib. Moreover, since we count by accepting count POSTs, we will not show overall ranks, because we do not want people to try and game the system.
  • 22. CocoaDocs.org CocoaDocs is a side project created by one of our spec maintainers, namely Orta Therox. If you’re familiar to rubydoc.info, this is essentially the same kind of service. So everytime a new spec is pushed to the spec repo, this application receives a notiïŹcation and will build documentation for the lib by using the appledoc tool. It’s still very much in development and currently only has docs for the most recent libs. Then again, this is not yet officially released, but it’s a great example of how we can help the community, even if they wouldn’t use CocoaPods. Actually, he at some point generated docs for ALL OF THE LIBRARIES an it works, but obviously this takes at least a whole night, so it’s not very helpful while he’s still working on it.
  • 23. Magic is hard work.
  • 24. 1. Resolve dependencies Find child dependencies and fail in case of a conïŹ‚ict. CocoaPods does do dependency resolution, but it does not automatically resolve conïŹ‚icts. This means that, when a conïŹ‚ict occurs, CocoaPods will raise an error and leave conïŹ‚ict resolving up to the user. (The user can do this by depending on a speciïŹc version of a common dependency before requiring the dependencies that lead to the conïŹ‚ict.) If you’re familiar with Ruby then you can compare the former (the current CocoaPods style) to RubyGems’ style resolution and the latter (with conïŹ‚ict resolving) to Bundler’s. Adding conïŹ‚ict resolution to CocoaPods is on our TODO list and we will try to work with the Bundler team to see if we can share their algorithm, but this will be one of the last things we’ll work on. A feature like this will require a stable basis and since we’re not there yet, working on it now would only make working on the basis more complex than necessary.
  • 25. 1. Resolve dependencies 2. Fetch library sources From git/svn/mercurial, http tarballs/zipballs, or a local development repo.
  • 26. 1. Resolve dependencies 2. Fetch library sources 3. Collect build-settings Per Pods target.
  • 27. 1. Resolve dependencies 2. Fetch library sources 3. Collect build-settings 4. Create Xcode project Ah yes, the Xcode document format.
  • 28. 1. Resolve dependencies 2. Fetch library sources 3. Collect build-settings 4. Create Xcode project 5. User project integration Ah yes, the Xcode document format, again.
  • 29. 1. Resolve dependencies 2. Fetch library sources 3. Collect build-settings 4. Create Xcode project 5. User project integration 6. Create API documention Like RubyGems does, we generate API documentation for each library by using the appledoc tool and we install that into the Xcode documentation viewer. (This also works with Dash.app in case you do not love Xcode, for some reason
) [SHOW example of AFNetworking docs in Xcode] The appledoc tool is unfortunately not complete yet and misses some information like constants, but hopefully work on CocoaDocs.org will eventually lead to completing appledoc coverage.
  • 30. Available Libraries 1250 1000 750 500 250 0 Sep 2011 Nov Jan 2012 Mar May Jul Sep Nov Jan 2013 Mar You can deïŹnitely see that people have better things to do in the summer than creating specs. (June/July)
  • 31. CocoaPods Downloads Over All Minor Versions 105000 78750 52500 26250 0 .0 .1 .2 .3 .4 .5 .6 .7 .8 .9 .10 .11 .12 .13 .14 .15 .16 The only version range that had 0 downloads was 0.4.x, because I accidentally skipped it :)
  • 32. It needs a lot more attention.
  • 33. Improve command-line interface experience. With objc projects, people run `pod install` only when they need it. RubyMotion’s build process runs every time a build has to be made, so it needs better heuristics on when to do any work at all. As CocoaPods becomes smarter itself, this becomes less of an issue during normal usage, but things like updating the spec repos when there is no internet connection available should be avoided. Actually, we have improved this a lot in the upcoming 0.17 version and it should already be a lot nicer. But there is probably still room for improvement.
  • 34. Support multiple targets. In objc projects it is quite common to build multiple ‘targets’, e.g. apps, from one project. RubyMotion does this too, but is normally limited to an ‘app’ target and a ‘test’ target. Currently the CocoaPods integration is limited to just the ‘app’ target, though. While I think it might be uncessary to open up full multiple target support, there should be standard support for including dependencies speciïŹc to the RubyMotion test target.
  • 35. Support different conïŹgurations. E.g. within one target, conïŹgure dependencies differently based on debug / release / deploy. This is still lacking form CocoaPods itself and should really be ïŹxed there. Having said that, I can imagine that with RubyMotion’s build system and handling of conïŹgurations it might be very simple to already implement this in motion-cocoapods.
  • 36. Translate API documentation for RubyMotion As we saw before, CocoaPods already generates API docs for each library, however, these are of course all in Objective-C. What would be great is to integrate the RubyMotion doc tool to translate these generated docs for RubyMotion. [Where does the tool actually live? Is it on GitHub?]
  • 38. 63 contributors to the CocoaPods tool repo and 100 contributors on the specs repo. For all of these people, and companies that have sponsored work on CocoaPods or provide services, I’d like a big applause, for this would never have been possible without all of their love and care. [MAKE HEART LOVE SIGN] Oh, and one more thing

  • 40. Version 0.17 NOW! $ gem install cocoapods $ gem install motion-cocoapods
  • 41. @CocoaPods cocoapods.org github.com/CocoaPods @alloy @fabiopelosin @SmileyKeith @orta