let digits = Digits.sharedInstance()
let configuration = DGTAuthenticationConfiguration(accountFields: .DefaultOptionMask)
configuration.appearance = DGTAppearance()
//configuration.appearance.backgroundColor = UIColor.whiteColor()
//configuration.appearance.accentColor = UIColor.init(hex: "3D3B50")
configuration.appearance.accentColor = UIColor(red:0.33, green:0.67, blue:0.93, alpha:1.0)
configuration.phoneNumber = "+65"
digits.authenticateWithViewController(nil, configuration: configuration) { session, error in
if (session != nil) {
print(session!.phoneNumber)
} else {
NSLog("Authentication error: %@", error!.localizedDescription)
}
}
Tried with and without "appearance" modifications, the Send Request button on first click is always invisible. However once I cancel and trigger the view again - its all good.
Have also tried explicitly calling from the main thread.
Anyone else suffering from the same issue?
I think, because you authenticate with nil view controller. Try this one