Search code examples
iosfirebasenest-api

Authentication Delay with Nest SDK in Swift iOS App


I'm working on an iOS app in Swift that uses the Nest Thermostat iOS SDK here. I started by building off of the Obj-C demo app (found with the iOS SDK). Once I was confident that I could do what I needed, I created a new Swift project and moved the Nest SDK files and Firebase framework over and started coding.

My new app is able to authenticate with Nest to get the app token. However, when I try to authenticate with Firebase there is a 120 second delay before the success handler is fired. Everything work's fine after that.

I have tried identifying the differences between my app and the demo app and I cannot see anything that would make the two apps behave differently in regards to the Firebase authentication.

Just wanted to add that I'm fairly new to Obj-C and iOS and totally new to Swift.


Solution

  • The issue turned out to be caused by using an unsupported version of the Firebase.framework. I was led to this conclusion from this Stack Overflow post: Unable to read/write values to Nest Firebase with newest Firebase Framework.

    I was using the newest Firebase.framework provided by Firebase (2.4.2). I thought I upgraded my working version of the Nest Demo app to the newest Firebase.framework, but was in fact still using the original version.

    As soon as I made a build with an old version of Firebase.framework (1.1.9), all of my communications happened instantly.