forked from core/mobile_nebula
Make user agent consistent on iOS and Android (#98)
Instead of Nebula/, Nebula-DEBUG/, and NebulaNetworkExtension/, ensure that the user agent is always MobileNebula/.
This commit is contained in:
parent
4924888879
commit
17cc3477b7
|
@ -8,8 +8,7 @@ class InvalidCredentialsException: Exception("Invalid credentials")
|
|||
class APIClient(context: Context) {
|
||||
private val packageInfo = PackageInfo(context)
|
||||
private val client = mobileNebula.MobileNebula.newAPIClient(
|
||||
"%s/%s (Android %s)".format(
|
||||
packageInfo.getName(),
|
||||
"MobileNebula/%s (Android %s)".format(
|
||||
packageInfo.getVersion(),
|
||||
packageInfo.getSystemVersion(),
|
||||
))
|
||||
|
|
|
@ -10,7 +10,7 @@ class APIClient {
|
|||
|
||||
init() {
|
||||
let packageInfo = PackageInfo()
|
||||
apiClient = MobileNebulaNewAPIClient("\(packageInfo.getName())/\(packageInfo.getVersion()) (iOS \(packageInfo.getSystemVersion()))")!
|
||||
apiClient = MobileNebulaNewAPIClient("MobileNebula/\(packageInfo.getVersion()) (iOS \(packageInfo.getSystemVersion()))")!
|
||||
}
|
||||
|
||||
func enroll(code: String) throws -> IncomingSite {
|
||||
|
|
Loading…
Reference in New Issue