Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ParselyTracker/RequestBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ class RequestBuilder {
}
let osDescriptor = String(format: "iOS/%@", UIDevice.current.systemVersion)
let hardwareString = getHardwareString()
userAgent = String(format: "%@ %@ (%@)", appDescriptor, osDescriptor, hardwareString)
let userAgentString = String(format: "%@ %@ (%@)", appDescriptor, osDescriptor, hardwareString)
// encode the user agent into latin1 in case there are utf8 characters
let userAgentData = Data(userAgentString.utf8)
userAgent = String(data: userAgentData, encoding: .isoLatin1)
}
return userAgent!
}
Expand Down