|
130 | 130 | self.delegate?.debugLog?(message: "No \"id\" key in JSON response: \(json)")
|
131 | 131 | }
|
132 | 132 | } else {
|
133 |
| - self.delegate?.debugLog?(message: "Could not parse body as JSON object: \(data)") |
| 133 | + self.delegate?.debugLog?(message: "Could not parse body as JSON object: \(String(describing: data))") |
134 | 134 | }
|
135 | 135 | } else {
|
136 | 136 | if data != nil && response != nil {
|
137 | 137 | let responseBody = String(data: data!, encoding: .utf8)
|
138 | 138 | self.delegate?.failedToRegisterForPushNotifications?(response: response!, responseBody: responseBody)
|
139 |
| - self.delegate?.debugLog?(message: "Bad HTTP response: \(response!) with body: \(responseBody)") |
| 139 | + self.delegate?.debugLog?(message: "Bad HTTP response: \(response!) with body: \(String(describing: responseBody))") |
140 | 140 | }
|
141 | 141 | }
|
142 | 142 | })
|
|
195 | 195 | */
|
196 | 196 | private func modifySubscription(interest: String, change: SubscriptionChange, successCallback: @escaping (Any?) -> Void) {
|
197 | 197 | guard pusherAppKey != nil && clientId != nil else {
|
198 |
| - self.delegate?.debugLog?(message: "pusherAppKey \(pusherAppKey) or clientId \(clientId) not set - waiting for both to be set") |
| 198 | + self.delegate?.debugLog?(message: "pusherAppKey \(String(describing: pusherAppKey)) or clientId \(String(describing: clientId)) not set - waiting for both to be set") |
199 | 199 | self.requestQueue.pauseAndResetCurrentTask()
|
200 | 200 | return
|
201 | 201 | }
|
|
222 | 222 | self.failedRequestAttempts += 1
|
223 | 223 |
|
224 | 224 | if error != nil {
|
225 |
| - self.delegate?.debugLog?(message: "Error when trying to modify subscription to interest: \(error?.localizedDescription)") |
| 225 | + self.delegate?.debugLog?(message: "Error when trying to modify subscription to interest: \(String(describing: error?.localizedDescription))") |
226 | 226 | } else if data != nil && response != nil {
|
227 | 227 | let responseBody = String(data: data!, encoding: .utf8)
|
228 |
| - self.delegate?.debugLog?(message: "Bad response from server: \(response!) with body: \(responseBody)") |
| 228 | + self.delegate?.debugLog?(message: "Bad response from server: \(response!) with body: \(String(describing: responseBody))") |
229 | 229 | } else {
|
230 | 230 | self.delegate?.debugLog?(message: "Bad response from server when trying to modify subscription to interest: \(interest)")
|
231 | 231 | }
|
|
0 commit comments