Getting Started with Submodules as Development Pods

Instructions for setting up VimeoNetworking and VimeoUpload in your Xcode project.


  • For these instructions we’ll call our project “SampleApp.”
  • From Terminal navigate to your app’s root directory. If it’s on the Desktop, cd ~/Desktop/SampleApp
  • We’ll be using a Git feature called Submodules. If your project is already using Git you can skip this step. If your project hasn’t been set up as a Git repository, be sure to run git init in Terminal from within your SampleApp directory to get started. You should see output that looks like the following: Initialized empty Git repository in /path/to/your/SampleApp/.git/
  • We’re going to create a new directory for our submodules called “Submodules,” then navigate to it.
  • mkdir Submodules
  • cd Submodules
  • Now we’ll add VimeoNetworking and VimeoUpload as submodules.
  • git submodule add git@github.com:vimeo/VimeoNetworking.git
  • git submodule add git@github.com:vimeo/VimeoUpload.git
  • The submodules must be initialized before we can use them. 
  • Back out to the root directory of your project, cd ..
  • Run git submodule update --init --recursive
  • Make sure you have CocoaPods installed. Run pod --version. Version 1.1.1 or better should be fine. If you don’t have CocoaPods installed run sudo gem install CocoaPods and follow the instructions.
  • Open your favorite text editor and create a new document called “Podfile” without an extension on the end. You’ll save this file in the root of your project. In this example, that’s the “SampleApp” directory. Afterward your directory should look like this:
  • The contents of the Podfile should look like this:
use_frameworks!

# Inhibits warnings on all pods.
inhibit_all_warnings!

def shared_pods
    pod 'VimeoNetworking', :path => './Submodules/VimeoNetworking'
    pod 'VimeoUpload', :path => './Submodules/VimeoUpload'
end

target 'SampleApp' do
    shared_pods
end


  • From the same root directory run pod install in Terminal.
  • When you’re done you’ll be instructed to close your project and open the new workspace. Your root directory should now look like this:
  • Open your .xcworkspace file from now on. Your workspace should look something like this, with a Pods project and VimeoNetworking and VimeoUpload appearing under Development Pods:
  • Build & run your app. 
  • Your app should run successfully.
  • You should not see any new warnings from the frameworks.