- ABP Framework version: v8.0.0
- UI type: Angular + MAUI mobile
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
- Exception message and stack trace: no exception only stuck on splash screen when build Android in Release mode, no issue on
I have tried to disable AOT, Trimming, repair/restore/update workloads
same question: https://support.abp.io/QA/Questions/6137/Mobile-MAUI-Android-Release-build-stuck-on-splash It is still unresolved
The solution doesn't work https://github.com/abpio/abp-commercial-docs/pull/592
5 Answer(s)
-
0
I have reproduced the problem and it occurs because of
SecureStorage
. We have used in exactly same way with the MAUI documentation but it doesn't respond at runtime in release mod only on Android. It seems it's related to MAUI implementation.You can use Preferences API or use a simple Sqlite to keep data in the DefaultStorage implementation as a workaround. We aware the problem but we don't have a solution for android yet
-
0
I've done some experiments that I hope will help.
- Create a Hello World solution for maui
- Trigger
SecureStorage
by clicking a button
This is not working code
private void OnCounterClicked(object sender, EventArgs e) { count++; if (count == 1) CounterBtn.Text = $"Clicked {count} time"; else CounterBtn.Text = $"Clicked {count} times"; SecureStorage.Default.SetAsync("__access_token", CounterBtn.Text).GetAwaiter(); var values = SecureStorage.Default.GetAsync("__access_token").GetAwaiter().GetResult()!; SemanticScreenReader.Announce(values); }
This is working code
private async void OnCounterClicked(object sender, EventArgs e) { count++; if (count == 1) CounterBtn.Text = $"Clicked {count} time"; else CounterBtn.Text = $"Clicked {count} times"; await SecureStorage.Default.SetAsync("__access_token", CounterBtn.Text); var values = await SecureStorage.Default.GetAsync("__access_token"); SemanticScreenReader.Announce(values); }
I think the relationship between
void OnCounterClicked
andasync void OnCounterClicked
is async -
0
Delete
MauiCurrentPrincipalAccessor
GetClaimsPrincipal
method returns readSecureStorage
code, it works -
0
I think
CurrentPrincipalAccessorBase
increaseasync
can be solved, like thisprotected abstract Task<ClaimsPrincipal> GetClaimsPrincipal();
-
0
Thanks for your findings, We'll update the template according to this information, thanks for this key point
Also, your credit is refunded