       let invite = GINInvite.handleURL(url, sourceApplication:sourceApplication, annotation:annotation)
 
       if (invite != nil) {
-        GINInvite.completeInvitation()
         let matchType =
         (invite.matchType == GINReceivedInviteMatchType.Weak) ? "Weak" : "Strong"
         print("Invite received from: \(sourceApplication) Deeplink: \(invite.deepLink)," +

    // [END firebase_configure]

    // Initialize sign-in
    GINInvite.applicationDidFinishLaunching()

    // [START usermanagement_initialize]
    // Configure the default Firebase application

    launchOptions: [NSObject: AnyObject]?) -> Bool {
      NSNotificationCenter.defaultCenter().addObserver(self, selector: "connectToFriendlyPing",
        name: Constants.NotificationKeys.SignedIn, object: nil)
      configureFIRContext(launchOptions)
      configureGCMService()
      registerForRemoteNotifications(application)
      return true
  }

  func configureFIRContext(launchOptions: [NSObject: AnyObject]?) {
    // [START firebase_configure]
    // Use Firebase library to configure APIs
    do {
