Xamarin iOS通用链接对Twitter Auth的支持 [英] Xamarin iOS Universal Links support for Twitter Auth

查看:185
本文介绍了Xamarin iOS通用链接对Twitter Auth的支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,现在9月25日的twitter支持通用链接,这意味着当UIWebView命中 https://twitter.com/oauth/authorize?oauth_token 链接,它尝试打开一个Twitter应用程序,如果存在,则会将我重定向到auth错误页面,因此我想知道如何禁用它.代码,而无需卸载twitter应用程序,或者如何在xamarin ios应用程序中启用通用链接身份验证?可能吗?

So, now twitter from 25 sep supports universal linking, it means that when UIWebView hits https://twitter.com/oauth/authorize?oauth_token link, it tries to open a twitter app, and if it is there, then it redirects me to auth page with auth error, so I wonder, how can I disable it from code, without uninstalling twitter app, or how I can enable universal linking auth in my xamarin ios app? Is it possible at all?

(类似的问题,但仅适用于本机:禁用Twitter通用深层链接)

(similar question but for native: Disable Twitter Universal Deep Links)

推荐答案

除非Twitter删除/更新" https://www.twitter.com/apple-app-site-association 允许绕过或不在apple-app-site-association文件中的辅助oauth没有看到你会怎么做.这些文件已签名,iOS在操作系统级别处理它们.

Unless Twitter removes/updates the apps section of "https://www.twitter.com/apple-app-site-association" to allow a bypass or a secondary oauth that is not in the apple-app-site-association file I do not see how you would do it. These files are signed and iOS handles them at an OS level.

我对continueUserActivity委托和传递给从UNI链接启动的应用程序的NSUserActivity对象玩的还不是很多,但是我看不到启动的应用程序(即Twitter)将控制权返回到原始应用程序的方法,到那时,oauth调用链将被破坏…….

I have not played around very much with the continueUserActivity delegate and the NSUserActivity object that is passed to apps launched from UNI links, but I do not see a way for the launched app (i.e. Twitter) to return control to the original app, and at that point the oauth call-chain would be broken anyway....

  • 唯一.与自定义URL方案不同,通用应用程序无法使用通用链接,因为其他应用程序使用指向您网站的标准HTTP或HTTPS链接.

  • Unique. Unlike custom URL schemes, universal links can’t be claimed by other apps, because they use standard HTTP or HTTPS links to your website.

确保安全.当用户安装您的应用程序时,iOS会检查您已上传到网络服务器的文件,以确保您的网站允许您的应用程序代表其打开URL.只有您可以创建和上传此文件,因此您的网站与应用程序之间的关联是安全的.

Secure. When users install your app, iOS checks a file that you’ve uploaded to your web server to make sure that your website allows your app to open URLs on its behalf. Only you can create and upload this file, so the association of your website with your app is secure.

通过: https://developer. apple.com/library/prerelease/ios/documentation/General/Conceptual/AppSearch/UniversalLinks.html

这篇关于Xamarin iOS通用链接对Twitter Auth的支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