Ensuring Synchronous Initialization of Swift Manager Class with Data from API
I’m developing a Swift class as a Manager that needs to fetch initial data from an API during initialization. I want to ensure that the class is fully initialized only after the data has been fetched and is available for use. Here’s a simplified version of what I’m trying to achieve: