Xcode puts Default.png in my plist as an Icon file when I assign a Launch Image - iphone

When I set a Launch Image, Xcode creates a copy as Default.png and creates an entry in my plist in Icon Files (iOS 5) / Primary Icon / Icon Items --> Item 1 : Default.png
Item 0 : MyIcon.png is the app icon which I have already placed through the Target.
The reason this is a problem is that the launch image then takes precedence over the actual icon and as a result, it shows as the primary icon instead of my actual icon image.
Why is Xcode doing this?
Can I safely delete the Default.png entry from my .plist? (this seems to fix the problem)
Do I need to copy Default.png somewhere else?
Thanks!

There is also an alternate way. Follow this simple step:

Just delete the Default.png file. Select it again in the summary section project's target settings. you can also drag drop it the on the icon of launch image in the summary section.

The answer is that if you are developing and app for iOS 5, there are two different sections for declaring your icons. The Info editor in the Project editor doesn't show the iOS 5 section. You have to load the file in the Property List editor.
Basically for pre-iOS 5 there is 'CFBundleIconFiles', for iOS 5+ it's 'CFBundleIcons'
Make sure that these have the same icon files names in them.

Related

My recent changes in NIB file is not displayed in ios simulator-closed

I've applied changes in interface builder for my app which has labels in it. I just changed the name and position of a label and in addition to that I changed the font of a text view in my app. When I started to run my app, the font remains the same as previous one and none of the labels are displayed in it.
Can anyone help it pls?
in Xcode try this: main menu:product:Clean
if not enough: main menu:Xcode:preferences: -> click over locations icon:
click over the little gray right arrow for derived data:
that will show you the finder folder "DerivedData": delete it.
one other thing to try: in simulator, delete your app.
quite your xcode and then again open your project . Clear your build then run your code.
You should also make sure, that the interfacebuilder file is linked to the target you are starting in simulator.
To do this, select your xib and open the File inspector. There you should see a dropdown named "Target Membership" where you can link the xib to the targets you want.
Also be sure to have the labels defined as IBOutlets in your header file and link them correctly in your xib. Easiest way to do this is using the Assistant Editor and drag the outlet to the header file.
I had the same problem - but only on the iPhone non-retina in the simulator. Cleaning the code did not help. Restarting and rebooting did not help. But removing the app from the simulator worked. Now changes to my UI show up next time I run.
To remove the app from the simulator I did it just like on a real phone. I select the app icon with the mouse and hold it down the mouse button for a few seconds. Then the icon displays a small delete icon that you can select (the app icons shakes too).

xcode app icon is not applied anymore

I have been testing and developing my app since few months and now, app icon applied on device not correspond as icon set on target summary. I tried to remove it and attach it again but no succes! App icon appears on device as a small capture of splash screen! Why? How to solve it? Thank you
Make sure that the file name under the "Icon Files" key in the info.plist is same as your app icon file. You can view the info.plist by selecting the target and then selecting the "Info" tab.

CFBundleIconFiles Key is not Showing Up in XCode

I'm having trouble adding multiple icon files to my application's info.plist file. I've read the docs on Apple's site, and I've read many of the articles here on StackOverflow, but something isn't quite right.
When I open my info.plist file and click the "+" button next to the entry for "Icon File", I make an attempt to add an entry for "Icon files" (notice the added "s"). This entry does not come up in the dropdown list, however. And when I switch the view to "Show Raw Keys/Values", only the CFBundleIconFile shows up. The necessary CFBundleIconFiles (again, notice the "s") does not show up in my dropdown list.
Is there a setting in XCode I need to set to get these new values to show up? I'm running 3.2.6 with SDK 4.3.
Thanks!
If I follow correctly, you're having issues with enabling multiple icon files and their respective resolutions? Apart from setting the main one inside your .plist (as you're using XC3, whereas XC4's interface allows for retina and non-retina selections built in) the others simply need to be in the same place as your main Icon.png file.
This might further help you:
iPhone icon size

Why is app icon white?

