Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode 16.1 swizzleCoreData hangs main thread #4527

Open
mitko25522 opened this issue Nov 12, 2024 · 2 comments
Open

Xcode 16.1 swizzleCoreData hangs main thread #4527

mitko25522 opened this issue Nov 12, 2024 · 2 comments

Comments

@mitko25522
Copy link

Platform

iOS

Environment

Develop

Installed

CocoaPods

Version

8.40.1

Xcode Version

16.1

Did it work on previous versions?

No response

Steps to Reproduce

  1. Fetch some core data objects
  2. Observe the Issue navigator for Hangs

Expected Result

There shouldn't be a warning that the main thread is hanging.

Actual Result

When fetching core data objects I get a warning that the swizzle method is causing the main thread to hang:

Performing I/O on the main thread by reading or writing to a database can cause hangs.

Image

Are you willing to submit a PR?

No response

@brustolin
Copy link
Contributor

Hello @mitko25522, thanks for reaching out.

The swizzled function is called in the same thread the original call is made.
Are you fetching this data also in the main thread?

@mitko25522
Copy link
Author

Hello @brustolin, thank you for the quick reply and the information.
There might be a case where we are fetching the data in the main thread. I will check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Waiting for: Community
Status: Needs Discussion
Development

No branches or pull requests

3 participants