I am trying to add icons to the document type I have defined using Xcode document type option on the project info.
See the phrase add icons here? In theory you can drop icons to that area. I have tried png, ico, icns. Nothing.
I have tried to add the icons by clicking on the + there, nope. I click on the +, I choose the files and nothing happens.
The icon you see there I was able to drop to the place it is, that is another droppable place.
My problem is this:
- I have dropped a 320x320 png to the place you see the icon.
I use the following code to obtain the icon at run time and display it.
UIDocumentInteractionController* docController = [[UIDocumentInteractionController alloc] init]; docController.name = [NSString stringWithFormat:@"x.%@", [[fileURL path] pathExtension]]; // it is x, but it can be anything NSArray *icons = (NSArray *)[docController icons];
The array I get has two icons, both with the same size that is 37x48 in size (???!!!)
two questions
- can you confirm if this is a bug and there is no way to add icons there?
- can you confirm if this code is what I have to use to get the icon?
Apple documentation is vague. I don't know if these icons have to have a special nomenclature. My big icon is something like bigIcon.png and the small one is smallIcon.png.
required icon sizes are
you have to modify .plist manually (i didn't find another way yet)