Wrong Icon Installed by Xcode - ios

I have been pulling my hairs for the past few days. It appears I am the first one who has experienced this problem because I could not find anything that is even close through Internet searches. The problem that I have experienced is the following:
Icon for retina iPad of iOS 6.1 and prior (size 144x144) and Icon for iPhone of iOS 7 (size 120x120) are not installed correctly. If I use asset catalog, when installing my app on iPad (retina) with iOS 5, the iPhone icon (120x120) is installed. iPhone with iOS 7 works fine using the same icon (120x120). If I don't use asset catalog, but instead add the icons to the info.plist (CFBundleIcons array), it goes the other way around. iPad icon is fine this time (144x144 icon was installed). But iPhone uses the iPad icon (144x144).
What's more strange is that this is not a problem with one of my two targets. It is only a problem for the second target. The second target was created by duplicating the first one. I have compared the info and settings of the two projects, but did not see any difference (other than bundle identifiers and product names etc., of course).
I've upgraded my Xcode to 5.0.2 and that makes no difference.
I'd appreciate it if anybody could shed some light on this.
Update #1: I tried to use the icons from the first target and the problem is still there. So it's not related the icon png files. It's target related. Also tried to clean the project, delete the app from the devices to no avail.
Update #2: When I use plist instead of asset catalog, what's (incorrectly) installed on my iPhone (iOS 7) is not the 144x144 icon. It is 144x144 icon for iOS 6.1 and prior. It's still an incorrect icon.
Update #3: This is actually easy to reproduce. I created a cocos2d project from scratch this time (the Hello World project). Tried to add all the icons using the two ways introduced in the following technical article from Apple:
https://developer.apple.com/library/ios/qa/qa1686/_index.html
When using the asset catalog, 120x120 icon was installed on my iPad (retina) with iOS 5.
When using the project editor, 152x152 icon was installed on my iPad (retina) with iOS 5.
In both cases, what is supposed to be installed is the 144x144 icon. Will probably contact Apple on Monday.

I filed a tech-support case with Apple and confirmed that this is a known issue (as of 02/10/14). I open a bug report with Apple. This issue is not noticeable for most people because icons are all resized from one design. Even though the wrong icon is installed, it is barely noticeable (the icon is still resized to to the correct size on the device automatically). This is noticeable when you want to use different icon design on different iOS. For example, the icon curvature for iOS 7 is different. There is no workaround according to the Apple support.
Hope this is useful for anyone who runs into the same issue.
Regards,
Ryan

