-
Notifications
You must be signed in to change notification settings - Fork 38
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
Desktop (Windows/Linux) support #51
Comments
A workaround, for now, would be to create a Flutter bridge and call a Native SDK via FFI, eg, Rust SDK |
Is there anything planned in regard to this? |
@CaptainDario unfortunately not yet, but please upvote for gathering interest. We'd need to write a pure Dart SDK (not depending on the Native SDKs such as Android and iOS for Desktop) or embed a Native SDK for Desktop, such as the Rust SDK. However, adding macOS support should be easier since the iOS SDK supports a macOS target. Which targets do you need? Win/Lin/macOS or all of them? |
Thank you for the quick response! I upvoted this issue. I would need support for all platforms. But I also see quite an opportunity in supporting these platforms for this package. Because firebase does not support desktop, and everybody needing desktop support will look somewhere else (just like me) |
A quick workaround, for now, is to just call the API directly until we provide first-class support for Flutter Desktop. |
I totally missed the direct API access, this seems like a good solution. |
@marandaneto How can I overwrite the default timestamp? This works and the event is registered in the UI Map response = jsonDecode((await http.post(
Uri.parse('https://eu.posthog.com/capture/'),
headers: {
"Content-Type": "application/json",
},
body: jsonEncode({
"api_key": Env.POSTHOG_API_KEY,
"event": eventName,
"properties" : completeProps,
//"timestamp" : DateTime(2023, 10, 5).toIso8601String(),
})
)).body); this even is not registered. Map response = jsonDecode((await http.post(
Uri.parse('https://eu.posthog.com/capture/'),
headers: {
"Content-Type": "application/json",
},
body: jsonEncode({
"api_key": Env.POSTHOG_API_KEY,
"event": eventName,
"properties" : completeProps,
"timestamp" : DateTime(2023, 10, 5).toIso8601String(),
})
)).body); However, in both cases, the return value is Edit: It works I had the time filters set to 24h. |
For anybody finding this, the current time can be set with |
Yes, the docs mention the ISO8601 format. |
Yes, the format is mentioned, but they did not mention (or I did not see) that the time needs to be normalized to UTC. When sending my time zone (UTC+1), the server did not return an error, it sent the same response as with UTC but the data was not visible in the dashboard. If this is obvious, I am sorry to spam this issue, I thought somebody else may have the same problems. |
macOS support has landed at least https://github.com/PostHog/posthog-flutter/releases/tag/4.0.0-beta.2 |
I hope to see a Windows version even if it's a quick and dirty version with helpers that call the API directly. |
Waiting for windows support |
https://posthog.com/questions/flutter-for-windows-support
https://posthoghelp.zendesk.com/agent/tickets/16890
The Flutter SDK depends on the Android and iOS SDK.
Ideally, the SDK would also have a pure Dart client that works on Desktop or we should embed a Native SDK for Desktop such as the Rust SDK.
macOS is supported already.
The text was updated successfully, but these errors were encountered: