iOS 13:MPMediaPickerController - 内部错误/找不到请求的应用程序扩展 [英] iOS 13: MPMediaPickerController - Internal Error / The requested app extension could not be found
问题描述
似乎一般的 MPMediaPicker
在 ios13 (ipad air 2, iphone SE) 上不再工作了
It seems that the general MPMediaPicker
is not working anymore on ios13 (ipad air 2, iphone SE)
从那里复制的 1:1 示例没有显示媒体选择器https://developer.apple.com/documentation/mediaplayer/displaying_a_media_picker_from_your_app
The example 1:1 copied from there is not showing up the media picker https://developer.apple.com/documentation/mediaplayer/displaying_a_media_picker_from_your_app
任何提示如何恢复功能?
像这样使用MPMediaPickerController
时
musicPickerView = [[UIView alloc] initWithFrame:fullScreenRect];
musicPickerView.alpha = 0.0f;
musicPicker = [[MPMediaPickerController alloc] initWithMediaTypes:MPMediaTypeMusic];
musicPicker.showsCloudItems = false;
musicPicker.showsItemsWithProtectedAssets = false;
musicPicker.delegate = self;
musicPicker.allowsPickingMultipleItems = false;
musicPicker.prompt = NSLocalizedString(@"Select a song", @"Select a song");
musicPicker.view.frame = musicPickerView.bounds;
[self addChildViewController:musicPicker];
[musicPickerView addSubview:musicPicker.view];
[self.view addSubview:musicPickerView];
[musicPicker didMoveToParentViewController:self];
[self fadeInMusicPicker:true];
委托根本没有被调用.不显示日志,仅显示本机警报.
The delegate is not invoked at all. No log is shown, only the native alert.
我得到了这个原生替代
内部错误
找不到请求的应用扩展
[取消]
注意事项 2
该设备上未安装 Apple 音乐应用程序时似乎是问题所在.有没有人知道一种可靠的方法来确定是否安装了苹果音乐应用?
Note 2
It seems to be the issue when the apple music app is not installed on that device. Does anybody know a reliable way to find out if apple music app is installed?
推荐答案
似乎必须在该设备上安装来自 Apple 的 Music
应用程序.仍然不是 100% 可重现,但安装该应用后,我再也没有遇到过这个问题.
It seems that the Music
app from apple has to be installed on that device. Still not 100% reproducible, but with that app installed, I never saw that issue again.
这篇关于iOS 13:MPMediaPickerController - 内部错误/找不到请求的应用程序扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!