Skip to content

Commit

Permalink
Make instance of Swifter in iOS demo non-optional
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdonnelly committed Jul 10, 2014
1 parent deb70e2 commit e524172
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions SwifterDemoiOS/AuthViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,17 @@ import SwifteriOS

class AuthViewController: UIViewController
{
var swifter: Swifter!
var swifter: Swifter

// Default to using the iOS account framework for handling twitter auth
let useACAccount = true

override func viewDidLoad() {
super.viewDidLoad()
init(coder aDecoder: NSCoder!) {
self.swifter = Swifter(consumerKey: "RErEmzj7ijDkJr60ayE2gjSHT", consumerSecret: "SbS0CHk11oJdALARa7NDik0nty4pXvAxdt7aj0R5y1gNzWaNEx")
super.init(coder: aDecoder)
}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}

@IBAction func didTouchUpInsideLoginButton(sender : AnyObject) {
@IBAction func didTouchUpInsideLoginButton(sender: AnyObject) {
let failureHandler: ((NSError) -> Void) = {
error in

Expand Down Expand Up @@ -76,10 +73,7 @@ class AuthViewController: UIViewController
}
}
}
else
{
self.swifter = Swifter(consumerKey: "RErEmzj7ijDkJr60ayE2gjSHT", consumerSecret: "SbS0CHk11oJdALARa7NDik0nty4pXvAxdt7aj0R5y1gNzWaNEx")

else {
swifter.authorizeWithCallbackURL(NSURL(string: "swifter://success"), success: {
accessToken, response in

Expand Down

0 comments on commit e524172

Please sign in to comment.