iphone - Cannot add icon to registered document type? Is this a bug? -


i trying add icons document type have defined using xcode document type option on project info.

enter image description here see phrase add icons here? in theory can drop icons area. have tried png, ico, icns. nothing.

i have tried add icons clicking on + there, nope. click on +, choose files , nothing happens.

the icon see there able drop place is, droppable place.

my problem this:

  1. i have dropped 320x320 png place see icon.
  2. i use following code obtain icon @ run time , display it.

    uidocumentinteractioncontroller* doccontroller = [[uidocumentinteractioncontroller alloc] init]; doccontroller.name = [nsstring stringwithformat:@"x.%@", [[fileurl path] pathextension]]; // x, can nsarray *icons = (nsarray *)[doccontroller icons]; 

the array has 2 icons, both same size 37x48 in size (???!!!)

two questions

  1. can confirm if bug , there no way add icons there?
  2. can confirm if code have use icon?

apple documentation vague. don't know if these icons have have special nomenclature. big icon bigicon.png , small 1 smallicon.png.

required icon sizes are

  • ipad 320x320, 64x64
  • iphone 44x58, 22x29

you have modify .plist manually (i didn't find way yet)

<key>cfbundledocumenttypes</key> <array> <dict> <key>cfbundletypeiconfiles</key> <array> <string>icon320x320.png</string> <string>icon64x64.png</string> <string>icon44x58.png</string> <string>icon22x29.png</string> </array> <key>cfbundletypename</key> <string>mydocumenttype</string> <key>cfbundletyperole</key> <string>viewer</string> <key>lshandlerrank</key> <string>owner</string> <key>lsitemcontenttypes</key> <array> <string>xyz.mydocument.uti</string> </array> </dict> </array> 

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -

java - Digest auth with Spring Security using javaconfig -