Deep links in iOS app

I’m trying to add this functionality


func application(_ application: UIApplication,
                 open url: URL,
                 options: [UIApplicationOpenURLOptionsKey : Any] = [:] ) -> Bool {

    // Determine who sent the URL.
    let sendingAppID = options[.sourceApplication]
    print("source application = \(sendingAppID ?? "Unknown")")

    // Process the URL.
    guard let components = NSURLComponents(url: url, resolvingAgainstBaseURL: true),
        let albumPath = components.path,
        let params = components.queryItems else {
            print("Invalid URL or album path missing")
            return false
    }

    if let photoIndex = params.first(where: { $0.name == "index" })?.value {
        print("albumPath = \(albumPath)")
        print("photoIndex = \(photoIndex)")
        return true
    } else {
        print("Photo index missing")
        return false
    }
}

as noted here

https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app

to my AppDelegate.mm (as advised here Create deep links to iOS / Android app by @huanxinyin, thank you!).

But my .mm file is Objective-C – and the code example by Apple is Swift. Is there Objective-C code to implement the URL handling from the AppDelegate.mm?