title: Linkedin Mobile SDK for iOS - Callback Timeouts
body: <p>I'm using the new iOS SDK from Linkedin version 1.0.2 and getting callback timeouts. The intent is to authenticate and then link the social account to an existing internal account or create a new internal user from the social information. Everything is working but not 100% of the time. Sometimes after 60 seconds the callback occurs with a timeout. This happens with the linked app installed. Any ideas?    </p>
  
  <pre><code> @IBAction func linkedin(sender: AnyObject) {
  
          LISDKSessionManager.createSessionWithAuth([LISDK_BASIC_PROFILE_PERMISSION, LISDK_EMAILADDRESS_PERMISSION], state: nil, showGoToAppStoreDialog: true, successBlock: { (string) -&gt; () in
  
              if (LISDKSessionManager.hasValidSession()) {
  
                  LISDKAPIHelper.sharedInstance().getRequest("\(Constants.linkedinBaseURL)/people/~:(id,firstName,lastName,email-address)", success: { (response) -&gt; () in
  
                      dispatch_async(dispatch_get_main_queue(), { () -&gt; () in
  
                          if let dataFromString = response.data.dataUsingEncoding(NSUTF8StringEncoding, allowLossyConversion: false) {
                              let result = JSON(data: dataFromString)
  
                              LISDKSessionManager.clearSession()
  
                              var socialMember = SocialMember()
                                  socialMember.socialType = SocialType.linkedin
                                  socialMember.id = result["id"].stringValue
                                  socialMember.email = result["emailAddress"].stringValue
                                  socialMember.firstName = result["firstName"].stringValue
                                  socialMember.lastName = result["lastName"].stringValue
  
                              Loader.setOnView(self.view, withTitle: "Loading...", animated: true)
  
                              self.socialLink(socialMember, completion: { () -&gt; () in
                                  Loader.hideFromView(self.view, animated: true)
                              })
                          }
                      })
                      }, error: { (error) -&gt; () in
  
                          LISDKAPIHelper.sharedInstance().cancelCalls()
                          LISDKSessionManager.clearSession()
  
                          println(error)
                  })
              }
              }, errorBlock: { (error) -&gt; () in
  
                  LISDKAPIHelper.sharedInstance().cancelCalls()
                  LISDKSessionManager.clearSession()
  
                  println(error)
          })
      }
  
  func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject?) -&gt; Bool {
  
          if (LISDKCallbackHandler.shouldHandleUrl(url)) {
              return LISDKCallbackHandler.application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation)
          }
  
          return false
      }
  </code></pre>
  
  <p>Error on callback after 60 seconds</p>
  
  <p>2015-08-05 15:24:05.500 xxx[34640:7245029] lisdksession manager  openURL called!, </p>
  
  <p>Error Domain=LISDKAuthError Code=2 "The operation couldn’t be completed. (LISDKAuthError error 2.)" UserInfo=0x174a6a3c0 {errorDescription=The request timed out., originalDomain=LISDKNetworkUnavailableError, errorInfo=NETWORK_UNAVAILABLE}</p>