Zaandam, Amsterdam Area
github | linkedin | [email protected]
iOS and all-round software engineer loving hardware and user experience
Zaandam, Amsterdam Area
github | linkedin | [email protected]
iOS and all-round software engineer loving hardware and user experience
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([], +) | |
}) |
let activity = NSUserActivity(activityType: shipment.key) | |
UIApplication.shared.requestSceneSessionActivation(nil, userActivity: activity, options: nil, errorHandler: {}) |
<dict> | |
<key>UIApplicationSupportsMultipleScenes</key> | |
<true/> | |
<key>UISceneConfigurations</key> | |
<dict> | |
<key>UIWindowSceneSessionRoleApplication</key> | |
<array> | |
<dict> | |
<key>UILaunchStoryboardName</key> | |
<string>LaunchScreen</string> |
class SceneDelegate: UIResponder, UIWindowSceneDelegate { | |
var window: UIWindow? | |
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { | |
guard let windowScene = (scene as? UIWindowScene) else { return } | |
window = UIWindow(windowScene: windowScene) | |
window.rootViewController = PostNLRootViewController() | |
window.makeKeyAndVisible() | |
} | |
} |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool { | |
// Moved window creation to the SceneDelegate below | |
return true | |
} | |
// Added this method: | |
// Here we tell iOS what scene configuration to use | |
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { | |
connectingSceneSession.userInfo?["activity"] = options.userActivities.first?.activityType |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool { | |
// ... | |
window = UIWindow(bounds: UIScreen.main.bounds) | |
window.rootViewController = PostNLRootViewController() | |
window.makeKeyAndVisible() | |
// ... |
// | |
// DataSource.swift | |
// | |
// Created by Tomas Harkema on 06/06/2019. | |
// Copyright © 2019 Tomas Harkema. All rights reserved. | |
// | |
import UIKit | |
import DeepDiff // https://github.com/onmyway133/DeepDiff |
<dict> | |
<key>UIApplicationSupportsMultipleScenes</key> | |
<true/> | |
<key>UISceneConfigurations</key> | |
<dict> | |
<key>UIWindowSceneSessionRoleApplication</key> | |
<array> | |
<dict> | |
<key>UILaunchStoryboardName</key> | |
<string>LaunchScreen</string> |
I hereby claim:
To claim this, I am signing this object: