In my NET8
MAUI
application, I use the Maui Community Toolkit. In my view model, I define this property:
[ObservableProperty]
private ObservableCollection<GameVerbList>? _gameList;
In same point of the view model, I add a new value in this collection
GameList.Add(...);
This code is working with Android and Windows. In iOS, the application crashes and the error is not very clear
libsystem_kernel.dylib
__pthread_kill libsystem_c.dylib abort LanguageInUse 0x10065c000 + 3312336 LanguageInUse 0x10065c000 + 4931284 LanguageInUse 0x10065c000
- 4931396 LanguageInUse 0x10065c000 + 4931444 LanguageInUse 0x10065c000 + 4632768 LanguageInUse 0x10065c000 + 4641936
LanguageInUse 0x10065c000 + 5814296 libsystem_pthread.dylib
_pthread_start libsystem_pthread.dylib thread_start
As a workaround, I created a List
, same the values there and then converted the list in the ObservableObject
. Is there an issue with the toolkit?