4

I have an app extension (Fileprovider-Extension) which Icon is not showing up when I change the FileProvider location (see screenshot). This only happens on Devices (also on the simulator) which iOS Version is 8.4!

enter image description here

I checked already:

  • Extension have its own images.xcasset-catalog
  • This images-catalog set an icon for all possible resolutions
  • The build Settings of the extension Target is updated to this Asset-Catalog also the Imageset that I want to have as Extension-App-Icon
  • The Asset-Catalog is already in the "Copy Bundle Resources"-Phase of the extension target

When I (initial) tap on the more button to manage my locations, I see (also on iOS 8.4 devices) the AppIcon from the Host-Application... that is really confusing me.

Another device running with iOS 8.1 shows an icon on that point but this is not the icon from the extension xcasset-catalog instead it shows the AppIcon from the Host-Application.

I also try the answers from this question: SO: Why isnt my ios8 application action extension app icon showing up but nothing helps me.

Can someone give me a hint what little point I looked over?

Community
  • 1
  • 1
matzino
  • 3,544
  • 1
  • 18
  • 37

3 Answers3

6
  1. In my case, I first added a new Asset Catalog set to my extension.

  2. In that Asset Catalog, I added an new AppIcon, using the + menu at the bottom. Note the name is: AppIcon

  3. I then added my images to the new AppIcon.

  4. Then under Targets, I selected my extension, then under Build Settings under Asset Catalog Compiler - Options, I added AppIcon to the Asset Catalog App Icon Set Name field.

Oak
  • 165
  • 2
  • 14
  • The only difference to my solution is that you named your image "AppIcon", in my project is it named with "Icon". I will try that if I come back to that project ;) Thank you for your help! – matzino Sep 22 '15 at 12:59
4

You have to add a separate Asset Catalog to your app extention, as your app and your extention are not sharing files.

Right click your app extention folder in the Xcode browser on the left -> New File... -> Asset Catalog (Resource).

Then add a App Icon to your asset catalog. Select asset catalog in the Xcode browser -> + -> App Icons & Launch Images -> New iOS App Icon -> Set name: AppIcon.

Last step: You have to set the Asset Catalog App Icon. Go to Build Settings of your extention and search for: Asset Catalog App Icon Set Name and enter AppIcon.

Done!

nice_pink
  • 435
  • 1
  • 3
  • 16
2

The best answer for the same as following :

  1. Select Project -> Goto "Build Phase"

  2. Expands the "Compile Source"

  3. Add "images.xcassests" of your mainProject

The bigest advantage of following above step is "Memory Management" + "Decrease Size Of Project Too".

Hope It helps...

Akshar Darji
  • 397
  • 2
  • 12