Skip to content

Commit c367856

Browse files
chunkyguytapashmajumder
authored and
Sidharth Juyal
committed
Log NSData as human readable string
Currently, I see messages being logged as: ``` registerToken failed:, Unable to find a push integration set up for application iOSStaging on APNS_SANDBOX, got response 126 bytes ``` This change should make them appear as: ``` registerToken failed:, Unable to find a push integration set up for application iOSStaging on APNS_SANDBOX, got response Optional("{\"msg\":\"Unable to find a push integration set up for application iOSStaging on APNS_SANDBOX\",\"code\":\"BadParams\",\"params\":null}") ``` Update swift-sdk/Internal/IterableAPIInternal.swift Co-Authored-By: tapashmajumder <[email protected]> Update swift-sdk/Internal/IterableAPIInternal.swift Co-Authored-By: tapashmajumder <[email protected]> Update swift-sdk/Internal/IterableAPIInternal.swift Co-Authored-By: tapashmajumder <[email protected]>
1 parent 77df552 commit c367856

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

swift-sdk/Internal/IterableAPIInternal.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ final class IterableAPIInternal : NSObject, PushTrackerProtocol {
606606
toLog += ", \(reason)"
607607
}
608608
if let data = data {
609-
toLog += ", got response \(data)"
609+
toLog += ", got response \(String(data: data, encoding: .utf8) ?? "nil")"
610610
}
611611
ITBError(toLog)
612612
}

0 commit comments

Comments
 (0)