2017-05-03 2 views
2

基本的なQBRequestを作成してユーザーにログインしようとしていますが、少なくともユーザーが存在しないというエラーが戻ってきました。コンソールでこのエラーが発生しています。Quickblox + Swift 3.0 iOS SDKエラー:アプリケーションが見つかりません。QBConnectionZoneTypeProduction

NSErrorFailingURLKey=https://api.quickblox.com/session.json, 
NSLocalizedRecoverySuggestion= 
{"errors":{"base":["No application found"]}}, 
com.alamofire.serialization.response.error.data=<7b226572 726f7273 223a7b22 62617365 223a5b22 4e6f2061 70706c69 63617469 6f6e2066 6f756e64 225d7d7d>, 
NSLocalizedDescription=Request failed: client error (422) 

私は構文をチェックし、SDKを正しく組み込むためのすべての手順を実行しました。 「アプリケーションが見つかりません」というメッセージが引き続き表示されます。私は自分の資格情報をチェックし、すべてがappDelegateに正しく入力されています。

エンドポイントのカスタマイズを設定しようとしたときに、私はまた、エラーが発生します.. QBConnectionZoneTypeProductionは未解決の識別子の使用をイア

appdelegate:

 func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 
      FIRApp.configure() 

      //Quickblox config 
      QBSettings.setApplicationID(myAppIdInt) 
      QBSettings.setAuthKey("myAuthKeyString") 
      QBSettings.setAuthSecret("myAuthSecretString") 
      QBSettings.setAccountKey("myAccountKeyString") 
      QBSettings.apiEndpoint("https://api....quickblox.com", chatEndpoint: "chat....quickblox.com", forServiceZone: QBConnectionZoneTypeProduction) 

      // Set settings for zone 
QBSettings.setApiEndpoint("https://api...quickblox.com", chatEndpoint: "chat...quickblox.com", forServiceZone: QBConnectionZoneTypeProduction) 
      // Activate zone 
      QBSettings.serviceZone = QBConnectionZoneTypeProduction 


      // iOS 10 support 
      if #available(iOS 10, *) { 
       UNUserNotificationCenter.current().requestAuthorization(options:[.badge, .alert, .sound]){ (granted, error) in } 
       application.registerForRemoteNotifications() 
      } 
       // iOS 9 support 
      else if #available(iOS 9, *) { 
       UIApplication.shared.registerUserNotificationSettings(UIUserNotificationSettings(types: [.badge, .sound, .alert], categories: nil)) 
       UIApplication.shared.registerForRemoteNotifications() 
      } 
       // iOS 8 support 
      else if #available(iOS 8, *) { 
       UIApplication.shared.registerUserNotificationSettings(UIUserNotificationSettings(types: [.badge, .sound, .alert], categories: nil)) 
       UIApplication.shared.registerForRemoteNotifications() 
      } 
       // iOS 7 support 
      else { 
       application.registerForRemoteNotifications(matching: [.badge, .sound, .alert]) 
      } 

      return true 
     } 

答えて

3

適切なソリューションをXcodeはことを私に告げる保ちます以下のようになります。

QBSettings.setApplicationID(myAppIdInt) 
QBSettings.setAuthKey("myAuthKeyString") 
QBSettings.setAuthSecret("myAuthSecretString") 
QBSettings.setAccountKey("myAccountKeyString") 

QBSettings.setApiEndpoint("https://api....quickblox.com", chatEndpoint: "chat....quickblox.com", forServiceZone: .production) 

// Activate zone 
QBSettings.serviceZone = .production 

だからQBConnectionZoneTypeProductionを交換。プロダクション これは、Swift3の名前の変更が導入されたためです。

関連する問題