where did the icons/launch image table go in xcode 6? - ios

If you look at this thread
iOS 7 App Icons, Launch images And Naming Convention While Keeping iOS 6 Icons
You see that xcode used to show a nice table where you could see all icon/launch image dimensions, what is missing etc.
I just managed to start migrating our app to ios8/iphone6 so i also upgraded xcode. However, now i can't seem to locate that table anymore, all there is is an empty section with buttons to "use asset catalog":
So, i have 2 questions:
is the table somewhere else, or is "asset catalog" the way to go now?
I tried the asset catalog, and all images are copied into this xcassets catalog. Is there any reason for me to keep the original files in the project? Do i need it for anything else, like ios5? I looked around but found no answer.
Thankful for some pointers.

Use the Asset catalog , this is the preferred way now.
If you use the asset catalog, all the images will be copied to images.xcassets, there is no need to keep the original files. If you control click the assets and show in finder, you could find the copied images. In asset catalog you have options to give different images for iOS 5,6,7 landscpae or portrait whatever is appropriate for your app.

Related

Where to store images in iOS project

I'm new to iOS development. I have created a simple iOS app where I have many buttons with images inside. Also cells of UITableView in my application contains images.
Up to now I have put all images for buttons and cells in the "Assets.xcassets" folder. The images can also be accessed if I locate all images in separate directory (let say "Images" folder).
Where is the correct place to locate images? As far as I know in "Assets.xcassets" app logo, tab bar icons can be located, but I don't know is it allowed to store all images in that folder.
You can store any resource you like in the Assets.xcassets folder. Simply drag and drop the images into the Assets.xcassets folder and use them. There is no limit to what type of asset you put in the Assets.xcassets catalog. Of course, you can add a new asset catalog. It can be found in File > New > File, scrolling down to Resource and then clicking Asset Catalog. It acts the same as Assets.xcassets and the usage is the same.
For example, if you put an image called foo in an asset catalog called Bar.xcassets, you can still use
UIImage("foo")
without specifying the name of your catalog.
In general you should use assets for all static images you have in an app. Assets were introduced for a better handling of images with different resolutions for different devices (like #2x, #3x for retina devices). When user installs the app not all versions of the same image are downloaded but only that one that fits the best user's device. So your app will take less space which is good. Also assets are more convenient if you have several versions with different resolutions for the same image.
If you want you can place images in several assets. To add a new asset go to File > New > File and choose Asset Catalog in Resource section.

Xcode 6 - Make Asset Catalog automatically recognize PDFs

I have been having a minor but very annoying issue ever since Xcode 6 launched with support for PDFs in asset catalogs.
When I drag a PDF into the asset catalog, Xcode recognizes it as a "Bitmap" image. So, I have to go to the "Attributes Inspector" and change the image type to "Vector". Even worse, I then have to drag the image from "Unassigned" to the correct slot.
As you can imagine, when importing dozens of images this is very painful.
Does anyone know how to fix this?
Thank you!

XCode5 won't accept all my icons and launch images

After switching to XCode5 I've just re-done all my icons and launch images for an app, with the exception of retina launch images I should have a complete set for both iPad and iPhone, iOS6 and iOS7, thanks to this tool: http://www.appiconsizes.com/
But XCode5 absolutely refuses to use them all. I removed all the old images from my project and added the new ones. Some, XCode automatically detects, seemingly at random. Many others, it says it can't find the images needed even though they are named according to Apple's guidelines (as far as I can see, it's all a bit confusing with so many variants). It lets me find them manually but doesn't seem to be using them properly.
And my launch images, it insists on using images from a different target even though these are definitely not marked to be included in this target. It won't even let me change those ones, if I try to then it just ignores my selection.
A few screenshots follow. I originally had just an "Icon" icon identifier in my plist, since Apple say it will automatically detect different variants, but XCode has then added Icon-76 and Icon-120, seemingly contradicting this. I'm aware XCode5 supports controlling things more through your plist than XCode4, but shouldn't require that - you should be able to tell it the icon base name or use "default" and it would figure things out?
Use an asset catalog for your project.
It has placeholders for the launch image and the icon and each one tells you which size it needs.
Much easier than handling lots of dirrefent files in different locations.
In the project info page there is a button that says "use asset catalog". It will import all your images for you. The code doesn't change when using an asset catalog so it will all still work.
Another thing with asset catalog is that the name of the files doesn't matter. You just drag the image to the slot you want it to go into. With icons and stuff there is only a size restriction.
Even for retina images you don't need the #2x before because there is now a slot for "standard" and "retina" images.
I guess the problem is in Your icon Name,
for iPhone retina Name should be Icon-60.png , Icon-60#2x.png
So as Fogmeister suggested use asset catalog
Like
So its like

Why won't image import into iphone app's asset catelog using xcode?

I am trying to create a launch image for my (first) iphone app. I have done the following:
created 2 PNG images for this purpose.
one image is: 640 x 960 pixels
the other is: 640 x 1136 pixels
added the above 2 files to my project, under "Supporting Files"
In the asset catalog, I select my "LaunchImage" image set, and set its attributes to only support iPhone Portrait, iOS 7 and above
I try to drag each of images mentioned above from "Supporting files" into the 2 place holder images (Retina and #2x). The images are not accepted. I do not get an error, but the images are never drawn, and the image is not used when the application launches.
If instead I try to import the files by selecting "import" from the context menu, I get the same behavior. No error, no image.
Do I need to do anything else? Like follow a naming convention?
Per what I have read, the names of these files no longer matter - though I have tried naming them:
LaunchImage.png (640x960) and LaunchImage#2x.png (640x1136). This has not made any difference.
Any help would be greatly appreciated.
Just change the file extension from "PNG" (upper-case) to "png" (lower-case). I spent a couple of hours futzing around until I finally figured out that was the issue!
Note that screenshots taken with a physical iOS devices have "PNG" extension, and will never work until you change the extension. But screenshots taken on the iOS Simulator have extension "png" and work fine as is.
I've logged this in the Apple Bug Reporter as an XCode Usability issue:
17676619 Can't drag "PNG" to LaunchImages; only "png" works
Have you tried dragging the images straight from the Finder into the Asset Catalog? You shouldn't need to drag them into your project as an extra step first.
The other thing to check is that they are definitely PNG images; the Asset Catalog doesn't accept JPGs.
Had the same issue today. It happened only with a single image.
To solve it you have to re-save your image using a picture editor (Preview for Mac).
Launch Preview
Open your image
File -> Duplicate
Save it as another file
Drag and drop new file into asset catalog -> it works!
I was finally able to import the images. I must have messed something up prior, as I am certain that what I had to do should not have been necessary. But, in case anyone else runs into a similar dilemma:
I deleted the "LaunchImage" image set from the assets catalog
In the build settings, I changed the Asset Catalog Compiler Options to not have any image set named as the launch image.
In the assets catalog, I then created a new launch image set, using the context menu option "New Launch Image".
I was now able to successfully import both my images.
At this point, my app finally had a launch image - but it was the wrong one (i.e., 4 inch). This got fixed when I:
Changed the Asset Catalog Compiler Options (in the Build Settings) to again specify the "LaunchImage" as the launch image
catalog
FYI: I had previously tried adding a new launch image set, but had still never been able to import my images. It seems like the trick was to change the compiler options - but I have no idea why.
Not a substantially different answer, but just for someone who needs something more explicit, my images were saves as .jpg, which will not work. Open the photo editor of your choice and save as .png.
It’s back. In Xcode 10.2 dragging an image into an asset Catalog only works with one image. Then you need to close the project and open again to add another image.
They display in the catalog, but if you right click and Show in Finder, the image is not copied to the catalog folder. When you close and open only the first one remains.

iOS app Icon - how to?

Can someone explain me or link - I have 512x512 icon but I have no idea what icons sizes I need to create and how to add them in to my iOS app. What sizes I need and how to add them, and for what?
The Apple documentation has all you need to know.
In a nutshell: 57x57 for non-retina iPhone or iPod Touch, 114x114 for retina display, and 72x72 for iPad.
Ive put all the images named correctly at the correct size into a github repo, so there can be no confusion.
https://github.com/FattusMannus/iOS-Development-Image-Placeholders
Just download them as a zip, edit them and copy them into your project
AH
In the current 5.x xCode version you can use app icon set (AppIcon.appiconset). In the picture you can see where you can found it. Here is online tool, Icons Master, which will take care how icons should be big naming convection as well.
Specific name doesn't matter's any more for ios icon. All you need is perfect size.
I have created this application which will provide you all the icons based on information provided here. Get the application from here, and follow the instructions in readme file to create all the required icons for iOS application.
Download Asset Catalog Creator Free from iTunes. All you have to do is select a base image, and the program will create all required iOS icon sizes for you and place them neatly in an .xcassets file, which you can simply drag into Xcode without worrying about the sizes/resolutions of individual icons.
Question was asked a while back but the answer changes from time to time. Here are a few web tools that are updated with the latest requirements and get the job done:
http://www.theappicon.com/ or
https://resizeappicon.com/
Drag and drop the .xcassets folder that they return into your xcode assets catalog and it should populate your app icons as you need them.

Resources