How to resolve the following error: modifications-to-the-layout-engine-must-not-be-performed-from-a-background-thread

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

When running app on an iOS 13.x device I get the following error: modifications-to-the-layout-engine-must-not-be-performed-from-a-background-thread. The same app with no modifications Works just fine on iOS 12.

This has to do with exportData.saveAndShare(base64Data, xlsFileName, gCurrentEventname, this.saveAndShareCallBack); Any information on how to resolve this would be appreciated.

@Theodowe Dvy​

If you are making any UI changes in the callback then, you need to run the callback on the main thread. Any kind of UI changes should happen only on the main thread only. Please check the below doc to execute the callback on main thread.

https://docs.kony.com/konylibrary/visualizer/viz_api_dev_guide/content/threading_apis.htm

@Twvcey Rvndvll​

Thank you, This worked %100.

@Theodowe Dvy​

Make sure you click [Select as Best] under the response to close the post.