App Icon not showing up, although I have added in Xcode 5 - ios

I have added the icon as shown in the pic below but I am still not seeing the icon in my device or simulator.

This might be an XCode 5 bug that the added icons are not actually included in the app bundle, but you can work around it by going to Build Phases, expand Copy Bundle Resources, then press the "+" sign in the bottom to manually add the icon files to this category.
In addition iOS 5/6 seems to have a bug that the screen doesn't update the app icon even if the icon files are included in the bundle. To work around it (as suggested by josema.vitaminew at App Icon not changing when app version is updated in iOS 5 simulator) you can drag the app icon into a folder, then iOS will update the appearance of it.

If using the Asset Catalog, it might be worth also checking whether Images.xcassets holds all your targets as shown in the below image.

Expanding on adp's answer, if anyone has switched to asset catalogs but they stopped working, and still can't find a solution for Asset Catalog, Images.xcassets, AppIcon or LaunchImage not working, here is a reproduction of the same problem I encountered, and the solution:
I had upgraded to Xcode 6 and opened a project created by an earlier version (4 or 5, not sure) and no matter what I did, AppIcons and LaunchImages absolutely would show up when I ran the app in either iOS Simulator or the device.
I tried Xcode->Product->Clean, Xcode->Window->Organizer->Projects->Derived Data->Delete..., relaunching Xcode and the iOS Simulator, then rebuilding and relaunching the app (failed).
I tried "Reset Contents and Settings..." in iOS Simulator and even deleting ~/Library/Developer/Xcode/DerivedData//Build/Products/Debug-iphoneos and relaunching the app (failed).
I tried archiving the project, hoping that it was just an issue with the iOS Simulator, but the icon in the Organizer-Archives window was still shown as the default white square with lines, confirming that the icon would also not show on a device (a helpful trick to have when no device is handy). (failed).
I tried choosing "Don't use asset catalogs" in Target Settings and creating a new AppIcon-2 and LaunchImage-2 (failed). -this is what cost me at least 2 more hours, because this should have worked and the fact that it didn't revealed the bug in Xcode but I just couldn't see it-
I tried creating a new project from the single view template and compared all of the Info.plist settings (failed).
I tried comparing the new project's Contents.json with mine in Images.xcassets (failed).
I tried dragging the images from the left sidebar Navigator into the AppIcon image wells, hoping that they were just not being copied in a build phase for some reason (failed).
Finally in exasperation at the thought of having to create a new project just to fix the icons, I tried deleting Images.xcassets in the left sidebar Navigator and choosing "Move to Trash", then quitting Xcode and relaunching in case it cached anything. Then when I went to click the App Icons Source popup menu, it only showed "Don't use asset catalogs". I had to select it in order to bring back the "Use Asset Catalog" button. Then I was able to create new AppIcons and LaunchImages, drag images to the wells, build and launch the app in iOS Simulator and finally see icons appear properly.
So the problem appears to be with how Xcode stores Images.xcassets inside the project, and not with target membership, derived data, or anything in Images.xcassets itself. You must remove your assets file and create a fresh one, then drag images to wells by hand again.
It took me 3 hours of research to solve something that should have "just worked" and the entire process of having to manually create individually sized art assets has been so tedious over the years that it has personally cost me countless hours of busywork.
Hopefully this bug workaround helps someone avoid the frustration I went through. I can't help with the friction of manually sizing art assets, but I highly recommend the Icon Slayer website to automate that (of which I have no affiliation).

I have encountered the same problem when the project is switching from xcode5 to xcode6 . The solution is just click on the icon in the image asset,open the right panel , just tick the iOS version option in the panel,add the icons that are blank run it again ... It worked for me

I want to add my solution, where the problem is only isolated to the iPad, my app icon will not show only for iPads. After trying all the solution above, and I looked in the info.plist and found this flag that was not there before the problem with iPads. A new key/value has been added called "CFBundleIcons~ipad" without my knowledge and had nothing as it's value. Removing the key helped resolve my issue.

