Skip to content

ryanolson/venmo-ios-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Venmo iOS SDK

This open-source Cocoa Touch Static Library allows users of your app to pay with Venmo.

Project Setup

Add Venmo as a Git submodule to the Libraries directory.

This will help you pull in updates and make contributions.

cd ~/Projects/DrinksOnMe/ # sample project root directory

# Let's make a new directory called Libraries for third-party code.
git submodule add https://github.com/venmo/venmo-ios-sdk.git Libraries/Venmo
git submodule update --init
git commit -am 'Add Venmo as a submodule.'

Add Venmo to Your Xcode Project.

Add the Libraries group to your Project.

In Xcode, select your project at the top of the Project Navigator (⌘1), and press ⌥⌘N to create a new group. Name it, e.g., "Libraries." Then, select the Libraries group, press ⌥⌘0 to Show Utilities, click the small icon to the right just below Path, choose the Libraries directory. Drag the Libraries group to move it before the Frameworks group.

Add Venmo.xcodeproj inside the Libraries group.

With the Libraries group selected, press ⌥⌘A to add files, select Venmo.xcodeproj in Libraries/Venmo, and confirm that "Copy items into destination group's folder (if needed)" is unchecked, "Create groups for any added folders" is selected, and all targets are unchecked. Then, click Add.

In Terminal, review and commit your changes:

git diff -w -M --color-words HEAD
git commit -am 'Add Libraries group. Put Venmo.xcodeproj inside.'

Edit Your Application Project Settings.

In Xcode, select your main Xcode project at the top of the Project Navigator (⌘1), and then, select the project (or target) to which you want to add Venmo. (To allow all your targets, e.g., your tests target (along with your application target), to import Venmo, apply these settings at the project level.)

Select the "Build Phases" tab.

  • Under the "Target Dependencies" group, click the plus button, select Venmo from the menu, and click Add.
  • Under the "Link Binary With Libraries" group, click the plus button, select libVenmo.a from the menu, and click Add.

Select the "Build Settings" tab. Make sure "All" is selected in the top left of the bar under the tabs.

Add the Venmo URL Type

Select the "Info" tab. Add a URL Type with Identifier: Venmo, Role: Editor, and URL Schemes: venmo1234, where 1234 is your app ID.

In Terminal, review and commit your changes:

git diff -w -M --color-words HEAD
git commit -am 'Edit target info, phases & settings for Venmo.'

Using Venmo in Your App

Venmo Sample Apps

Pull in remote updates by running these commands from your project root directory:

git submodule foreach 'git checkout master; git pull --rebase'
git commit -am 'Update submodules to latest commit.'

You can add an alias (to ~/.gitconfig) for the first of the two commands above:

git config --global alias.sup "submodule foreach 'git checkout master; git pull --rebase'"

Then, to pull in remote updates, you can just do:

git sup
  • Commit your changes.

      cd ~/Projects/DrinksOnMe/Libraries/Venmo
      git add -A
      git commit
    
  • Fork this repo on GitHub, add your fork as a remote, and push.

      git remote add myusername [email protected]:myuser/venmo-ios-sdk.git
      git push myusername master
    
  • Send Venmo a pull request on GitHub.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published