Skip to content

Instantly share code, notes, and snippets.

@Rashidium
Last active July 22, 2021 21:04
Show Gist options
  • Save Rashidium/6244552c025cd2d4384a2e49c073798d to your computer and use it in GitHub Desktop.
Save Rashidium/6244552c025cd2d4384a2e49c073798d to your computer and use it in GitHub Desktop.
DeepLinkManager payload presentation
extension DeeplinkManager {
/// Returns linkable satisfied with the payload.
/// - Parameter payload: Push notification payload of the deeplink.
/// - Returns: Linkable satisfied with the payload.
public func getLinkable(payload: [AnyHashable: Any]) -> AppLinkable? {
for (index, link) in links.enumerated() {
guard let activeLink = link.getLinkable(payload: payload) else { continue }
links[index] = activeLink
return activeLink
}
return nil
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment