This file contains 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
let activity = NSUserActivity(activityType: shipment.key) | |
UIApplication.shared.requestSceneSessionActivation(nil, userActivity: activity, options: nil, errorHandler: {}) |
This file contains 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
func whenAll<T>(tasks: [Task.Handle<T, Error>]) async throws -> [T] { | |
try await withThrowingTaskGroup(of: [T].self, body: { group in | |
for task in tasks { | |
group.async { | |
[try await task.get()] | |
} | |
} | |
return try await group.reduce([], +) | |
}) |
OlderNewer