Make sure you don't have the older icons named with the an older version of Xcode's default icon names (Icon.png, Icon#2x.png, Icon-72.png). I have found that when these names exist, they are used even if other icon names are specified.

Try cleaning the project. Command-Shift-K , that usually fixes such issues

Related

The icon of my iOS application is not displayed in iPads (but fine with simulators) [Swift, iOS, Xcode]

I am creating an iOS application for iPads with Swift 5, Xcode 13.1.
Last time I changed my icons by replacing images in Assets.xcassets. However, suddenly the app icon became not properly displayed on my iPad for some reason. Now the app icon is just a grid.
There are two weird things happening:
The icons are actually properly displayed when testing with simulators.
Then I reversed all of the modifications using GitHub, but the app still does not show its icon, even with using all files that used to show the icon properly.
I have tried:
rebooting my MacBook Pro and iPads (mini 6th & pro 11 inch.)
clean build,
made sure App Icons Source was appropriately selected
recreate new iOS app icon in Assets with Xcode
tested with other icon files that are confirmed to be working with other apps
re-install Xcode
Tried with my iPhone
However, none of the above solved the problem. I would appreciate it very much if I could know what is happening and how I can show the app icon properly.
Update!
I updated iPads and iPhones to iOS 15.1, and the problem was solved... temporally. When changing the icon files, I realized that the icons were not displayed properly with iPads but not with iPhones and. All of the simulators stopped displaying the icons properly. Further playing with Xcode, I realized that include all app icon assets was ticked, so I changed it to ticked and vise versa. This appeared to cause the problem..., But honestly could not replicate the problem that clearly!
Currently, the changing icons are appropriately reflected in my iPad Pro 6th gen, but not in my iPhones. Simulators are not showing icons appropriately either!
I would really appreciate it if somebody could explain what is happing to me.
I updated iPads and iPhones to iOS 15.1, and the problem solved completely!! Now all icons are displayed properly.
Update 1
The above solve the problem... temporally. Then, further playing with Xcode, I realized that include all app icon assets was ticked and this was causing all of the icon problems.
Once I ticked off include all app icon assets, I was actually able to change the image files from Assets and reflect it on my app.
Update 2
When I reopened Xcode again today, for some reason, all simulators displayed icons properly. iPhones and iPads are working fine as well. include all app icon assets does not SEEM to have influence now...?
I honestly have no idea.. But, I could say if somebody is struggling with the same icon issue, updating everything might change the situation...

Xcode is complaining that I need an icon for an iPhone 7 but there is nowher

I am so confused!!!! I've created an app which works great on all IOS phones and iPads but Xcode is complaining that I need an icon for iPone 7. It's stating that it wants an icon of 60x60#2x. OK....lets add it...I've gone into Assets--> Appicon and there is no place to add the icon Xcode is complaining about. On the iPad the icon is visible but on the iPhone 7 it's blank:
As you can see from below there is nowhere to add it:
Where do i put the image?
This is the warning I'm getting:
Blah/Blah/Blah/Assets.xcassets: A 60x60#2x app icon is required for iPhone apps targeting iOS 7.0 and later
Because I've got an old iPad which cannot be updated above IOS 9.3, I'm wondering if this is the indue?
I've set the Deployment Info like so:
Deployment info
Any help you can give will be appreciated, and I will take abuse if it's something simple, but being team players I'm sure that won't happen :)
My name is Alex by the way and I've only been coding in Swift for 3 months, so go easy on me :)
Alex
You have no iPhone icons in your assets at all according to your screenshot. It looks like you originally created the app for iPad and went universal later?
With the app icons open in your asset catalogue, open the inspector on the right hand side (see this SO answer for an image - different problem, same solution) and check the empty boxes to get spaces to add appropriate app icons.

Launch Images not displaying after updating to Xcode 8.2.1

I downloaded Xcode 8.2.1 as I had updated my iphone to the latest version. I ran xcode and updated the current app I'm working on to the project recommended settings upon first opening of my project (This pops up after new version of xcode). After this I tried to run the project on my device (iPhone 6) and it simply loads an enlarged app icon instead of the iphone 6 size launch screen which I have in the Images.xcassets folder. Annoyingly I tested the app on the simulator (iphone 6, 10.2) and it works completely as it had been doing prior to xcode 8.2.1.
I'm at a complete loss as to what could be the problem: ive tried everything from restarting xcode, cleaning project, deleting and re-adding launch images, and made sure the launch screen entry was empty as I don't use them (removed the option from the plist as well).
Everytime I run the app on my own device, it crashes and is looking for a completely different storyboard (I use multiple storyboards for different screen sizes, which is a lot of work but works for me) and thus its telling me that there isn't a launch screen for the iPhone 6 screen size it has detected. But obviously there is as it works on the simulator.
Anybody have any reasons as to why this might be? I'm thinking it could be a bug on behalf of xcode 8.2.1, a lot of other users seem to be having odd problems as well with this version. For further clarity, I opened up another project but didnt update it to the recommended project settings that xcode displayed again, I ran the app on my device and hey presto! It worked with no issues.
Is there any way of reversing the update to the recommended project settings?
Here also Same Issue, i upgraded to 8.3:
Ans: remove "Launch Screen Interface file base name" from plist. it will work.
Solved: The solution was simple and I wasted 5 hours on it. All I had to do was (1) remove the launch images from the xcassets folder, (2) rename launch images without .png extension and (3) I simply added them back into the Images.xcassets folder and ran the app again, this time it worked and showed the launch image correctly.
This might save someone hours of agony as I didn't think Xcode would be funny with a file extension such as .png

How to set app-icons in XCode 5?

I am using XCode 5.
I am properly setting up all app-icons in proper size and resolution.
When I run the app in iPhone Simulator, the app-icon displays correctly. But, when I change the simulator from iPhone to iPad, then the app-icons does not appear.
What could be the root cause of issue ?
Few Tests
Make sure you have set the icons for iPad as well.
If you have, you can probably stop the project, quit the simulator manually, clean, build and run the project by selecting iPad Simulator.
Make sure you have all the icons set -ie- iPhone and iPad specific. Following is the checklist for the same:
App Icons
Splash Screens
Hope this helps !!!
Icon size for iphone and ipad differs. Check here for apple's documentation
Click on project name.On the right side click General Tab and check whether you have added icons of correct resolution or not.
Icons for Universal Apps
Universal applications use the following icons. Items marked with "Required" must be included.
In addition to the above icons, universal applications with a deployment target of iOS 6.1 or earlier use the following icons. Items marked with "Required" must be included if the application's deployment target is iOS 6.1 or earlier.
more detail https://developer.apple.com/LIBRARY/IOS/qa/qa1686/_index.html

IOS-Simulator in Xcode does not show iPhone -like but regular window

It used to work properly, with 100% as well as 50%. Then I did not use the simulator for some time but only the console, having moved the simulator almost out of site. Now I need it but realize that instead of an iPhone surface just a regular window is shown, like in this thread:
XCode iPhone simulator does not look like an iPhone
I read lots of proposal I found on the web to this problem and followed the advices.
So I changed the size to 100%, tried different iPhone devices. And finally I deleted the Xcode application from the application folder and removed all remaining items by putting in the order
sudo /Library/uninstall-devtools --mode=all
into the terminal.
I downloaded Xcode again.
The problem is still there.
The very strange thing about it: It did work properly when I installed Xcode for the first time, about 6 weeks ago.
As far as I know it depends on the deployment target whether the simulator shows the iPhone frame or not. I think if you set iOS 7 as the target you won't be able to see the iPhone image around your app screen. (For example, I have never seen an iPhone image in the simulator for a 4'' device.)
Try changing the deployment target and play around with different devices under Hardware / Device in the simulator.
Edit:
Here is a more detailed answer.
It's one of the replies to the question that you linked.
You better select your simulator and set Hardware -> Device -> iPhone
Note 1: If you want the simulator should looks like iPhone do not select the retina simulator.
Note 2: You must check the target version of you app in xcode it must be below 7.0
Note 3: Keep the scale of simulator always 100%.
Are you sure the current project you're working on is an iOS and not an OS X project? You can verify this be looking at the project's folder. If the app ist for OS X, there is most likely a .xib file. If it's a iOS project, there should be a storyboard file.
As the OS X apps use windows, like the one you described, this could be a hint.
I have found the solution for the problem I had (and other users as well):
At PREFERENCES / DOWNLOADS older versions of the iOS simulator are available. While at the moment the current version is 7.0 (beginning January 2014), versions 6.0 and 6.1 are being offered for download.
After downloading I could chose more devices than with version 7.0. Now also the non-Retina iPhone is available.
As a result, the iPhone surface is being displayed when set to 100% (at WINDOW - SIZE).
Thanks to everyone helping!

Resources