maui
maui copied to clipboard
Slow build -> deploy on iOS
Description
The build process of iOS apps is very slow. Almost a minute (55 seconds) until first page is shown on physical device. Especially the build seems to take up much time, clocking in at around 40 seconds.
I'm deploying to a physical device that is connected by cable to the Mac.
Here are the specs of the Mac:
I tried the same on Xamarin.Forms, where the same process takes 45 seconds, so a bit faster but also tedious.
Such a long cycle to redeploy simple changes in my code makes it very tedious to develop on iOS. And no, I'm not using Hot Reload, because SkiaSharp doesn't work on iOS with Hot Reload.
Steps to Reproduce
- Create new .NET MAUI app from template (.NET 7)
- Set up connection to Mac
- Set up automatic provisioning
- Plug physical device into Mac
- Deploy app to device
- Stop app
- Make small change in code
- Deploy app again
Link to public reproduction project repository
N/A
Version with bug
Unknown/Other (please specify)
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
iPadOS 13.6.1
Did you find any workaround?
No response
Relevant log output
No response
55 seconds? You're lucky, here it takes 5 minutes (same setup as you Visual Studio connect to MacbookPro, which has a physical iPhone connected via cable)
Have you tried building and deploying a iOS app from Xcode with that setup to see how much faster it is?
Hi @Inrego. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
Have you tried building and deploying a iOS app from Xcode with that setup to see how much faster it is?
I just tried that. It was around 6 seconds.
Also, I want to specify a bit: I'm developing in Visual Studio on Windows with connection to a Mac Mini on my desk. The timings I've done are not for first build, which I can understand would take longer. It's for "incremental" builds, where I'm just changing a single character in the UI and then hitting F5. All timings have been done on the project template which is created automatically when creating a new .NET MAUI app project.
I just tried a .NET MAUI app directly on the mac with Visual Studio for Mac, and it took just under 30 seconds.
So to recap:
Windows -> Mac: 55 seconds Directly on Mac: 30 seconds Swift Project in Xcode: 6 seconds
But yeah.. it's a pain to develop for iOS with .NET MAUI, when you have to wait a minute every time you changed something.
I have a Mac Mini taking at least 40 minutes on release builds, almost sleeping throughout the builds.
@drasticactions I didn't hear back on this. It takes 6 seconds to build an xcode project on the same Mac Mini.
You should try adding some additional libraries into your project too. My project isn't that big and the development cycle time is about 5 minutes. I don't see how it's practical to develop realistically with such a slow development cycle for every minor change to the app DLL.
Verified this issue with Visual Studio Enterprise 17.9.0 Preview 2. Can repro on iOS platforms with sample project.