OGeek|极客世界-中国程序员成长平台

标题: ios - 使用 URL 方案启动 Podcast 应用程序 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 09:28
标题: ios - 使用 URL 方案启动 Podcast 应用程序

我正在尝试使用这样的网址打开播客应用

- (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: 错误: URL scheme pcast 没有注册处理程序

但是,pcast 方案似乎不再受支持?如何在播客应用中打开我自己的 XML 提要?



Best Answer-推荐答案


根据 Swift 4,

我们应该使用下面的 url 方案 从我们的应用程序中打开播客应用程序。

  1. Podcasts (Add Feed By URL)podcast://(你也可以在之后添加一个feed URL来自动填充)

  2. 播客(浏览)pcast://itms-pcast://itms-pcasts ://podcasts://itms-podcast://itms-podcasts://(显示“无法连接”错误)

关于ios - 使用 URL 方案启动 Podcast 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33208299/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4