Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Its just impossible to add an action extension icon

Tags:

ios

ios10

I've been literally trying for two weeks to get an icon for an action extension to appear, but absolutely nothing works.

I've seen past questions such as this iOS 8 Action Extension icon sizes and this Why isn't my iOS8 Application Action Extension App Icon showing up? but they are of no use.

I've created an Xcode template project purely to try every combination of things mentioned in the other questions, still without avail.

1) The first thing that's mentioned is that the action extension should have its own asset catalog, ok here it is:

enter image description here

2) Secondly that it should contain an app icon image set, here that is:

enter image description here

3) Thirdly people say they had to add its target membership to the extension and to the app. Here that is too (in all of these things, I've tried variations such the membership being just the extension, just the app, both)

enter image description here

4) Fourthly, people mention they had to add it to the compile sources, here that is, as well as it being copied in the bundle resources:

enter image description here

5) Some say it also needs to be copied in the container app's bundle, here that is, and for good measure its been added as a compile resource of that too:

enter image description here

6) One person says it was necessary to add the container apps assets to the extension bundle, I can't see how that would work as the icons in the container app are colored and not matching the requirements of the extension icons, but what the hell, might as well try everything right, and while we're at it lets add assets everywhere:

enter image description here

enter image description here

7) The asset icon itself is important, colored icons are not displayed, but I tried it anyway. A simple black and white image is described as the white parts appearing as grey but I've tried that anyway. Trying unsupported icons was just desperation and experimentation, of course I'm actually using an icon with a transparent background. When posted here it appears on this webpage as all white of course, but the non-black parts are actually fully transparent and have an alpha of 0:

enter image description here

But despite trying many combinations of all the various steps above, this is what it looks like on the device:

enter image description here

This is using iOS 10.n, latest 10.7 (it hasn't worked with any beta) and Xcode 8.6. If I download an app from the app store that uses action extensions then their icons are appearing, so there's no issue with the 10 beta. The issue is either something building the app with Xcode beta, or some step I've missed out - if that is the case, then what?

like image 863
Gruntcakes Avatar asked Aug 25 '16 22:08

Gruntcakes


1 Answers

Finally found out the solution - in order to get it to work its additionally necessary to set the Asset Catalog compiler options of Build Settings section of the extension to specify the name of the app icon set within the asset catalog:

enter image description here

How to set an action icon really is the most appallingly badly documented aspect of iOS, totally shockingly awful.

like image 158
Gruntcakes Avatar answered Sep 19 '22 22:09

Gruntcakes