简体   繁体   English

使用URL方案启动Podcast应用

[英]Launch Podcast App With URL scheme

I'm trying to open the podcast app with a url like this 我正在尝试使用这样的网址打开播客应用

- (void)setupPodcast
{
    NSLog(@"setup podcast");
    NSString *str = [NSString stringWithFormat:@"pcast://podcasts.sdxme.org/RSS/default.aspx?ID=%ld", (long)[[NSUserDefaults standardUserDefaults] integerForKey:@"CustomerID"]];
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];
}

2015-10-18 23:45:11.367 [29302:1691034] LaunchServices: ERROR: There is no registered handler for URL scheme pcast

However it looks like the pcast scheme is no longer supported? 但是看来不再支持pcast方案了吗? How can I open my own XML feed in the podcast app? 如何在播客应用中打开自己的XML提要?

我相信苹果公司改变了他们公认的播​​客方案,现在您应该使用“ feed:// ...”。

As per Swift 4, 根据Swift 4,

We should use the below url schemes to open podcasts app from our app. 我们应该使用以下url schemes从我们的应用程序打开播客应用程序。

  1. Podcasts (Add Feed By URL)podcast:// (you can also add a feed URL after to auto-populate it) Podcasts (Add Feed By URL) - podcast:// (您也可以在其后添加Feed URL来自动填充)

  2. Podcasts (Browse)pcast:// or itms-pcast:// or itms-pcasts:// or podcasts:// or itms-podcast:// or itms-podcasts:// (displays a "can't connect" error) Podcasts (Browse)pcast://itms-pcast://itms-pcasts://podcasts://itms-podcast://itms-podcasts:// (显示“无法连接“错误)

MacOS Majave需要pcast:// IOS播客://

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM