Bug 16739 - iPad icons for iOS 6 and 7 (non retina) get interchanged
Summary: iPad icons for iOS 6 and 7 (non retina) get interchanged
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: 4.2.x
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: master
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2013-12-11 12:36 UTC by Andy
Modified: 2015-03-06 15:06 UTC (History)
7 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
iPad6.1.3 icon (220.06 KB, image/jpeg)
2014-01-06 12:31 UTC, GouriKumari
Details
iPad7.0.3 (234.84 KB, image/jpeg)
2014-01-06 12:31 UTC, GouriKumari
Details
Xamarin.iOS Project for Attempt #1 (12.49 KB, application/zip)
2014-01-08 17:07 UTC, Jeffrey Stedfast
Details
Screenshot of Attempt #1 on iPad 2 w/ iOS6 (913.01 KB, image/png)
2014-01-08 17:09 UTC, Jeffrey Stedfast
Details
Screenshot of Attempt #1 on iPad 2 w/ iOS7 (754.22 KB, image/png)
2014-01-08 17:10 UTC, Jeffrey Stedfast
Details
Xamarin.iOS Project for Attempt #2 (13.69 KB, application/zip)
2014-01-08 17:24 UTC, Jeffrey Stedfast
Details
Screenshot of Attempt #2 on iPad 2 w/ iOS6 (915.64 KB, image/png)
2014-01-08 17:25 UTC, Jeffrey Stedfast
Details
Screenshot of Attempt #2 on iPad 2 w/ iOS7 (747.17 KB, image/png)
2014-01-08 17:26 UTC, Jeffrey Stedfast
Details
Xamarin.iOS Project for Attempt #3 (14.61 KB, application/zip)
2014-01-08 17:37 UTC, Jeffrey Stedfast
Details
Screenshot of Attempt #3 on iPad 2 w/ iOS6 (915.36 KB, image/png)
2014-01-08 17:40 UTC, Jeffrey Stedfast
Details
Screenshot of Attempt #3 on iPad 2 w/ iOS7 (769.39 KB, image/png)
2014-01-08 17:40 UTC, Jeffrey Stedfast
Details
Xamarin.iOS Project for Attempt #4 (15.68 KB, application/zip)
2014-01-08 17:51 UTC, Jeffrey Stedfast
Details
Screenshot of Attempt #4 on iPad 2 w/ iOS6 (913.56 KB, image/png)
2014-01-08 17:52 UTC, Jeffrey Stedfast
Details
Screenshot of Attempt #4 on iPad 2 w/ iOS7 (760.89 KB, image/png)
2014-01-08 17:52 UTC, Jeffrey Stedfast
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Andy 2013-12-11 12:36:24 UTC
It's random and it seems the last one I add gets used on both versions
Comment 1 Andy 2013-12-11 12:57:25 UTC
So basically, I build and deploy on iPad with iOS 6, and I see the iOS 6 icon, correctly. I deploy the same on iOS 7 and I see the same icon !

I try to change the icons and at some point the reverse happens
Comment 2 Prashant manu 2013-12-12 02:34:25 UTC
I have checked this issue with following builds:

All Mac
X.S 4.2.2(build 2)
X.iOS 7.0.4.209

I am not able to reproduce this issue. This is the screencast for the same: http://screencast.com/t/s1vBrncdH. 

@Andy, Could you please check it again?
Comment 3 Andy 2013-12-12 05:12:20 UTC
I spent a couple of hours yesterday trying every way to not-reproduce or identify other causes to this, to no avail. What can I try exactly ?

The only rationale I see is that:

I remove ios6 icon, rebuild, deploy -> I can see ios7 icon correctly (and on ios 6 too naturally)
I re-add ios6 icon, etc -> some time the ios7 icon sticks, like I didn't readd the ios6 one, sometimes not

Doing the reverse (7->6) has a similar result

