Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include concrete device model in user agent (PSG-754) #6761

Merged
merged 8 commits into from
Sep 26, 2022

Conversation

Johennes
Copy link
Contributor

Fixes: #6742

Pull Request Checklist

  • I read the contributing guide
  • UI change has been tested on both light and dark themes, in portrait and landscape orientations and on iPhone and iPad simulators
  • Accessibility has been taken into account.
  • Pull request is based on the develop branch
  • Pull request contains a changelog file in ./changelog.d
  • You've made a self review of your PR
  • Pull request includes screenshots or videos of UI changes
  • Pull request includes a sign off

@Johennes
Copy link
Contributor Author

@ismailgulek I hope you don't mind me assigning you directly since you already reviewed matrix-org/matrix-ios-sdk#1576 and this is essentially just a port. 😇

I rewrote AlamoFire's user agent code to Swift this time because, unlike in the SDK, all other involved files were already Swift, too.

@@ -31,6 +31,9 @@ targets:
platform: iOS
type: app-extension

dependencies:
- package: DeviceKit
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a little unfortunate to have to bundle this in all the extensions but I think we want the same user agent also for any networking done from extensions and luckily DeviceKit is rather small.

@codecov
Copy link

codecov bot commented Sep 26, 2022

Codecov Report

Base: 10.04% // Head: 10.04% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (a1361ce) compared to base (5635bf7).
Patch coverage: 84.21% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6761   +/-   ##
========================================
  Coverage    10.04%   10.04%           
========================================
  Files         1490     1490           
  Lines       150805   150864   +59     
  Branches     60858    60870   +12     
========================================
+ Hits         15143    15160   +17     
- Misses      135108   135147   +39     
- Partials       554      557    +3     
Impacted Files Coverage Δ
Config/CommonConfiguration.swift 84.96% <84.21%> (-0.76%) ⬇️
...xKit/Controllers/MXKAuthenticationViewController.m 17.04% <0.00%> (-1.92%) ⬇️
...ojiPicker/Data/EmojiMart/EmojiItem+EmojiMart.swift 95.34% <0.00%> (-0.31%) ⬇️
Riot/Modules/Settings/SettingsViewController.m 0.00% <0.00%> (ø)
...s/Room/Attachements/MXKAttachmentsViewController.m 0.00% <0.00%> (ø)
.../Utils/EventFormatter/MarkdownToHTMLRenderer.swift 85.95% <0.00%> (+0.11%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@ismailgulek ismailgulek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of inline comments, otherwise lgtm.

Riot/target.yml Show resolved Hide resolved
project.yml Outdated Show resolved Hide resolved
Config/CommonConfiguration.swift Outdated Show resolved Hide resolved
Config/CommonConfiguration.swift Outdated Show resolved Hide resolved
Config/CommonConfiguration.swift Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Sep 26, 2022

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/oFjFTy

@Johennes
Copy link
Contributor Author

Hm, looks like AppInfo isn't currently available in the test target yet


❌  /Users/runner/work/element-ios/element-ios/Config/CommonConfiguration.swift:108:23: cannot find 'AppInfo' in scope

        let appInfo = AppInfo.current
          ^

@sonarcloud
Copy link

sonarcloud bot commented Sep 26, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@Johennes Johennes merged commit b846c39 into develop Sep 26, 2022
@Johennes Johennes deleted the johannes/device-model-in-user-agent branch September 26, 2022 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include concrete device model in user agent
2 participants