ios8 - iOS Share extension how to support *.wav files -


as title states, want extension show when users share *.wav files

i've come across following apple documentation: https://developer.apple.com/library/ios/documentation/general/conceptual/extensibilitypg/extensionscenarios.html#//apple_ref/doc/uid/tp40014214-ch21-sw8

i'm trying figure out how use mentioned in documentation so. documentation leaves me feeling have if not pieces need, not how go together.

i understand i'll have build "subquery(..)" statement, go? how use it?

i ended doing following:

for nsextensionactivationrule key, changed type dictionary string , entered following string (you can keep formatting, doesn't need inline):

subquery (     extensionitems,     $extensionitem,     subquery (         $extensionitem.attachments,         $attachment,         $attachment.registeredtypeidentifiers uti-conforms-to "public.image" ||         $attachment.registeredtypeidentifiers uti-conforms-to "public.movie" ||         $attachment.registeredtypeidentifiers uti-conforms-to "public.audio"     ).@count == $extensionitem.attachments.@count ).@count >= 1 

you need the:

any $attachment.registeredtypeidentifiers uti-conforms-to "public.audio" 

but extension supports movies , images why has (left in may curious how support more one. note i've decided support more audio options waves inquiring about. types can looked here: https://developer.apple.com/library/ios/documentation/miscellaneous/reference/utiref/utiref.pdf

the first count check makes sure every single selected item in host app conforms extension.

the second count check, 1 @ end used indicate extension accepts 1 or more items (that conform). if wanted allow 1 item @ time processed extension enter following:

).@count == 1 

or, if wanted allow multiple items upper limit:

).@count < 4 

or

).@count <= 3 

Popular posts from this blog