解决方法
iOS. Create a template image that represents your Action extension. A
template image is an image that iOS uses as a mask to create the final
icon that users see in the activity view controller. To create a
template image that looks good in the final UI,follow these
guidelines:Use black or white with appropriate alpha transparency. Don’t include
a drop shadow. Use antialiasing. Create the image in two sizes:For iPhone,the image should look good centered in an area that
measures 60 x 60 points.For iPad,the image should look good centered in an area that measures
76 x 76 points.
此外,您可以从HIG获得更多信息.
Use a monochromatic version of the app icon for an Action extension.
(In contrast,a Share extension uses its containing app’s full-color
app icon.) To create an icon for an Action extension,you might start
by creating a stencil version of your app icon. If necessary,simplify
the design by focusing on the elements that make your icon unique.If you provide multiple Action extensions in your containing app,it
can work well to create a family of icons for them. Be sure to make
every icon in the family look related to the containing app’s icon.
编辑:
从Documentation(搜索图标):
In iOS,a custom Action extension uses a template image version of its
containing app’s icon,which you must provide.iOS Share extensions automatically employ the containing app’s icon.
If you provide a separate icon in your Share extension target,Xcode
ignores it. For all other app extension types,you must provide an
icon that matches the containing app’s icon.For information on how to add an icon to your app extension,see
07003 and 07004 or Launch Image
Set. For more about icon requirements for iOS app extensions,see “App
Extensions” in iOS Human Interface Guidelines
编辑2:
在您的扩展程序文件夹中创建一个AppIcon图像资源,并在该集合中添加您的图标,并在您的扩展程序和应用程序目标中引用该资产.
还要确保您的扩展程序图标具有完全透明的背景,而不是纯白色.除透明之外的任何颜色将显示为实心深灰色.