0

I have been trying to implement SIRI UI. SIRI intent sends image as inimage to Intent UI however, it appear there is no api available to display the content of Inimage

I applied to convert using

contactImageView  = (uiimage*)Intent.payee.image

with above one I am getting exceptions invalid selector sent. Does anyone know how to supply how to supply INImage to uiimageview ?

Thank you for your precious time.

Himanshu Ingole
  • 55
  • 2
  • 11

1 Answers1

0
  1. Type casting is not type conversion. Passing (UIImage *)foo when foo is of a type other than UIImage * is just telling the compiler "pretend this value is a pointer to a UIImage object. To that, the compiler's answer is "okay, whatever"... but when whatever you pass that pointer to looks into it at run time, there'll be trouble if what's actually there isn't a UIImage.

  2. The INImage class isn't for retrieving images from a Siri interaction, it's for providing images to SiriKit. SiriKit then uses the images you provide to construct its standard-format UIs for various interactions. It's assumed that if you're creating your own UI, you can use your own images. (Or keep track of which of your own images you passed as INImages elsewhere so that you use them consistently across both Siri-presented UIs and custom UIs in your extension.)

rickster
  • 124,678
  • 26
  • 272
  • 326
  • Thank you for your input. I knew it will crash as it is not uiimage which is being passed. I thought to give try with consideration at last it is image. For the point 2, take example of cncontact image. Agreed that this can query again from UI however, it is time consuming process (I already tried) and for fraction of second user seeing nothing on UI therefore I thought if somehow we can retrieve intent image. – Himanshu Ingole Feb 24 '17 at 06:37