Skip to content
iOS/macOS/WatchOS/tvOS Swift framework for the YNAB API
Branch: master
Clone or download
Andre Bocchini
Andre Bocchini Update
Latest commit 9502afa May 7, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
SwiftYNAB-demo Initial commit May 4, 2019
SwiftYNAB.xcworkspace Initial commit May 4, 2019
SwiftYNAB Initial commit May 4, 2019
docs Initial commit May 4, 2019
.gitignore Initial commit May 4, 2019
.jazzy.yaml Initial commit May 4, 2019
.travis.yml Initial commit May 4, 2019
LICENSE Initial commit May 4, 2019 Update May 7, 2019
SwiftYNAB.podspec Initial commit May 4, 2019

Build Status


SwiftYNAB is a Swift framework for iOS/macOS/WatchOS/tvOS for accessing the You Need a Budget API. It currently supports all endpoints made available by the API.

How to use it


I built this framework as part of a small weekend project, and didn't go through the trouble of adding it to the official pods repositories, but you can still use CocoaPods to install it directly from this repository.

  1. Create a new project in Xcode
  2. Add a Podfile to the root directory of your project with the following contents:
target :'Test' do
        pod 'SwiftYNAB', :git => ''
  1. Run pod install

Trying it out

Personal API access token

The project comes with a small iOS demo that shows you how to use the framework. If you want to try that out, or if you want to write your own code, you will need a personal API access token.

Make sure you go here and get one:

Sample code

Once you have your personal access token, you can use it to try out the framework. Start by creating a new project and at the top of the file where you plan to use SwiftYNAB, add:

import SwiftYNAB

Then, you can try it out by writing something like:

let ynab = YNAB(accessToken: "TOKEN_GOES_HERE")
ynab.budgets.getBudgets() {
    (budgets, error) in
    if let budgets = budgets {
        for budget in budgets {
    } else {
        print("Uh oh, something went wrong")


You can find documentation here.

You can’t perform that action at this time.