Skip to content

New Architecture: Return NO from requiresMainQueueSetup #1021

@HADeveloper

Description

@HADeveloper

PdfManager in ios/RNPDFPdf/PdfManager.mm returns YES from +requiresMainQueueSetup, but its init body is empty — no UIKit or main-thread-only work. Returning NO is safe and avoids a dispatch_sync onto the main queue during bridge setup.

Background: this pattern has been called out as a rare "App Hang" source on iOS (Shopify: https://arc.net/l/quote/kkxmwgdb), and matters more under the New Architecture where bridge-init timing is tighter.

Proposed change: return NO. Happy to open a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions