views:

58

answers:

1

I'm trying to register my custom UTI for document-based app. It seems ok, because a get correct type in -initWithType:error: method and in -dataOfType:error:. BUT my app fails to open the newly created files.

The UTI is similar to this, notice the four components used:

ru.mycompany.myapp.myformat

I thought it is possible to create four-component UTIs, because apple has declared Keynote types in similar way:

com.apple.keynote.key
com.apple.keynote.kth
com.apple.iwork.keynote.key

If i make it this way:

ru.mycompany.myapp-myformat

It makes the trick.

What i am doing wrong? Maybe someone has a prooflink? because apple has nothing about UTI format, except suggestions on reverse-dns style.

Thanks!

UPDATE:

Just figured it out, that it has individual intolerance to my concrete UTI string

ru.deepit.singlemizer.scanner FAILS

but

ru.deepit.singlemizer.scanner1 WORKS!
A: 

After whole evening spent on this stupid problem i finally FOUND!!! the solution.

I rebuilt the LaunchServices DB (using OnyX) and now all works in the correct manner.

God bless bug-free OSs and APIs!

Konstantin