             }
         }
 
-        notSignedInVC?.addAction(cancelAction)
-        if let notSignedInVC = notSignedInVC {
-            self.presentViewController(notSignedInVC, animated: true, completion: nil)
-        }
+        notSignedInVC.addAction(cancelAction)
+        self.presentViewController(notSignedInVC, animated: true, completion: nil)
     }
 }
    }

    public override func didSelectPost() {
        view.addSubview(background)
        animate {
            self.background.alpha = 0.5
        }
        ElloHUD.showLoadingHudInView(view)
        var content: [PostEditingService.PostContentRegion] = []

        let cleanedText = contentText.stringByTrimmingCharactersInSet(NSCharacterSet.whitespaceCharacterSet())
        if cleanedText.characters.count > 0 {
            content.append(.Text(cleanedText))
        }
        for preview in itemPreviews {
            if let image = preview.image {
                content.append(.ImageData(image, nil, nil))
            }
            if let text = preview.link {
                content.append(.Text(text))
            }
        }

        postService.create(
            content: content,
            success: { post in
                print("Successfully posted from the share controller")
                //TODO: make sure to track success
                ElloHUD.hideLoadingHudInView(self.view)
                self.background.removeFromSuperview()
                self.extensionContext?.completeRequestReturningItems([], completionHandler: nil)
            },
            failure: { error, statusCode in
                print("Failed to post from the share controller")
                //TODO: make sure to track failure
                ElloHUD.hideLoadingHudInView(self.view)
                self.background.removeFromSuperview()
                self.extensionContext?.completeRequestReturningItems([], completionHandler: nil)
            }
        )
    }
}

private extension ShareViewController {

    func checkIfLoggedIn() -> Bool {
        if AuthToken().isPasswordBased {

    }

    func showFailedToPost() {
        let message = NSLocalizedString("Uh oh, failed to post to Ello.", comment: "Failed to post to Ello")
        let failedVC = AlertViewController(message: message)
        let cancelAction = AlertAction(title: NSLocalizedString("Cancel", comment: "Cancel"), style: .Light) {
            action in
            if let context = self.extensionContext {
                let error = NSError(domain: "co.ello.Ello", code: 0, userInfo: nil)
                context.cancelRequestWithError(error)
            }
        }


        let retryAction = AlertAction(title: NSLocalizedString("Retry", comment: "Retry"), style: .Dark) {
            action in
            self.didSelectPost()
        }

        failedVC.addAction(retryAction)
        failedVC.addAction(cancelAction)
        self.presentViewController(failedVC, animated: true, completion: nil)
    }

    func showNotSignedIn() {
        let message = NSLocalizedString("Please login to the Ello app first to use this feature.", comment: "Not logged in message.")
        let notSignedInVC = AlertViewController(message: message)
        let cancelAction = AlertAction(title: NSLocalizedString("Ok", comment: "Ok"), style: .Dark) {
            action in
            if let context = self.extensionContext {