Some recent version of iOS caused my app icon to turn white. I've gone through everything in regards to images and can't find the issue. I'm running Xcode 3.2.5 with sdk 4.2. I do have an entry for "Icon files" in Info.plist with 5 keys:
Item 0 myapp.png
Item 1 myapp#2x.png
Item 2 myapp-72.png
Item 3 myapp-Small-50.png
Item 4 myapp-Small.png
Item 5 myapp-Small#2x.png
All the above have proper dimensions.
I see the image in 'Copy Bundle Resources' and also in the .app file for the simulator version. It is properly reference by name in 'Icon files', Item 0. It is not named Default.png since it is referenced by name in Item 0.
Any suggestions?
You just need those 3 Files:
Icon.png
Icon#2x.png
Icon-iPad.png
Put the names into the Info.plist under Icon Files.
EDIT: Clean your target if it still won't work!
That is what helped me (project summary - app icons are ok, iOS simulator - app icons are ok, iPhone device - blank icon).
Just reconnect your icons to project by dragging them from project navigator to App icon section in project summary.
When does it turn white? If you upgrade an app when it's running, sometimes it appears with a white icon in the "task" bar. This applies to apps you're developing and those download from iTunes. The fix is usually just to kill the app and restart.
That's the simplest answer, but I suspect might not be the solution.
Does the case of the file names in your Info.plist match the actual file names? The Simulator is not case sensitive but the iOS is.
You might also like to make a completely clean build. Don't just do a "Clean" in Xcode, instead manually clear out your build folder.
Finally, when the iPhone 4 first came out I had some issues with the order of the icons referenced in the Info.plist. I never saw white icons (usually just the non-Retina version) but this may be something worth playing with if nothing else works.
The icon file name may be too long if it is a custom file name. This is just a guess, and I hate guessing, but this appears to have been the problem I just had.
I have four targets using the same code but with different icons. I named the icons differently based on the app name, so I could store them in the same directory.
For example:
Icon.png
Icon_second.png
Icon_alternate.png
Icon_second_alternate.png (or Icon_secondalternate.png in case underscores were an issue)
This nomenclature was used for all of the icon names (there's 8 icon files to support iPhone, iPad, retina, etc).
The last one was giving me a problem. Despite a hundred clean/rebuilds, deleting the schema entirely and creating a new one, fruitless efforts, it suddenly occurred to me to try renaming it.
You should be able to name the icons differently, as I still use the first three versions. They are listed in the plist file and render in the project summary, and on the simulator, just fine. The last one rendered in the summary as well. However, I think the length of the file name was too long for the simulator. There must be a length limit. I renamed the fourth one to use the standard Icon.png naming but added it to the fourth target only (images are stored in a separate folder).
CONCLUSION: If you have more than one target for your app, use the standard naming system for all of your icons but add them to separate folders, and then when adding to Xcode just set the build target appropriately.
If you still have the default icon entry (even blank), this can happen, remove that entry in info.plist.
Also, Default.png would be your splash screen.
Load the icons into the Preview application, and make sure they are really png format (and not just named such) by doing a "Save As..." specifying PNG format in the save dialog. Do a Get Info to check the sizes. Make sure the case of all letters in the name match your plist entries.
I had the same problem recently - the Icons I was using were created in GIMP. When I opened them in Photoshop on the development Mac it complained about an ICC color profile. After re-saving the PNGs in Photoshop the Icons worked like a treat.
P.s. I just repeated my steps in creating the images in GIMP, but when saving unticked every extra option that GIMP - by default - was trying to add into the image when saving it. The icons worked perfectly this time around.
If you believe your icon configuration is correct, then you may simply be seeing a bug in Xcode.
As a workaround…
"Clean" your project. Choose Xcode > Product > Clean.
Delete the app from your simulator, or even reset the Simulator by choosing iOS Simulator > Reset Content and Settings.
Quit both the iOS Simulator and XCode apps, then restart them.

When you are using Xcode to make an iPhone app, how do you change the app's icon?

When you are using Xcode to make an iPhone app, how do you change the app's icon? Right now my icon for my app is just plain white.
Create a 57x57 PNG file and import it into your project bundle. Then open the .plist file that is included in your project and edit the value for the key "Icon File" to match the name of the icon you provided (CFBundleIconFile is the actual key, but the Xcode editor will display the nicer name for you).
In Xcode 4, you can go to your app's Summary page and there is a section called App Icons. Then just drag and drop an image into one of the "drop zones". It just works! :D
If you don't specify the icon in the Info.plist file, then Xcode assumes that a file named "icon.png" in your resources folder is the icon for the application.
In Xcode4 go to your applications summary section by selecting target project there you see section with name app icons.select your icon image of size 57x57.just do it it will work
In Xcode 5 you can do it very simply:
1) go to images.xcassets
2) click on AppIcon
3) select Show Overview instead of Slicing
4) drag and drop the appropriate icon sizes onto the icon slots
5) rebuild - and you are good to go.