stephan-tolksdorf / STULabel

A faster and more flexible label view for iOS
Other
121 stars 28 forks source link

Fix deadlock running tests in Xcode 16 #58

Open stephan-tolksdorf opened 2 months ago

stephan-tolksdorf commented 2 months ago

Fixes #56 by checking in the load initializer whether an XCTest environment variable is set and if so, dispatch the initialization asynchronously on the main thread. Also provides a way for disabling the load time initialization with the environment variable STULabel_NoMainScreenPropertiesInitializationOnLoad and then explicitly performing the initialization with the stu_initializeMainScreenProperties function.

macdrevx commented 2 months ago

I'd love for there to be an option like STULabel_NoMainScreenPropertiesInitializationOnLoad but that we can use with the shipping app.

macdrevx commented 2 months ago

Maybe a custom Info.plist key? Are those save to read during +load?

macdrevx commented 2 months ago

Would be better if it were something that was determined at compile time though.