Is there a way to send sms code programmatically? (Without Digits "magic" view controllers)
The example code doesn't help.
// Objective-C
- (void)didTapButton {
Digits *digits = [Digits sharedInstance];
DGTAuthenticationConfiguration *configuration = [[DGTAuthenticationConfiguration alloc] initWithAccountFields:DGTAccountFieldsDefaultOptionMask];
configuration.phoneNumber = @"+345555555555";
[digits authenticateWithViewController:nil configuration:configuration completion:^(DGTSession *newSession, NSError *error){
// Country selector will be set to Spain and phone number field will be set to 5555555555
}];
}
I found a method authenticateWithPhoneNumber in [Digits sharedInstance], but it's look like it have been deprecated
- (void)authenticateWithPhoneNumber:(twtr_nullable NSString *)phoneNumber digitsAppearance:(twtr_nullable DGTAppearance *)appearance
viewController:(twtr_nullable UIViewController *)viewController
title:(twtr_nullable NSString *)title completion:(DGTAuthenticationCompletion)completion
__attribute__((deprecated("Use authenticateWithViewController:configuration:completion: instead.")));
UPD I got kind of official response from Twitter:
Great question! As of now, this isn't something that's currently built out inside Digits, but it is something that we've heard quite a few people asking for.
So, it's not possible right now. But I'm not deleting the question for save someone time during investigation for the same issue. Or may be someone can help me with workaround