So by playing a lot I can obtain that either icon for 6 or 7 overrides the other on both systems.
Comment 4 Andy 2013-12-12 05:13:19 UTC
Off the top of my head, I use "pre-rendered" and deploy on iPad mini and iPad 2 physical devices. iPad 2 has ios 7
Comment 5 Andy 2013-12-12 07:03:16 UTC
I've compared with the screencast (thanks by the way). Differences:

My app is Universal, so I have the full set of iPhone and iPad icons

I deployed them both on devices, not emulators

I filled in all icon dimensions

Can you check in this situation?
Comment 6 Andy 2013-12-12 07:15:34 UTC
By the way, how can I launch for debugging ios6 or ios7 on the simulator ? 

I have Xcode 5 and Xcode 4 installed in a different folder and redirected the Apple SDK in Xamarin there (to the 4), in order to use the old SDK.

I only have ios6 shown on the dropdown when launching for the simulator.
Comment 7 Jeffrey Stedfast 2013-12-12 10:56:10 UTC
I'm not sure how this could happen because all we do is add the png file names to the CFBundleIcons array and iOS is supposed to figure out which icon to load based on the dimensions.

I might suggest trying to use Asset Catalogs instead of the Info.plist UI if you want to mix and match iOS 6 and 7 icons.
Comment 8 Andy 2013-12-12 11:49:33 UTC
I don't know either, but in the past XS messed up my resource files quite ofter, that's why I would think it's its fault.

Anyway, do I need to provide my Apple ID to use Asset Catalogs ?
Comment 9 Jeffrey Stedfast 2013-12-12 12:07:28 UTC
I'll try to look into this today and make sure it's not something we're doing wrong...

You do not need to login to your Apple Developer Account in order to use Asset Catalogs.
Comment 10 Jeffrey Stedfast 2013-12-13 17:24:35 UTC
Can you reproduce this with a simulator? I'm not able to reproduce and unfortunately I do not have access to an iOS 6 device anymore.

It would also be nice if you could post a screencast so I can make sure I'm doing exactly what you are doing.
Comment 11 Andy 2013-12-13 17:30:21 UTC
I moved to ios7 sdk and used asset catalogs. Which I didn't know you can't use with sdk6. 
So far it seems to work, however I ran into all sorts of problems and I might have to go back to sdk6. 

However the only thing I did was setting every icon picking then from a folder. Depending on the usual random quantity of random issues, xamarin studio decided to give one icon or the other for the iPad.
Comment 12 Andy 2013-12-20 14:09:41 UTC
Nice. It now happens on iphone too and with asset catalogs !

Sounds like a very nasty bug
Comment 13 Miguel de Icaza [MSFT] 2014-01-05 10:32:28 UTC
Prashant, can you try to reproduce this with the new instructions?
Comment 14 Saurabh 2014-01-06 11:11:32 UTC
I have checked this issue and I am able to reproduce this issue:

I have created an iPhone universal application and run it.

For iPad iOS 6.1.2 physical device, It takes app icon image of iPad iOS7.
Comment 15 Saurabh 2014-01-06 11:25:42 UTC
But for iPad iOS 7.0.4 physical device, It takes app icon image of iPad iOS7, which is correct.

Screencast of info.plist of application: http://screencast.com/t/x5SsZSNBY9

Hence, here issue is that "For iOS 6 device app icon takes image of iOS7 which is wrong."
Comment 16 GouriKumari 2014-01-06 12:25:42 UTC
Tried to reproduce the issue by using the following steps:

Case1: 

I couldn't reproduce the error on setting icon-72.png and icon-76.png for 6.0 and 7.0 respectively. iOS application got deployed with the respective icons on simulator and device.

Supplemental Info:
http://screencast.com/t/i4Vd7KPLnBAP

Case 2:
Created a universal ios project.

1. Used Asset catalogs. Set 72*72 icon for iPad6.0
2. Didn't set icon-76.png for iPad 7.0
3. Build and deployed the application on iPad 7.0 simulator

