Browse Source

Update NCLoginWeb.swift

Use default app user agent for login. This will display *Nextcloud iOS app* in the user settings.

Signed-off-by: Henrik Storch <henrik.storch@nextcloud.com>
Henry 3 years ago
parent
commit
57b41b913a
1 changed files with 2 additions and 3 deletions
  1. 2 3
      iOSClient/Login/NCLoginWeb.swift

+ 2 - 3
iOSClient/Login/NCLoginWeb.swift

@@ -106,9 +106,8 @@ class NCLoginWeb: UIViewController {
         
         let language = NSLocale.preferredLanguages[0] as String
         var request = URLRequest(url: url)
-        let deviceName = UIDevice.current.name
-        let userAgent = deviceName + " " + "(iOS Files)"
-        
+        let userAgent = CCUtility.getUserAgent()
+
         request.addValue("true", forHTTPHeaderField: "OCS-APIRequest")
         request.addValue(language, forHTTPHeaderField: "Accept-Language")