iOS does not display/update page content if ContentPages are not inside same directory as App/AppShell
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 306
Description
### Description
I've been haveing a lot of issues trying to make my app I developed launch on iOS with no avail. The app launches, code in the .cs is runing, but UI is just blank. Tried recreating it from scratch to create minimal failing sample to submit for quite some time - and I finally manage to create something.
Things that I tested and understood from testing debugging:
1. It seems, that the problem is with App/AppShell.xaml and Pages (ContentPages) not being in the same directory.
2. If the app is simplistic (like default app) - it seems to work for some reason.
3. If you have at least somewhat complex app and the ContentPage are in /Page directory and App/AppShell is in / - the UI shows nothing (or close to nothing if the UI is simple).
4. This problem is only on iOS
5. Moveing the ContentPages to Local ( / ) directory - fixes the issue.
6. Moveing App.xaml and AppShell.xaml to /Page directory (where all ContentPages are) fixes the issue
### Steps to Reproduce
1. Download my sample app
[TestImages2.zip](https://github.com/dotnet/maui/files/9180092/TestImages2.zip)
2. Launch it on iOS
3. Every 5 seconds there will be items added to collection, so wait a bit until they are added/ appear
4. Stop the app
5. Change lines in AppShell.xaml from:
```
```
to:
```
```
6. Launch the app on iOS again
7. Wait for items to be added
Expected behavior: items are added and shown in UI
Actual behavior: items are added to ObservableCollection but never shown in UI
UI fails not only with CollectionView. In the app I'm developing it even fails to show a single Label in the Page (tho - it manages to do so in this sample I created some how)
### Version with bug
6.0.400
### Last version that worked well
Unknown/Other
### Affected platforms
iOS
### Affected platform versions
iOS 15.5
### Did you find any workaround?
Move App.xaml and AppShell.xaml to the directory where all of your ContentPages are
### Relevant log output
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.