Why isn't my iOS8 Application Action Extension

2020-02-05 13:03发布

问题:

My app icon is just a grey super ellipse even though I have specified a icon asset catalog in my Targets App Icons and Launch Images.

回答1:

The following worked for me creating a Share Extension, but I believe Action Extension will do the same. Note that in the case of an Action extension, you need a monochromatic version.

If you are using an asset catalog for your main application icon, you should be able to get the Extension to leverage that same asset catalog. The key for me was to:

  1. Select my extension and tell it to use Asset Catalog. Select the same catalog your main icon is using. The default should be AppIcon

  2. Select the image.xcassets file in XCode Project Navigator

  3. Check my extension so that it is included in the Target Membership



回答2:

Your asset catalog in your main application isn't accessible from your application extension as they are two separate applications bundles that can only share Frameworks.

You will need to create a separate asset catalog in your action extensions folder and reference that one in your Targets.



回答3:

EDIT: This worked for me for iphone but not for ipad simulator. Making new images (60x60 and 76x76) with only black and white solved it.

Add the image.xcassets to the extension target