如何在模拟器中测试LinkedIn SDK



我必须在一个简单的项目中实现LinkedIn登录,但我目前没有任何可以用来开发的iPhone。

问题是,如果不在手机上安装LinkedIn应用程序,您将无法通过LinkedIn登录。如何在模拟器中安装 LinkedIn 应用程序?

有没有另一种方法可以做到这一点(不是"等待附近有iPhone")?

谢谢

你不需要安装App,U调用错误的函数登录。您必须更新可可并添加以下代码才能登录

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")
    }

最新更新