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

Debugging a MAUI hybrid app on iOS devices through Hot Restart lacks styles #22267

Open
svetvasilev opened this issue Mar 2, 2025 · 0 comments

Comments

@svetvasilev
Copy link

Apple platform

iOS

Framework version

net9.0-*

Affected platform version

VS 2022 Enterprise 17.13.2

Description

I and my team mate are trying to debug a MAUI hybrid app on 2 different iOS devices - iPhone XS and iPad newer gen (2021 model, iOS 18,2) from win 11 machines. After numerous struggles with Hot Restart, mainly due to MAX_PATH as well as some other known issues, we are finally able to download the app to the devices, it starts and the debugger conencts to it (most of the times). However, all the styling of the UI is gone and it makes it literally impossible to test any changes to the visual appearance of the app.
When the app is deployed through TestFlight, it looks as it is supposed to. However it is very tedious process to wait each time for a small change 30-40 mins until the build goes through and the app is made available in Test flight.
The solution is split in 3 projects - mobile, shared and web. The shared project has its part of shared styles under wwwroot/css, images, etc. Web has few of its own styles, same goes for mobile project.
By inspecting the produced IPA file from Hot Restart vs. the one from the build server, there are quite a few visible differences. I guess most are by design, yet to us it appears that the styles cannot be resolved once the BlazorWebView component is loading the views du to wrong paths.
The main difference in the structure of the 2 IPA files is:

  • Hot Restart IPA:

    • /Payload/.app - root folder in the package
      • .content folder - here are found the app .dll file along with all supporting assemblies and localization folders. Here is included as well a folder that contains some app specific resources (marked with Resource target in the project). No wwwroot folder here.
      • Settings.bundle
      • wwwroot - here are all the resources like styels, images, incl. _content and _framework folders
      • _CodeSignature folder
      • remainder is many system DLLs and some splash screen images in difference sizes, shrifts, Plist files, etc.
  • Build server IPA:

    • /Payload/.app - root folder in the package.
      • localization folders with culture abbreviations
      • wwwroot folder - contains same folder structure and files as Hot Restart produced, but it on the same level as the app assembly.
      • app specific resource folder
      • _CodeSignature folder
      • remainder are the app bundle assembly plus all the other supporting assemblies, appsettings file, images, etc.

Steps to Reproduce

  1. Create MAUI hybrid app that uses BlazorWebView
  2. Add a shared project that cotains styles and views, f.ex. bootstrap
  3. Add a simple view that uses bootstrap styling, f.e. column based layoyt with some bootstrap styled components
  4. Deploy to local iOS device with Hot Restart
  5. The look of the app should be very plain like HTML

Did you find any workaround?

No

Relevant logs

No logs available

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

1 participant