Result:
App deployed with 72 * 72 icon on iPad 7.0 simulator and iPad 6.0 simulator.

Supplemental Info : http://screencast.com/t/MnGHTpnvh4Z

iPad 7.0 simulator should have displayed a blank icon, since icon-76.png is not set. However, it takes icon-72.png and loads it. 

This happens vice versa as well. icon76.png get loaded in iOS 6.0 simulator.

Test Env:
Xamarin Studio
Version 4.2.2 (build 2)
Installation UUID: 5ed3a124-4b77-4c6f-beb9-c830fd815e2a
Runtime:
	Mono 3.2.5 ((no/964e8f0)
	GTK+ 2.24.20 theme: Raleigh
	GTK# (2.12.0.0)
	Package version: 302050000

Apple Developer Tools
Xcode 5.0.1 (3335.23)
Build 5A2053


Xamarin.iOS
Version: 7.0.4.209 (Enterprise Edition)
Hash: 23a0827
Branch: 
Build date: 2013-11-11 16:04:00-0500
Comment 17 GouriKumari 2014-01-06 12:31:01 UTC
Created attachment 5763 [details]
iPad6.1.3 icon
Comment 18 GouriKumari 2014-01-06 12:31:37 UTC
Created attachment 5764 [details]
iPad7.0.3
Comment 19 Jeffrey Stedfast 2014-01-08 15:41:45 UTC
Can anyone test this using Xcode to see what it does?

If you can't reproduce with Xcode, can you attach the app bundles that Xcode generates vs the app bundle that Xamarin Studio generates so that I can try to figure out what the difference is?

If this behavior can be reproduced with Xcode, then it would appear that this is not a Xamarin Studio bug but is in fact an Apple iOS bug.
Comment 20 Jeffrey Stedfast 2014-01-08 15:43:27 UTC
FWIW, when using Asset Catalogs, Xcode's Asset Catalog compiler is used to generate the appropriate Info.plist CFBundleIcon dictionary, which is why I highly suspect the bug is Apple's fault and not ours.
Comment 21 Andy 2014-01-08 15:56:44 UTC
Looked high and low, couldn't find anyone reporting this on the web. I doubt it's an Xcode issue. 

By the way, since xcassets can't be used on VS plugin, this bug means I can't use VS.
Comment 22 Jeffrey Stedfast 2014-01-08 16:06:58 UTC
Well, iOS is supposed to use the Info.plist's list of icon file names to decide which icon to use, right? And that list is just an <array/> of <string/>s that iOS is supposed to iterate over to decide which one has the correct dimensions.

Any ideas on what you think Xamarin Studio is doing wrong there?
Comment 23 Jeffrey Stedfast 2014-01-08 16:07:55 UTC
btw, you can use plutil -convert xml1 /path/to/appbundle/Info.plist -o Info.xml to convert the binary plist into xml so that you can read it.
Comment 24 Andy 2014-01-08 16:16:58 UTC
Remove the "there" at the end and we can spend the night here :)

Just kidding, no clue what happens in this instance. But with all the devs around wouldn't you think that one could find a reference on the net, if Xcode was the cause?

More seriously though: I had lots of problems with project resources in XS. It even deleted them in bulk at times. So if I had to bet, I would say XS rather than Xcode. But of course, I don't know, please test it that way, sounds promising
Comment 25 Jeffrey Stedfast 2014-01-08 16:29:27 UTC
It's also possible that simply no one else has noticed (just like no one else using Xamarin Studio has run into this issue).

I wouldn't use the "Well, no one using Xcode has mentioned seeing this" as proof positive that it's a Xamarin Studio bug :-)

Especially seeing as how Xamarin Studio uses Xcode to generate the CFBundleIcons key/values in the Info.plist along with handling responsibility of renaming the icon files appropriately and copying them into the app bundle.

