2016-11-05 47 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文件添加到服務器中細節。