ios - Share extension only with specific URL -
is there way filter share extension show when, example, url domain specific one?
for example, want show app extension when user sharing google link:
http://www.google.com/?somequery
if i'm filtering urls, code below sufficient:
subquery ( extensionitems, $extensionitem, subquery ( $extensionitem.attachments, $attachment, $attachment.registeredtypeidentifiers uti-conforms-to "public.url" ).@count == $extensionitem.attachments.@count ).@count == 1
in case predicate access $attachment
's registeredtypeidentifiers
property , evaluate it. want able match regex against value inside $attachment
, this:
subquery ( extensionitems, $extensionitem, subquery ( $extensionitem.attachments, $attachment, $attachment.registeredtypeidentifiers uti-conforms-to "public.url" , $attachment.value matches "^http\:\/\/www\.google\.com\/" ).@count == $extensionitem.attachments.@count ).@count == 1
... extension invisible when application don't support url shared host app.
ps: note url domain used example. real one, of course, have meaning used this.
Comments
Post a Comment