My xamarin application running fine in iOS 17 and below versions. but in iOS 18 and above when I open application and then when I use it for few min it gets crashed automatically and does not even show any crash report in mobile. When I checked the console logs in XCode then I found out that One error is logging more than 700 times in a sec. that is why the application is crashing. I will attach the error below.
Modifying properties of a view's layer off the main thread is not allowed: view <Xamarin_Forms_Platform_iOS_FrameRenderer: 0x7f9605e5e7a0> with nearest ancestor view controller <Xamarin_Forms_Platform_iOS_GroupableItemsViewController_1: 0x7f9605f96dc0>; backtrace: ( 0 UIKitCore 0x0000000152d29c00 -[UIView(UIKitManual) _raiseExceptionForBackgroundThreadLayerPropertyModification] + 453 1 UIKitCore 0x0000000152d2a188 -[UIView(UIKitManual) actionForLayer:forKey:] + 609 2 QuartzCore 0x0000000126f731da -[CALayer actionForKey:] + 151 3 QuartzCore 0x0000000126f7a425 ZN2CA5Layer12begin_changeEPNS_11TransactionEjP11objc_objectRS4 + 199 4 QuartzCore 0x0000000126f7ead8 _ZN2CA5Layer6setterEj12_CAValueTypePKv + 974 5 QuartzCore 0x0000000126f727e9 -[CALayer setOpacity:] + 49 6 Leadrat.Mobile.Forms.iOS 0x0000000101122fc9 xamarin_dyn_objc_msgSend + 217 7 ??? 0x00000001a315f176 0x0 + 7031091574 8 ??? 0x00000001b312d0bb 0x0 + 7299322043 9 ??? 0x000000019d76712b 0x0 + 6936752427 10 Mono 0x000000010b9b70b5 mono_jit_runtime_invoke + 1621 11 Mono 0x000000010bbac1e8 mono_runtime_invoke_checked + 136 12 Mono 0x000000010bbb1c9d mono_runtime_delegate_try_invoke + 157 13 Mono 0x000000010bbd0957 start_wrapper_internal + 647 14 Mono 0x000000010bbd06ae start_wrapper + 62 15 libsystem_pthread.dylib 0x000000012a21018b _pthread_start + 99 16 libsystem_pthread.dylib 0x000000012a20bae3 thread_start + 15