This is why I'm asking for someone to actually test this in Xcode and compare the app bundles produced by Xcode with those produced by Xamarin Studio to see what the difference is, assuming Xcode doesn't also have this issue.

For the non-Asset Catalog case, we don't use Xcode to generate the section in the Info.plist or rename the files, we do that ourselves (which is why I had suggested using Asset Catalogs, figuring maybe Xamarin Studio was doing something wrong).

But since you are seeing exactly the same results even when using Asset Catalogs, that suggests to me that this is an iOS bug and not a Xamarin Studio bug - by no means is this definitive proof or anything (which is why I haven't closed this bug), but it does pretty heavily suggest it.
Comment 27 Andy 2014-01-08 16:40:49 UTC
Yeah, I was kidding (mostly :) )

Not to nitpick, but Xcode population >> xamarin population
Comment 28 Jeffrey Stedfast 2014-01-08 16:42:23 UTC
I've stolen some iPads from our QA department so I can test iOS6 vs iOS7
Comment 29 Jeffrey Stedfast 2014-01-08 16:58:18 UTC
Attempt #1:

I created a brand new iPad SingleView application in Xamarin Studio and set the 72x72 iPad App Icon and the 76x76 App Icon in the Info.plist editor (did not use Asset Catalogs).

I then built and deployed to my iPad 2 w/ iOS 7.0.3 and the iPad I got from QA with iOS 6.0.1 installed.

The iPad w/ iOS7 displayed the 76x76 icon and the iPad w/ iOS6 displayed the 72x72 icon.
Comment 30 Jeffrey Stedfast 2014-01-08 17:07:24 UTC
Created attachment 5784 [details]
Xamarin.iOS Project for Attempt #1
Comment 31 Jeffrey Stedfast 2014-01-08 17:09:33 UTC
Created attachment 5785 [details]
Screenshot of Attempt #1 on iPad 2 w/ iOS6
Comment 32 Jeffrey Stedfast 2014-01-08 17:10:04 UTC
Created attachment 5786 [details]
Screenshot of Attempt #1 on iPad 2 w/ iOS7
Comment 33 Jeffrey Stedfast 2014-01-08 17:23:50 UTC
Attempt #2:

I created another brand new iPad SingleView application in Xamarin Studio and set the
72x72 iPad App Icon and the 76x76 App Icon in the Asset Catalog.

I then built and deployed to my iPad 2 w/ iOS 7.0.3 and the iPad I got from QA
with iOS 6.0.1 installed.

The iPad w/ iOS7 displayed the 76x76 icon and the iPad w/ iOS6 displayed the
72x72 icon.
Comment 34 Jeffrey Stedfast 2014-01-08 17:24:37 UTC
Created attachment 5787 [details]
Xamarin.iOS Project for Attempt #2
Comment 35 Jeffrey Stedfast 2014-01-08 17:25:20 UTC
Created attachment 5788 [details]
Screenshot of Attempt #2 on iPad 2 w/ iOS6
Comment 36 Jeffrey Stedfast 2014-01-08 17:26:41 UTC
Created attachment 5789 [details]
Screenshot of Attempt #2 on iPad 2 w/ iOS7
Comment 37 Jeffrey Stedfast 2014-01-08 17:35:41 UTC
Oops, forgot to use Universal projects instead of iPad projects

Attempt #3:

I created a brand new Universal SingleView application in Xamarin Studio and set the 72x72 iPad App Icon and the 76x76 App Icon in the Asset Catalog.

I then built and deployed to my iPad 2 w/ iOS 7.0.3 and the iPad I got from QA with iOS 6.0.1 installed.

