Search code examples
objective-ciphoneswiftwatchkitapple-watch

How to pass UIImage from iPhone app to Apple Watch app


I have an iPhone app that captures a UIView as UIImage after 5-10 seconds. Is it possible to pass that UIImage to my Apple Watch app and show it in UIImageView there?


Solution

  • Yes it is. All you need to do is create a NSDictionary like:

    var dict:[NSString : UIImage] = ["image" : yourImage]
    

    And then you just use the following methods to communicate between the Apple Watch and the iOS app: LINK