Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在通知服务和应用程序之间使用iOS应用程序组容器共享文件(Flatter) 用颤振编写的应用程序 使用插件获取应用程序组容器路径 通知服务下载图片 使用以下目标C代码获取应用程序组容器位置:_Ios_Objective C_Flutter_Apple Push Notifications - Fatal编程技术网

在通知服务和应用程序之间使用iOS应用程序组容器共享文件(Flatter) 用颤振编写的应用程序 使用插件获取应用程序组容器路径 通知服务下载图片 使用以下目标C代码获取应用程序组容器位置:

在通知服务和应用程序之间使用iOS应用程序组容器共享文件(Flatter) 用颤振编写的应用程序 使用插件获取应用程序组容器路径 通知服务下载图片 使用以下目标C代码获取应用程序组容器位置:,ios,objective-c,flutter,apple-push-notifications,Ios,Objective C,Flutter,Apple Push Notifications,(其中AppGroupName是正在使用的应用程序组名称)并将URL保存到应用程序组用户默认值 应用程序启动时(Notification service保存图像后),它会在同一位置查找图像,但找不到该图像。 我比较了这些地点,发现它们完全相同。图像在通知上显示良好(这意味着文件已正确下载) 非常感谢您的任何想法/帮助 问题是下载的图像用于显示通知本身: UNNotificationAttachment *icon = [UNNotificationAttachment attachmentW

(其中AppGroupName是正在使用的应用程序组名称)并将URL保存到应用程序组用户默认值

  • 应用程序启动时(Notification service保存图像后),它会在同一位置查找图像,但找不到该图像。
我比较了这些地点,发现它们完全相同。图像在通知上显示良好(这意味着文件已正确下载)


非常感谢您的任何想法/帮助

问题是下载的图像用于显示通知本身:

UNNotificationAttachment *icon = [UNNotificationAttachment attachmentWithIdentifier:@"" URL:absoluteAttachmentURL options:nil error:&error];
(self.bestAttemptContent.attachments = @[icon];)
此机制将文件移动到另一个文件夹中,因此稍后应用程序启动时找不到该文件。
更多信息可在此处找到:

不确定这是否是您遇到的问题,或者我的问题是否类似。你有机会了解我的问题吗?
UNNotificationAttachment *icon = [UNNotificationAttachment attachmentWithIdentifier:@"" URL:absoluteAttachmentURL options:nil error:&error];
(self.bestAttemptContent.attachments = @[icon];)