The iPad w/ iOS7 displayed the 76x76 icon and the iPad w/ iOS6 displayed the 72x72 icon.
Comment 38 Jeffrey Stedfast 2014-01-08 17:37:58 UTC
Created attachment 5790 [details]
Xamarin.iOS Project for Attempt #3
Comment 39 Jeffrey Stedfast 2014-01-08 17:40:19 UTC
Created attachment 5791 [details]
Screenshot of Attempt #3 on iPad 2 w/ iOS6
Comment 40 Jeffrey Stedfast 2014-01-08 17:40:44 UTC
Created attachment 5792 [details]
Screenshot of Attempt #3 on iPad 2 w/ iOS7
Comment 41 Jeffrey Stedfast 2014-01-08 17:48:13 UTC
Oops, Attempt #3 didn't use Asset Catalogs, I meant I used the Info.plist to set the icons. Sorry about the confusion.

Attempt #4:

I created a brand new Universal SingleView application in Xamarin Studio and set the 72x72 iPad App Icon and the 76x76 App Icon in the Asset Catalog.

I then built and deployed to my iPad 2 w/ iOS 7.0.3 and the iPad I got from QA with iOS 6.0.1 installed.

The iPad w/ iOS7 displayed the 76x76 icon and the iPad w/ iOS6 displayed the 72x72 icon.
Comment 42 Jeffrey Stedfast 2014-01-08 17:51:12 UTC
Created attachment 5793 [details]
Xamarin.iOS Project for Attempt #4
Comment 43 Jeffrey Stedfast 2014-01-08 17:52:00 UTC
Created attachment 5794 [details]
Screenshot of Attempt #4 on iPad 2 w/ iOS6
Comment 44 Jeffrey Stedfast 2014-01-08 17:52:36 UTC
Created attachment 5795 [details]
Screenshot of Attempt #4 on iPad 2 w/ iOS7
Comment 46 Jeffrey Stedfast 2014-01-08 18:21:44 UTC
If you use the projects I attached, do things work for you?

Do you see anything I may have done differently that may explain why these projects work and yours doesn't? I'm out of ideas and don't know what else to try...
Comment 47 Andy 2014-01-08 18:33:58 UTC
I'm at the pub at the moment. But the only differences I can think of now are:

I set all icons
I used non-retina ipad 2 and mini.
I think ios 6 version was more recent (maybe ?)
I first set the icons without asset catalogs. Then used them.
Comment 49 Jeffrey Stedfast 2014-01-08 18:41:03 UTC
Alex Corrado suggests that perhaps the problem is that you are linking with the ios6 sdk instead of the ios7 sdk and that because of this, the final binary does not have the proper logic for determining which icon to use.
Comment 50 Jeffrey Stedfast 2014-01-08 18:41:51 UTC
I'll try setting all of the icons tomorrow
Comment 51 Andy 2014-01-08 18:42:49 UTC
I haven't been linking with ios 6 sdk for a while now, it kept happening. 

I couldn't use asset catalogs with 6
Comment 52 Andy 2014-01-08 18:43:44 UTC
Splashscreens and iTunes images too
Comment 53 Andy 2014-01-13 08:03:10 UTC
Any luck ?
Comment 54 Jeffrey Stedfast 2014-01-24 15:39:01 UTC
Still no luck trying to reproduce this...
Comment 55 Andy 2014-01-24 16:05:32 UTC
You switched to needinfo, but forgot to ask which info you need
Comment 56 Jeffrey Stedfast 2014-01-24 16:12:14 UTC
Sorry, I need any information that will allow me to reproduce this.
Comment 57 Andy 2014-02-03 10:09:12 UTC
I strongly suspect this is related to https://bugzilla.xamarin.com/show_bug.cgi?id=17471 and others I reported. It seems to me both XS and VS plugin mess up resources. There are also inconsistencies on how they write to the project file the resource name.
Comment 58 Jeffrey Stedfast 2014-03-01 16:05:23 UTC
It's not at all related.
Comment 59 Jeffrey Stedfast 2015-03-06 15:06:32 UTC
Guessing that it's safe to close this since I have not seen any other reports of this problem.