2016-11-05 42 views
-1

我正在使用带有iOS客户端的本地安装的MFP服务器使用IBM MobileFirst示例代码进行测试。我期待以下代码给我一个错误或令牌。但是,他们都是零。 。无法使用MobileFirst和Swift客户端注册设备

WLAuthorizationManager.sharedInstance()obtainAccessToken(forScope:无){(令牌,错误) - >在

 if (error != nil) { 
      self.titleLabel.text = "Bummer..." 
      self.connectionStatusLabel.text = "Failed to connect to MobileFirst Server\n\(serverURL)" 
      print("Did not recieve an access token from server: " + error.debugDescription) 
     } else { 
      self.titleLabel.text = "Yay!" 
      self.connectionStatusLabel.text = "Connected to MobileFirst Server\n\(serverURL)" 
      print("Recieved the following access token value: " + token!.value) 
     } 

     self.testServerButton.isEnabled = true 
    } 
+0

你在'error.debugDescription'中得到了什么错误? –

回答

0

东西太虚寻找:

  1. 您使用的正确的应用程序版本(如果您通过控制台注册)
  2. 您正在使用正确的应用程序标识符。标识符为区分大小写以及是否从CLI或控制台注册,您需要确保您正确输入
  3. 如果从控制台注册,请确保已将.plist文件添加到服务器中细节。