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

How to build Swift Windows app using swift-winui but with the latest Windows App SDK 1.5.4 ? #175

Closed
litewrap opened this issue Jun 15, 2024 · 7 comments

Comments

@litewrap
Copy link

The actually available swift-winui package seems tied to the Windows App SDK 1.5/1.5.240205001-preview1.
My experiments apps builds with swift-winui works well except for the busy cursor always showed for few seconds on app launch.
Some search and it seems this know issue in WinUI3 was fixed in most recent version.

So, I would like to build Swift Windows app using swift-winui but using the latest Windows App SDK 1.5.4 (1.5.240607001) and see if the busy cursor problem is fixed.

How can I do that ?

Thanks

@stevenbrix
Copy link
Collaborator

@litewrap the swift-windowsappsdk and swift-winui repos have a projections.json which specify the version of the windows app sdk to build against, along with a generate-bindings.ps1 script to update them. I'll make a change to these to update to the latest 1.5 SDK

@stevenbrix
Copy link
Collaborator

@litewrap these have been updated. I'll file an action item to create proper releases rather than relying on the main branch

@litewrap
Copy link
Author

Thanks @stevenbrix, I am now able to build Swift WinUI app using the latest 1.5 SDK.
Unfortunately the wait cursor still appears for 5 seconds on app launch.

To be sure my build use the latest installed SDK, I first removed all installed SDKs, and reboot.
A first launch, a dialog is showed to install the SDK so I installed the SDK 1.5.4 (1.5.240607001) and the app started, but like I said, at every launch, the wait cursor appears for 5 seconds.

I also tried a very very minimal app with empty window no UI elements just empty window. The app launch with empty window and the wait cursor appears for 5 seconds.
Are you reproducing this on your side with the WinUI3AnimationsPreview app?

For comparison, when I launch the Arc Browser app on Windows there is no wait cursor at all, the normal cursor is showed

Any ideas for a workaround or a fix?

Thanks,

@tristanlabelle
Copy link
Contributor

We haven't run into such wait cursor issues at The Browser Company. The Swift projection is unlikely to introduce such an issue, but you could verify by creating an equivalent app in C#. Otherwise, this is likely a problem in WinUI / Windows App SDK or your app's use of it, for which you could get support on Microsoft's repos:
https://github.com/microsoft/WindowsAppSDK or https://github.com/microsoft/microsoft-ui-xaml

@stevenbrix
Copy link
Collaborator

Are you reproducing this on your side with the WinUI3AnimationsPreview app?

@litewrap i'll take a look. I hadn't noticed this before

@stevenbrix
Copy link
Collaborator

@litewrap i do see this, and it does repro in C# if i change the project to run unpackaged, so this seems to be a bug with WinUI or windows app sdk when running unpackaged. Arc is installed as an MSIX, so that's why you don't see this issue

@litewrap
Copy link
Author

Thanks a lot Steve for taking the time trying to reproduce. On my side I also reproduce the same with the sample C# and C++ WinUI default project with MS Visual Studio, on various PC real and VM. I now understand why Arc installed as MSIX doesn't show this. So nothing related with Swift on Windows or the projections, good to know. Thanks again !

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

No branches or pull requests

3 participants