我敢肯定,一旦有人善意地指出我正确的方向,这是微不足道的,因此我为问一个愚蠢的问题而道歉。但是,我一直在寻找几天我无法弄清楚我做错了什么。
场景:创建一个接收图像文件的简单共享扩展
问题:当我访问附件时,处理程序永远不会被调用,尽管我可以在 itemProvider 中看到“public.jpg”但我看不到数据在哪里?
我做了什么:
1) defined NSExtensionActivationSupportsImageWithMaxCount = 1 as my only activation rule
2) added CoreMedia framework to the extension
3) added the same group to both app and app extension
4) made sure both have the group (1) in the entitlement
5) made sure both are using a certificate/app id with that group enabled
6) clean and rebuild several times to no avail.
Run Code Online (Sandbox Code Playgroud)
编码:
- (void)didSelectPost {
/
for (NSExtensionItem *item in self.extensionContext.inputItems) {
for (NSItemProvider …Run Code Online (Sandbox Code Playgroud)