Xcode 6 - Make Asset Catalog automatically recognize PDFs - ios

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!

Related

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

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.

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

Splash Images in iOS 7 with XCode 5

Every thing is going fine. Just one issue with Launch Images in iOS7 with XCode 5 by using Asset Catalogue.
In my iPad App, i have splash images of all the sizes.
When i am selecting Portrait Non-Retina [768x1024], its added successfully; after that when i select Portrait Retina [1536x2048], then Non-Retina [768x1024] image removed and giving this error "No image with correct dimensions found". Vise Versa is also applying.
Same behavior is for Landscape Retina and Non-Retina images.
Please suggest any solution. Thanks in Advance.
Delete the image from the asset catalogue and copy it back again. Perform and Clean and then build. It should work.
I have investigated, how we can use Asset Catalog; Now it seems to be easy for me. I want to show you steps to add icons and splash in asset catalog.
Note: No need to make any entry in info.plist file :) And no any other configuration.
In below image, at right side, you will see highlighted area, where you can mention which icons you need. In case of mine, i have selected first four checkboxes; As its for my app requirements. You can select choices according to your requirements.
Now, see below image. As you will select any App icon then you will see its detail at right side selected area. It will help you to upload correct resolution icon.
If Correct resolution image will not be added then following warning will come. Just upload the image with correct resolution.
After uploading all required dimensions, you shouldn't get any warning.
You need to actually use asset catalog by clicking the asset catalog button. Then you will get templates specifying every size you need, and you can drag and drop or import you PNGs and see where you're missing images or the size is wrong. In asset catalog, clicking on the properties pane for an image will show you the size of the image it expects, and teh size you gave it, so you can easily see any discrepancies.

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.

Settings the splash screen in one resolution causes the others to disappear in xcode

I am trying to setup the splash screens at multiple resolutions in the new XCode 5.0 but every time I import one image resolution (at the exact size), the previous imported image is removed from the list...
Any work around to this strange behaviour? (bug?)
Are you using the assets catalog feature of Xcode 5? If not, you should. You specify in your target settings to use the entry in the asset catalog, and you just drag and drop the different launch images. It's really easy.

Resources