我正在开发一个项目,我在Vimeo上分享视频 . 在这个我的应用程序中打开一个视频,用户需要按下授权按钮在Vimeo上授权应用程序并获取访问令牌 . 所以,为此,我的应用程序打开safari并在那里打开Vimeo的网站 . 用户需要按下允许按钮,然后它必须再次返回到应用程序 . 但我无法知道回调网址应该是什么让Safari / Vimeo回到我的应用程序 .
请提出您对此的看法 .
您需要为您的应用程序实现一个名为“URL Scheme”的东西,这意味着将您的应用程序注册到某个URL,以便可以从中打开它 .
1)您应该在info.plist文件中添加一行 . 2)您需要收听应用中的网址,然后执行所需操作 .
谷歌了解更多信息......
您需要通过在Apple 's developer website. Here'上编辑您的应用程序's Info.plist. There'大量文档来为您的应用程序设置自定义URL方案,这篇文章详细介绍:http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
然后您的网站只需要打开一个使用您的应用程序's url scheme (eg: myappscheme://do/something/cool?foo=bar). If your app cares about any data passed in to it via your website then implement the 384402 method and inspect the NSURL passed in. You can read more about this in Apple'文档的网址:http://developer.apple.com/library/ios/#documentation/uikit/reference/UIApplicationDelegate_Protocol/Reference/Reference.html
2 回答
您需要为您的应用程序实现一个名为“URL Scheme”的东西,这意味着将您的应用程序注册到某个URL,以便可以从中打开它 .
1)您应该在info.plist文件中添加一行 . 2)您需要收听应用中的网址,然后执行所需操作 .
谷歌了解更多信息......
您需要通过在Apple 's developer website. Here'上编辑您的应用程序's Info.plist. There'大量文档来为您的应用程序设置自定义URL方案,这篇文章详细介绍:http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html
然后您的网站只需要打开一个使用您的应用程序's url scheme (eg: myappscheme://do/something/cool?foo=bar). If your app cares about any data passed in to it via your website then implement the 384402 method and inspect the NSURL passed in. You can read more about this in Apple'文档的网址:http://developer.apple.com/library/ios/#documentation/uikit/reference/UIApplicationDelegate_Protocol/Reference/Reference.html