Skip to content

Skip static runtime init method to improve launch time #343

@IIsathishII

Description

@IIsathishII

Hello,

A function marked with the attribute((constructor)) attribute will be called automatically before the app's main function is called. However, Apple does not recommend using this as it affects the launch time.

I'm seeing nearly 50-100ms being added to my app's launch time due to [__attribute__((constructor)) static void initializeWithInfoPlist(int argc, const char **argv)]. I plan to call initSharedInstanceWithConfiguration programmatically only and do not want to want to add the configuration to my app's Info.plist. It should be possible for developers to skip the execution of initializeWithInfoPlist by means of a compiler flag if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions