         self.window.makeKeyAndVisible()
 
 #if MOZ_CHANNEL_AURORA
-        mailComposer = MFMailComposeViewController()
         checkForAuroraUpdate()
         registerFeedbackNotification()
 #endif

    
extension AppDelegate: MFMailComposeViewControllerDelegate {
    func sendFeedbackMailWithImage(image: UIImage) {
        let appVersion = NSBundle.mainBundle()
            .objectForInfoDictionaryKey("CFBundleShortVersionString") as String
        let buildNumber = NSBundle.mainBundle()
            .objectForInfoDictionaryKey(kCFBundleVersionKey) as String
        
        if (MFMailComposeViewController.canSendMail()) {
            mailComposer.mailComposeDelegate = self
            mailComposer.setSubject("Feedback on iOS client version v\(appVersion) (\(buildNumber))")
            mailComposer.setToRecipients(["ios-feedback@mozilla.com"])
            
            let imageData = UIImagePNGRepresentation(image)
            mailComposer.addAttachmentData(imageData, mimeType: "image/png", fileName: "feedback.png")
            self.window.rootViewController?.presentViewController(mailComposer,
                animated: true, completion: nil)
        }
    }
    
    func mailComposeController(controller: MFMailComposeViewController!,
        didFinishWithResult result: MFMailComposeResult, error: NSError!) {
            controller.dismissViewControllerAnimated(true, completion: { () -> Void in
                mailComposer = nil
                mailComposer = MFMailComposeViewController()
            })
    }
}
#endif

import Alamofire
import MessageUI
import Shared

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
