Skip to content

Conversation

@Chriztiaan
Copy link

For context, the current user agent strings are not parsed successfully and end up as "unknown" on the current and last 30 days connected device charts in the new dashboard.

Documented examples:

powersync-dart/1.6.4 Dart/3.4.2 linux
powersync-dart/1.6.4 Dart/3.4.2 android/34
powersync-dart/1.6.4 Dart (flutter-web) Chrome/128 android
powersync-js/1.16.2 powersync-react-native/1.11.0 react-native/0.78 android/34
powersync-js/1.16.2 powersync-web/1.6.0 Chrome/128 android

Proof of success:

Screenshots
Screenshot 2025-12-02 at 09 34 00
Screenshot 2025-12-02 at 09 38 24
Screenshot 2025-12-02 at 09 34 10

#endif

func userAgent() -> String {
let libraryVersion = "1.0.0" // TODO: Replace with actual library version
Copy link
Author

@Chriztiaan Chriztiaan Dec 2, 2025

Choose a reason for hiding this comment

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

I couldn't see a clear way that we access this currently. For Kotlin we manage a LIBRARY_VERSION variable in the gradle.properties.
Is that a similar mechanism we want to follow?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a good point, I don't think we can automate this with SwiftPM alone. What might work is to:

  1. Add a Sources/PowerSync/CurrentVersion.swift with an internal libraryVersion string constant.
  2. In the release.yml workflow, update that constant with ${{ github.event.inputs.version }}.
  3. Commit that file in the action before creating the tag.

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.

3 participants