According to Apple Docs, the icons must be placed on the root level of the app files.
IOS/Xcode will not go under directories to search your image.
Solution is to move the images onto the root of your application i.e. where your source files are, or you can create references in the same way.
Regards
Heider

In my case, I just needed to clean and rebuild my project.

I had the same problem and after a couple of hours finally I could resolved it, copying an old -info.plist from one of my backups project and replace it, this works fine for me.
Regards

My issue ended up being I had used jpg images, rather than pngs.

For me, it was a much simpler solution than the others listed here. I had simply got the assets the wrong size. I had not paid attention to the multipliers that are necessary (e.g. 2x or 3x) and therefore the build was generating a warning for the incorrect asset sizes (which I had ignored). In my case, I corrected the image sizes and voila they appeared in the simulator.

For a macOS/OSX application, you also need to always add a 128 pixel size (and 2x), you can not only use a 512 pixel size and expect it to size down.

If your app icon has any transparency then it won't work. Check it!

I had all the images in the relevant folders and when I right clicked on the empty icon image in Images.xcassets/AppIcon and chose show in finder it would find the image correctly and show it, but for whatever reason it wasn't adding correctly to the project.
After trying a lot of different things above I simply dragged the images from finder into the AppIcon area and it worked.

If you are using cocoapods be sure to check this answer from a related question. After many lost hours, this is what fixed it for me.
https://stackoverflow.com/a/46349476/1343140

Xcode 9.3:
Open your project and add AppIcon images.
Click on general, go to "App Icon and Launch Image"
Click "App Icon resource" and add AppIcon (In my case it added AppIcon-1, so you can use that on rename that and do above step again).

In my case, I updated Build Rules > Using > to "Asset Catalog Compiler"
instead of any custom script and it worked for me.

I had this issue. Following the steps everyone provided did not help. However, it was because of my own ignorance. I had an issue with duplicate resources being created and one of the suggestions was to remove items from copy bundle resources. Well, it never mentioned that the asset folder was required to be in there so I deleted it. After fighting with this issue for 5 hours and recalling that it use to be in copy bundle resources I added it back and the app Icons worked.
Xcode copy bundle with appropriate file included.
make sure you create your appicons with an image 1024x1024
make sure you set 'app icon source' (project > general > App Icons and launch images) to the appropriate icon folder.
make sure you have not deleted the copy bundle resource for said app icon folder like i did.
cocoapods has a forum for a specific issue if all else fails.
Hope this helps.

Related

The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels

I've looked at other questions with the same issue and did what was suggested in them but keep getting the same error.
I've dragged 120x120 file into my project, cleaned, built, archived, same error.
I've dragged 120x120 file into the asset catalog manually, cleaned, built, archived, same error.
Here's a pic of my asset appicon:
There is no drag and drop for 120x120. Where am I suppose to add it?
Thanks
Dont drag images in asset.
Go to this link - https://makeappicon.com
Upload your 1024 image, it will email you the icons for iOS and Android as well.
Just copy and paste AppIcon.appiconset file into bundle.
You probably have already solved this, but I'd like to share an observation about this topic as I'm currently struggling with the same problem.
When you generate an app icon set with tools like makeappicon.com, chances are that not all possible icon variants are created. For example, old icon sizes (for iOS 5/6) are probably not produced.
In Xcode's assets editor (at least in Xcode 8.2.1) you only see the slots for which an icon is provided; for me this led to the misinterpretation that all possible icons are present. However, if you manually add an empty icon set in Xcode ("+" -> "New iOS App Icon"), you will see that there are more possible slots then are filled by the icon tool.
In my case the problem was that the deployment target was set to iOS6, but some icons required for iOS6 were not included in the icon set; so I created a new, empty icon set, manually dragged in the files which were created by my icon tool, and then created the missing icons by hand.

Launch Screen storyboard not displaying image

I'm trying to get an image to display as the launch screen from my Launch Screen.storyboard file, however the image never displays. I have labels that show up fine, but the image doesn't appear.
This is how the launch screen looks in the Launch Screen.storyboard file:
However when I run the app on the simulator (as well as on the physical device) this is what shows up:
As you can see, the label "Test" shows up fine, however the image does not display. I'm really not sure why this is happening and nothing I try seems to work. If anyone has any ideas of how to fix this it would be greatly appreciated.
After restarting Xcode, cleaning the build and a number of the other suggestions on SO about this problem. What actually fixed it for me was a hard reboot of the device. (I wasted over an hour on this)
I suppose it just goes to show that the old saying have you turned it off and on again is still true for the latest gadgets!
How to reboot iPhone XS or iPhone XS Max
Quickly press and release the Volume Up button
Quickly press and release the Volume Down button
Press and hold the Side Button until the Apple logo appears
I was messing around with this for hours too. But i found the solution now. You need to add the image to your project and also to the assets.xcassets via drag and drop.
Had the same issue, adding the image to the "Build Phases -> Copy Bundle Resources" fixed it for me.
Follow below steps,
Remove application from the device
Restart device
Build again
If not working, delete derived data. Xcode Preference->Locationtab->Derived data. Then do follow above steps.
Very frustrating. Solution that finally worked:
Do hard reboot of device
Delete app
Install app from Xcode
It happened to me and makes me crazy, beyond get me lose some minutes 'til I figure it out.
So, like was said before:
Import the desired image to your Xcode project (just drag and drop it)
Change its Constraints and Alignment
Update frames resolving Auto Layout issues
In the Attributes inspector tab menu (generally in right corner menu xCode), on Image view > Image, remove image extension (.png or .jpg) - that's the trick
On the design screen, it will not appear, but when you run your app, it will be shown.
I hope it can help!
At last, restart the phone works for me!!
I have spent hours on this issue. Had tried change the images name, delete the whole image assets, modify info.plist, restart Xcode and even tried to set all the attributes of the images(which you can tell how desperate I was).
After invested a lot of time, I got the solution:-
Step 1:- Quit Xcode
Step 2:- Delete the app from device/simulator
Step 3:- Restart your device (if you are using simulator then you have to quit simulator)
Step 4:- Clear all derived data
Step 5:- Clear Bin
Step 6:- Open Xcode and relaunch the app, it will work
I faced the same problem.
Add an new imageset to XcodeAssets.
Add images to to the imageset.
Add image view to launch screen and set your imageset as image
On Imageview's attributes inspector, uncheck 'clears graphics context'
Clean the build folder and run again.
This issue is related to the Assets.xcassets to fix it you must add the image as resource but not in the xcassets folder and then should work just fine
In my case, resetting content and settings for simulator fixed the problem.
After trying everything on several StackOverflow threads, here's what worked for me:
Use a .png
Do not include it in your Assets catalog. Add it to your project's hierarchy directly, as you would add any source file.
In the image view, load the image including its extension. Example: launch_app_image.png
(Might have to clean product or derived data to update, but I didn't have to)
It seems there is some problem with resource caching in xCode. Had the same problem, restarted xCode and everything works fine after that.
Restart your device and clear x-code derived data
I had that problem after adding image to project and shotdown the device the problem solved
Was changing the background image of the splash screen and the new image wasn't showing (react native project).
Following the answers from others.
I did all the below and it was fixed:
Clean build.
Remove app from simulator
Quit simulator
Restart XCode
Run app again
Well As of now there is retina device available and I ignored #1x image in Assets.xcassets.
In my case, I have app logo in Splash screen which is not visible when I run the application.
After wasting so much time I figured out that I only provided #2x and #3x images for that logo image.
This issue is resolved by adding #1x version of that image.
In my particular case, the splash screen worked for the simulator and other devices, but stopped working for one specific device. This lead me to believe that it was some caching data kept by xcode (v10 and iPhone 7 v12.1).
I deleted the derived data at: ~/Library/Developer/Xcode/DerivedData/ only emptying the folder contents, not deleting the folder. I then rebooted the mac and the iPhone and cleaned and rebuilt the project, and now it is showing up.
I'm not sure if all of this was necessary, but didn't want to waste any more time narrowing it down, so the above sledgehammer approach worked for me. But of course it always depends on your specific situation - mine was device specific; for others it could be the actual image or launch screen layout etc.
Actually, for some heavyweight images, it isn't a good situation to add them into images.xcassets, because the app loads images.xcassets lightweight images before launch. So I put splash screen images at the first root of load and then the issue has gone:
Create a new Group in the root of the project
Drag and drop your image inside of the yellow group folder
Rename it to a different special name
Back to your xib (or storyboard) file and address the ImageView to the special name that it is in step 3.
Clean and build again, then you can see your image.
Hint: You can create your ImageSet in the images.xcassets but place them in the root of the project.
Importing images as regular files worked for me. Don't add image from assets catalog!
You have to make sure that the file name of your image has a format like .png or .jpg at the end otherwise it will not work. Also, before adding your image, you have to make sure that the image file is in your "Assets.xcassets" folder within your project. This can be done with a simple drag and drop. Also, make sure when you've added your image to your storyboard that the image name in the top left also matches the real image file name. I would try looking into Constraints too. Hope this helps. Good luck with your App.
I tried so many things with this (this thread alone seems to have a million ideas and half of them are conflicting). The problem for me was that when I did things like restarting the device and Xcode, it would cause the image to show for a few sessions of the app, and then it would stop (I have no idea why, but WOW it was annoying).
After countless hours, I found that A.G.'s answer in this thread is the correct one. The one thing I was doing wrong was that I was creating a new image set within xcassets, but I was then still using the name of the image within the UIImageView inside of the storyboard instead of using the name of the image set.
To clarify, what you would do is create a new image set and name it something like "Launch-Defaults", and then add your images to it. Then, within the UIImageView inside of the storyboard, you use the image "Launch-Default" (not including an extension since there is none since this is an image set).
When you do all of that, the image should actually appear correctly inside of your storyboard. Some people say the image will display blank if you don't use the extension (.jpg or .png), but I assume that is because they are not using the name of the image set. Others say you need to use an extension like .png or .jpg, but the key is to create the image set inside of xcassets and then use that image set inside of the storyboard. When done correctly, there should be no funkiness like an image not showing up or the Launch Screen only working some of the time (requiring a reboot).
Just to add my $0.02 to this question; I got this solved by using PNG images instead of JPG/JPEG images.
After converting the images to PNG and crunching them to reduce the size a little, everything worked fine.
My issue.
Reason: I have renamed the images after dragging into Xcode.
Solution: Don't rename images after dragging into Xcode. It creates problems for understanding Xcode. Rename images before dragging/adding into Xcode.
Hope it helps you out!
I spent hours on this problem before finally realizing my mistake. When you add an image to a UIImageView, it will use just the name of the image. If your images are in a different folder than your storyboard, they will show up in xcode but not when running the app. You must add the appropriate file path prefix, for example, images/image.png. It will now appear as a blue question mark in xcode, but it will work in the app.
I faced the same issue. Tried different solutions for that but nothing proved to be helpful. I then realised that the image was not visible only when i directly installed the app into device and the app is still connected to the xcode. If i disconnect it and then open the app the image was visible as expected.
It might be a xcode bug.
I tried cleaning the project, removing the png, removing the constraints did not work for me.
I just made one more copy of the image and renamed the copy then deleted the old image and added the new image (Same, with name changed) i just gave that image and it worked for me.
Also i am not using the Assets.xcassets, using the image in a folder.
My first mistake was, that I created a normal .storyboard, renamed it and defined it as launchscreen in the project settings. I this case I had image problems. It seems that some settings are missing in this case then, so I just created a new file via file->new and picked directly the "Launch Screen" and then it worked.
Also I had in mind that, that layout constraints are not supported in the launchscreen for some reason. Maybe it was like that in the beginning, not sure, but now constraints should work.
Maybe this helps anyone.
In my case, it was a bit more than just rebooting the device.
My launch image was stored in other Assets (Other Pods).
Had to move the image to App project's Assets.
And then rebooted my device. (Check simulator first, it should work).
Then it worked.
Images can be in format png/pdf, single scale or not doesn't matter.
I was stucked into same issue thanks to the below reference I am able to resolve the issue
https://developer.apple.com/forums/thread/19759?answerId=75438022#75438022
Though it is not necessary to change the image name and removing the extension while selecting the image for imageview, I simply created one folder named resources and added my image inside that folder coz I thought it would be not good to put images directly into the root folder
Hope this would help.
Happy Debugging!

Launch Image not showing up in iOS application (using Images.xcassets)

I'm having some trouble getting my launch image to show up in my application.
I have created all the static image files in the Images.xcassets file in an asset set called "LaunchImage".
I noticed that my project also contains a LaunchScreen.xib file (which was automatically created by Xcode).
This .xib file appears when I run the application on my iPhone6 device. It doesn't appear in the simulator for iPhone4s (which makes sense, since xib launch screen is only for iOS 8 +).
I want to use the static images that I have created since they fall under the Apple Guidelines and go with my application. However, I haven't had any luck at getting it to show up.
I noticed under the project settings that there is a section called App Icons and Launch Images. I see how the .xib is connected by the Launch Screen File option I assume.
However, there is an option called Launch Image Sources. What does this do?
I found this: http://matthewpalmer.net/blog/2014/09/10/iphone-6-plus-launch-image-adaptive-mode/. However, it didn't explain anything about the Launch Image Source option.
There is a button next to the Launch Image Sources called "Use Asset Catalog". When I click it, it just says Migrate Launch Images to an asset catalog. Your existing launch images will be copied into a new image set. Choose an asset catalog to use: .
This is confusing to me because I've already created my asset catalog and I definitely don't want it to overwrite images.xcassets file. So, how do I link this to the Launch Images Asset Set that I already have created? Also what "existing launch images" is it referring to will be copied into a new image set?
Thank you!
UPDATE 1
So, I tried the migrate images option and chose to the new set option. This caused a new image set to be created which I deleted. However, the name left in the Launch Image Source was set to LaunchImage which somehow connected to the image set that contains my launch images. It did mess up my LaunchImage set -- the images were set to unassigned. I deleted them and dragged my files to the appropriate box in the LaunchImage asset set. However, when I run the application it still doesn't work. =( Launch Image doesn't show up.
I even removed the information that was in Launch Screen File (which my assumption was the setting that connects to the .xib file). Still, somehow the .xib file appears on my iPhone6 device. =(
Any ideas what's going on?
I had this problem. I tested on simulator. I left the "Launch screen file" blank and removed the line about the "launch screen file" inside the plist. I restarted Xcode. Nothing. In my case in was not black it was white. Xcode 7 target ios 9.
i read this one as well: Launch Image does not show up in my iOS App
The launch image only showed up when i deleted the app from the simulator and run the app again.
I finally figured it out!
So, in your project settings, go to the section that says: App Icons and Launch Images
Remove the information found in Launch Screen File if you do not want to use .xib file.
Then, in Launch Image Source, Choose to migrate and if you have already created your LaunchImage file and added the images to it. Then click the asset catalog that shows up. The name of the one that contains your Launch Images.
This will create a new Launch-Image2 in your image set. To use the one you already have created, click the drop-down menu next to Launch Image Source. And you should see your other Launch Image set. Choose it. Then re-build your application and run it. You should see your Launch Image. =)
Hope this helps!
Note: it won't delete your images that you already have in the asset catalog. It will just create a new LaunchImage asset set.
Reference: https://developer.apple.com/library/ios/recipes/xcode_help-image_catalog-1.0/chapters/StoringAppIconsandLaunchImagesinanAssetCatalog.html
This is too important !
should be empty ! Launch Screen File
Working solution. Saved my time and hope it will save yours as well.
Make sure your images are accurate size according to Apple Guidelines.
Make sure, You will select only one option , either launch screen file or Launch Image Source. You can find these two options in Project build settings -> General
Clean and build.
Recommended solution step by step:
Create splash image assets (name as LaunchImage) there in
Image.assests folder.
Select LaunchImage asset in Launch Image Source option.
And Clear the text in Launch screen File option.
Clean and build.
Below is the reference image for right configuration:
I had this problem in XCode 9.4.1, turned out to be caused by the assets folder not being included in the Bundle Resources.
Select the project, then your target. Go to 'Build Phases' and open up 'Copy Bundle Resources'. If the .xcassets group you want to use isn't listed then just drag it in from the file browser.
Worked for me...
After few hours of unclear answers:
1) go to setting app General section in xCode.
2) Scroll down to App Icons and Launch Images.
3) Clear Launch Screen File (just leave it blank)
4) Set Launch Images Source to LaunchImage (remember to create them in Assets.xcassets)
Now app will use images You set in LaunchImage.
Had a similar issue today. Tried to let xCode create automatically the Asset, but it was always unassigned.
The solution was to create manually the Launch Image in the ImageAsset and assign the files for his respective resolution.
It looks like xCode created a different type of Launch Image asset, so it didn't
recognized the asset (v8.3.2)
Solved! I've tried a lot. The problem was that the launch image shows in simulator and didn't show in real device. I got a Storyboard with UIImageView in it. Strange was that old images worked, and images, that i did add recently not. First i thought that this is a problem with assets. No. Than i checked color profiles and did a lot of tries with different profiles: left-working image, right-not working. Didn't help.
Then i started google and found this thread
Main solutions from here:
1) Didn't helped for me.
Change image property of my launch image using Preview app: [ Tools
--> Assign Profile... --> ColorSync Profile: <> ]
2) Helped
Even deleting the app and re-installing from XCode doesn't work.
However, changing the bundle ID does work. With no other changes, the
existing bundle ID shows no images, but the new bundle ID shows them
all correctly. I'm doing that as a temporary work-around, since a
previous post in this thread suggests that installing the builds via
TestFlight doesn't encounter the problem.
3)
I did three things (the first two on their own didn't do it, but may have assisted the third which did work)
1) Copied all of the images to the root directory (same location as
xcode puts the images)
2) Created a folder in Images.xcassets and put the images in there.
3) The images in the launchScreen.xib were originally called
imageName.png. This was changed to just imageName (remove the file
extension.
After the third thing the images appeared. I don't know if either of
the first two steps are required, but hopefully it will help someone.
4) Helps but old and rude
Taking the images out of the asset catalog fixed the problem for me.
I just added the #1x, #2x, and #3x image used on my launch screen to
the project the old way and it seems to be working fine. Trying to
confirm it through TestFlight now, but iTunes Connect isn't behaving
at the moment.
I thought this is an iPhone cash problem. So you don't need to warn about it thus the image will show when installing with testFlight. After this conclusion i did next and that worked:
1) Uninstall app
2) Reboot phone
3) Build app to the phone
I just figured this out. My launch image was not showing up, I get a white screen when launching on a device (iPhone 6, 7+) or testFlight. Fix: Renamed "Landing_screen.png" to just "Landing_screen" removing .png part. https://stackoverflow.com/a/43592662/3445278
Close the simulator & open it again worked for me
I have face same issue.
In splash screen image is not displaying but other thing like label and view are showing up correctly .
To fix issue first verify all of the above settings in your code. If nothing works then Restart the iPhone solves my problem.
Hope it is helpful to someone here (Happy to help) :)
I've just spent a little while on the same problem, but found the answer, and put it into a Youtube Tutorial
Create your ArtWork Image. 1024x1024 that conforms to Apple's requirements for Appicons and LaunchImages
Set up a folder to hold your newly created Assets.xcassets
Open Asset Creator Pro and drag your new image into it.
Do your app icons first, putting the created file into your new folder.
Using the SAME image, select LaunchImages next, and "Append" the created set into the new, existing Assets.xcassets
Open your XCode project, and delete the eisting - probably empty - Assets.xcassets folder. If you have other files in it, then just
delete the Appicons and Launchimages sets.
Drag your newly created Assets into the XCode project, making sure you set the option to Copy the files. Sometimes this can be off!
beware.
check what's in the cassets, you should see your new images.
Make sure the line Launch Screen File in your Project settings is BLANK.
Make sure your LaunchScreen storyboard is BLANK. Anything in there and the images wont load.
test it.
Watch the video.
should be empty ! Launch Screen File
it worked for me
Its working fine for set Launch Image:
Go to setting app General section in xCode.
Scroll down to App Icons and Launch Images.
Check Launch Screen File in settings page
Set Launch Images Source to LaunchImage as storyboard file(Set image in Launch screen) (or) You create a own launch image Xib file.
Note:
Now app will use images You set in LaunchImage.
Close the simulator & open it again worked for me
Clean Build Folder
Close your xcode and reopen it
Adjust constrain for the UIImageview
Check Launch Screen File in settings page

iOS 8 action extension icon is blank on device (works in simulator)

Edit2:
I've distilled the problem down to the simplest project I can. Here's the setup.
I created a new single view app and immediately added a new Action extension target. I created a new icon set in the .xcassets file and added an iPad retina sized icon (I've tried filling in all the icons, the results are the same).
I made sure to include Images.xcassets in the Copy Bundle Resources build phase:
And then when running the app in the simulator everything works!
Compiling to device however results in a blank icon:
I thought maybe that means something is wrong with the PNG file I'm using, but everything looks OK here too:
Has anyone encountered similar?
I've already visited questions like this looking for an answer and I think I'm doing everything right but I'm still not seeing an icon in the action sheet.
Here's what I've done:
Created a working container app that has a working app icon stored in Images.xcassets. Then I created an Action Extension Target as a member of the same project.
Added Images.xcassets from my containing app to my extension's "Copy Bundle Resources" build phase. I know that this worked because I'm able to load images from the .xcassets file using UIImage.imageNamed(...) in my extension.
In the General Tab of the settings for my extension I've pointed the "App Icons Source" under "App Icons and Launch Images" to point to Images.xcassets's resource called "AppIcon", the same used for my containing app.
When that didn't work I did some further reading and discovered that Action Extensions require an "alpha mask" style image. I created another item in my .xcassets file called "AppIcon-2" and populated it with all sizes of app icon, except as a 1-color + transparency PNG. I pointed "App Icons and Launch Images" of my extension to this new "AppIcon-2"
Still my action extension's icon is a blank white square. Are there any steps that I'm missing? Is there some very specific format the alpha mask has to be in? (I'm just saving as a .png in photoshop). Is there some very specific name the resource has to have in .xcassets?
I'm also confused by some of the answers (like the one linked above) which seem to imply that the issue is resolved by adding .xcassets to the build phase. Aren't most app icon's completely opaque? How does iOS generate an alpha mask from a completely opaque app icon?
Edit: I'm not entirely sure what change made the difference (I'll try to deduce it and update this post if I figure it out) but I'm now seeing a working icon based on the alpha mask of "AppIcon-2" on the simulator. I hadn't even thought to check the simulator but it does prove that the icon is being pulled from the correct place. Something about the device is processing the image differently.
EDIT: Apple Fixed this issue in iOS8.1!
------------ OLD ----------------------
I think at this point, the answer is to submit a bug report to Apple at
https://feedbackassistant.apple.com/
If you can submit your barebones example project, that will help our cause!
Here's the one that I submitted:
Summary: The action extension icon shows well from Messages, and the
UIActivityViewController, but when it appears from the Photos App, the
icon is blank.
I think this is a bug with the Apple Photos App
Steps to Reproduce: Follow these instructions but from the Photos App
http://www.photoinvestigator.co/blog/how-to-use-ios8-action-extensions/
Expected Results: Expect the Metadata Extension's icon to appear
correctly as in
http://www.photoinvestigator.co/blog/how-to-use-ios8-action-extensions/
Actual Results: The icon is pure white
Version: iOS 8.0.2, iOS 8.0.0
Notes:
iOS 8 action extension icon is blank on device (works in simulator)
Here is an example of using my extension from Messages App, with the
icon showing correctly:
http://www.photoinvestigator.co/blog/how-to-use-ios8-action-extensions/
But doing these steps from Apple's photos app, results in the icon not
showing correctly.
Configuration: Any iOS device running iOS8. iPad 3rd Gen, iPhone 5,
iPhone 5c, iPhone 6 Plus
Attachments:
Edit:
They closed it as a duplicate of ID: Ticket ID: 17208813
Progress!
You didn't mention the extension's Info.plist settings, so I assume you didn't include an entry for the icon file. You'll need to add a key named NSExtensionServiceToolbarIconFile in the NSExtensionAttributes dictionary. The value is the name of the icon file.
At least that's how it's supposed to work. In practice it seems that you currently need to have a top-level CFBundleIconFile key with the icon's name. Supposedly that's only used if NSExtensionServiceToolbarIconFile isn't present, but at least for now it's necessary. I have both, which is probably not necessary, but I'd prefer to leave the key that's documented as being correct in place in case it starts working at some point.
I had the same problem. What worked for me was to follow Tom Harrington's answer, but then also make sure the 'Target Membership' (right side pane) of the extension icons includes both the extension target AND the app target. (Under Build Phases, it should be listed under Copy Bundle Resources for both targets as well.)
Also, note that your extension icons must have a fully transparent background, NOT solid white. Any white, or any colour other than transparent, will be rendered as solid dark grey.
Hope this helps. Sorry, I wanted to add this as a comment to Tom's answer, but Stack Overflow wouldn't let me because of my reputation.
We have the same problem for our Yarnee App. But I figured out that beside Camera Roll, the icons work on other Apps, for example Dropbox, see this screenshot:
It feels a little bit like a bug...
To get this to work with my existing Asset Catalog, I had to add the following to the extension's Build Settings:
The name of the set in my Assets Catalog is "ExtIcon". I had tried setting the CFBundleIcon and the NSExtensionServiceToolbarIconFile keys in the info.plist for the extension, but had no luck. This actually seems to make sense since it is the same way that icon sets are linked to the container app, not via info.plist, but via the Build Settings.
Problem seems to be solved on iOS 8.1.

Xcode 4 Icon Problem !

My problem is:
Icon specified in the Info.plist not found under the top level app wrapper: Icon.png (-19007)
I've done exactly what Apple documentation says and I'm still getting this warning!
I have everything set, everything is in PNG, the size is correct, Info.plist has added Icon files with 6 items (Icon.png, Icon#2x.png, Icon-72.png, Icon-Small-50.png, Icon-Small.png, Icon-Small#2x.png)
I have tried all the ways which I found in different website but none of these solution work for me.
Anyone please help me? I didn't get this warning while I'm doing Debug build but this comes out when I'm doing Distribution build.
Previously I never encounter this problem.
Make sure that your icon is in the root of your project. Or you can select the app icon you want to use from the target's summary tab and Xcode will automatically copy the selected icon to the root of the project.
I had iphone and ipad icon.
First I removed ipad target.
I solved it, editing info.plist file manually and deleting no existing reference.
All very simple and quick, but difficult to find the solution.

Resources