Xcode 4 Icon Problem ! - ios

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.

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.

Setting the App Icon (Xcode 7)

I have looked around and none of the other topics I found have addressed the error I am getting with my App Icon. When I try to run my app, it gives the error:
The app icon set named "AppIcon" did not have any applicable content
I'm pretty sure this is because I don't have the .png file in the right place but I can't figure out where to put it. It is currently listed under the project file.
Go to Images.xcassets add in AppIcon all icons sizes as Image below.
This app Prepo can quick generate the files to help you.

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.

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

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.

Xcode 4.1 Archive Build in organizer doesn't show icon

My application icon's work fine when displaying on iPad and iPhone, however after I build for archive, and create the archive, there is no icon shown. Any ideas? I've looked around at several forums and haven't found a resolution. I actually don't believe this has any effect on the actual distribution deployment, as the .ipa definitely has the icons bundled with it. I've loaded it directly into iTunes to verify that.
See screenshots below, I already have "Icon File" (CFBundleIconFile) and "Icon Files" (CFBundleIconFiles) defined.
Hate to answer my own question, though a light bulb just went off in my head. Within Xcode 4 organizer archives, applications are grouped. As in if you archive 5 versions, you select the application on the left pane, and than the 5 versions show on the right pane. This lead me to believe that it's not actually the application icons that are used to show the grouped application on the left pane, but the actual iTunesArtwork file. So I added it to the CFBundleIconFiles collection, and it worked!
I think it's because you don't have the 512x512 iTunesArtwork file.
You have an empty entry for CFBundleIconFile. If you remove it completely it should work.
Icon handling in the Xcode Organizer has been a bit buggy in the past, so I wouldn't put too much stock in it. Just make sure the icons are displaying correctly on the actual platforms you intend to ship on.

Resources