baztokyo/foursquare-ios-api — Issue #1: Potential issue with different callback URL's
Author: ktambascio
Created: 2012-01-06 04:13:13+00:00
State: open

Hi,

I'm an iOS newbie to say the least. I managed to get your demo app working through xcode, and was able to authenticate correctly. I set my Foursquare Developer app to use the same callback URL as you, which is fsqdemo://foursquare. Everything worked on the iOS simulator.

I then created my own iPhone app. I continued to use fsqdemo://foursquare as the callback URL. However, when clicking "Allow", it would open up your demo app running on the same simulator instance instead of returning to my app. I figured your demo app had somehow registered to handle fsqdemo://foursquare across the system.

So I went back into Foursquare, and changed the url to myapp://foursquare, and changed the user-defined variable in my app to use the same callback url. When I call startAuthorization, the Safari page comes up as expected. When I click "Allow", I get a message that says "Safari cannot open the page because the address is invalid."

So it seemed like the fsqdemo://foursquare URL continued to be registered as a valid handler, while my app cannot use myapp://foursquare. Do I need to somehow clean off the simulator and remove your demo app in order to make it work? Or is there something special about the fsqdemo://foursquare URL that I'm missing?

Again, I'm dabbling in iOS/Obj-C for the first time here, and not sure how to proceed.

Thoughts?