Created
August 10, 2023 23:39
-
-
Save christianselig/e14ff9a5226f0fccda6c21f13d733af2 to your computer and use it in GitHub Desktop.
Adds async await support to WidgetCenter configuration fetch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import WidgetKit | |
extension WidgetCenter { | |
func currentConfigurations() async throws -> [WidgetInfo] { | |
try await withCheckedThrowingContinuation { continuation in | |
getCurrentConfigurations { result in | |
continuation.resume(with: result) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment