iOS/macOS/WatchOS/tvOS Swift framework for the YNAB API
I was working on a small personal project for iOS using the YNAB API, and the more I built it, the more I realized it might make sense to break out the API access bits into their own distinct framework. I ended up quickly pulling that code out and putting it in its own git repository.
Wanted to share here to get some feedback from anyone who might be using the YNAB API with iOS right now.
I also generated some docs if anyone is curious to take a look:
Excellent, Hot Pink Tape ! Thanks for your work on this.
I'm adding your library to our "community-supported libraries" page. I'll post here once that's been deployed (should be tomorrow). Thanks again!Reply
George Thanks! That's awesome!
While you're here, just out of curiosity, have you guys noticed/had any problems with the OAuth redirects? I noticed it not only in the test app I was working on, but also in some of the community apps like "Allowance" on iOS, and "I Would Have Saved" on the web. The pattern I see is something like this:
And get the login page as expected
2. Enter credentials and hit the login button. Looking at the session it looks like the page calls
Login is successful and we get a nice JSON response with a whole lot of account information, but no redirect, so we sit on the login page, and to the user it looks like nothing happened at all.
3. If at this point you hit refresh on the browser, we'll naturally call the following endpoint a second time
4. Since we successfully logged in in step 2, we don't see the login credential fields, and we actually see the page where we get to Authorize the application to access our account. If we hit the orange authorize button, we see that the page calls
And as a response we get the expected 302 redirect.
I'm able to reproduce this consistently, both on iOS and on the web apps. I captured some sessions if you think there's value in the raw details of the requests and responses, but I didn't post them here because they had a ton of account information. I'm sure we can figure something out if that's valuable information for troubleshooting.
If there's nothing wrong on your end, maybe we community developers aren't going through the OAuth flow correctly on our end.
If you decide to test using the test app in my project, just make sure you open LandingViewController.swift and insert the OAuth client token in there since I removed it before committing the code.Reply