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中。
我也接受,而试图建立端点定制的错误:Xcode的不断告诉我说:QBConnectionZoneTypeProduction 1A中使用未解决的标识符..
的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
}