0

I am following this tutorial. But, I am getting this error in my iOS app as soon as I enter my phone number and hit enter to get text message

In my console it says

Digits error: Error Domain=TWTRErrorDomain Code=1 "Must initialize Twitter before attempting to log in." UserInfo=0x17046c280 {NSLocalizedDescription=Must initialize Twitter before attempting to log in.}

and on screen I have a pop up saying : Please check your network connection and try again. Any ideas ?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
user1324887
  • 632
  • 3
  • 11
  • 32
  • 1
    @ rmaddy Rather than just down voting, Can you please list a reason to down vote and possibly a solution to this problem ? – user1324887 May 12 '15 at 20:27

2 Answers2

0

Figured it out. Posting the information here might help someone else. There is some poor documentation on Twitter digits website for someone new to xcode and Digits.

Basic issue is that some of the integration steps were missing. Following the steps in this video at 14:30 onward resolved the issue.

user1324887
  • 632
  • 3
  • 11
  • 32
0

I think what's missing here initializing the Digits framework with your consumer key and secret.

This can be done explicitly, by calling Digits.sharedInstance().startWithConsumerKey("KEY", consumerSecret: "SECRET"), or implicitly as a side effect of calling Fabric.with([Digits()]).

If you're just getting started by using the Fabric Mac App, you'll find your Digits consumer key and secret in your app's Info.plist file. The Mac App puts it there when you create a new Digits project. Learn more about that here.

I just added a Digits-specific setup doc on https://docs.fabric.io/ios/digits/digitskit-setup.html that explains this some more. Thanks for the feedback!

Joey C.
  • 2,168
  • 2
  • 16
  • 14