You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mac OS Version: Mojave - 10.14.3
XCode Version: 10.1
Tested on both: ios 12.1 (iphone 8) & ios 10.3.3 (iphone 5c)
I managed to get the authentication to work, everything works I can get data from the user using their access token.
My only issue is trying to update the UI values on the current view controller after successful authentication, my UI Label display_name becomes nil after the app returns from the authentication phase in Spotify app or SFSafariViewController. Is there any way to update the display_name within didInitiate?
The weird part is that it works perfectly on the simulation: DispatchQueue.main.async works, but not on real devices
// In my ViewController.swiftclassViewController:UIViewController,SPTSessionManagerDelegate{@IBOutlet weak vardisplay_name:UILabel!//protocol stubs for 'SPTSessionManagerDelegate'func sessionManager(manager:SPTSessionManager, didInitiate session:SPTSession){print("success", session)DispatchQueue.main.async{self.display_name.text ="data from api"// Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value}}...
// In my AppDelegate.swiftclassAppDelegate:UIResponder,UIApplicationDelegate{varwindow:UIWindow?
lazy varrootViewController=ViewController()func application(_ app:UIApplication, open url:URL, options:[UIApplication.OpenURLOptionsKey:Any]=[:])->Bool{
rootViewController.sessionManager.application(app, open: url, options: options)print("application func")return true
}...
The text was updated successfully, but these errors were encountered:
Mac OS Version: Mojave - 10.14.3
XCode Version: 10.1
Tested on both: ios 12.1 (iphone 8) & ios 10.3.3 (iphone 5c)
I managed to get the authentication to work, everything works I can get data from the user using their access token.
My only issue is trying to update the UI values on the current view controller after successful authentication, my UI Label
display_name
becomes nil after the app returns from the authentication phase in Spotify app or SFSafariViewController. Is there any way to update thedisplay_name
within didInitiate?The weird part is that it works perfectly on the simulation:
DispatchQueue.main.async
works, but not on real devicesThe text was updated successfully, but these errors were encountered: