{"id":227,"date":"2017-03-17T18:20:20","date_gmt":"2017-03-17T18:20:20","guid":{"rendered":"http:\/\/www.appsolem.nl\/?p=227"},"modified":"2021-01-30T10:17:23","modified_gmt":"2021-01-30T11:17:23","slug":"ios-universal-links","status":"publish","type":"post","link":"https:\/\/appsolem.nl\/?p=227","title":{"rendered":"iOS Universal links"},"content":{"rendered":"<p>Implemented <a href=\"https:\/\/developer.apple.com\/library\/prerelease\/content\/documentation\/General\/Conceptual\/AppSearch\/UniversalLinks.html\">Universal Links<\/a> today. I think this is essential for a platform in which you can share content through links like you will be able to do with <a href=\"http:\/\/www.votavi.com\">Votavi<\/a>\u00a0.<\/p>\n<p>It was actually a pretty simple implementation, the biggest challenge is\u00a0getting\u00a0<span class=\"s1\">AppDelegate to perform the open action in the right viewcontroller. By using this piece of code you will be able to return to the rootviewcontroller, in our case this is the mainViewController.<\/span><\/p>\n<p><code><br \/>\nif let mainViewController = navController.viewControllers.first as? mainViewController {<br \/>\nnavController.topViewController?.dismiss(animated: false, completion: {<br \/>\nnavController.popToRootViewController(animated: false)<br \/>\n})<br \/>\n}<br \/>\n<\/code><br \/>\nWhere navcontroller is the UINavigationController via :<br \/>\n<code><br \/>\n(if let navController = window?.rootViewController as? UINavigationController {)<br \/>\n<\/code><\/p>\n<p>This will get you to the mainViewController which is the root viewController.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Implemented Universal Links today. I think this is essential for a platform in which you can share content through links [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/appsolem.nl\/index.php?rest_route=\/wp\/v2\/posts\/227"}],"collection":[{"href":"https:\/\/appsolem.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/appsolem.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/appsolem.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/appsolem.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=227"}],"version-history":[{"count":1,"href":"https:\/\/appsolem.nl\/index.php?rest_route=\/wp\/v2\/posts\/227\/revisions"}],"predecessor-version":[{"id":420,"href":"https:\/\/appsolem.nl\/index.php?rest_route=\/wp\/v2\/posts\/227\/revisions\/420"}],"wp:attachment":[{"href":"https:\/\/appsolem.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/appsolem.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/appsolem.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}