2016-06-14 10 views
1

私はシンプルなプロジェクトでLinkedInログインを実装する必要がありますが、現在私は開発に使用できるiPhoneはありません。シミュレータでLinkedIn SDKをどのようにテストできますか?

あなたの電話機にLinkedInアプリケーションをインストールしないとLinkedInでログインできないという問題があります。 LinkedInアプリをシミュレータにインストールするにはどうしたらいいですか?

これを行う別の方法はありますか(「近くにiPhoneがあるのを待つ」ではありません)。

ありがとう

答えて

0

あなたはAppをインストールする必要はありません。ログインに間違った機能を呼び出します。あなたはココアを更新し、以下のコードをログインに追加する必要があります

let linkedInHelper = LinkedinSwiftHelper(configuration: LinkedinSwiftConfiguration(clientId: clientID, clientSecret: clientSecret, state: "linkedin\(Int(Date().timeIntervalSince1970))", permissions: ["r_basicprofile", "r_emailaddress"], redirectUrl: redirectUrl)) 

    linkedInHelper.authorizeSuccess({ (token) in 

    // appInstance.showLoader() 

     //let str = token.accessToken 
     //defaults.setValue(str, forKey: "accesstoken") 


     linkedInHelper.requestURL("https://api.linkedin.com/v1/people/~?format=json", requestType: LinkedinSwiftRequestGet, success: { (ProfileResponse) in 
      // appInstance.hideLoader() 
      var responseData = [String : AnyObject]() 
      responseData = ["userData" : ProfileResponse] 

      if pbSocialDelegate != nil 
      { 
       pbSocialDelegate?.getLinkedinResponse!(userData : responseData) 
      } 


     }) 
     { (ErrorIngetProfile) in 
      print(ErrorIngetProfile) 
     } 

    }, error: { (errorInGetToken) in 
     // appInstance.hideLoader() 
     print(errorInGetToken) 
    }) { 
     print("User CancelFlow") 
    } 
関連する問題