-1

I'm trying to make a WatchOS app that can receive images and a title from a iPhone app in SwiftUI. I create a object that has SecureCoding. The object is called TemplateObject that can have a String and an array of Data. I convert the images of the iPhone to data and send to Watch as TemplateObject let data = try! NSKeyedArchiver.archivedData(withRootObject: template, requiringSecureCoding: true) The image that I was testing has 51kB. Anyone know what is the problem?

leosebben
  • 13
  • 4

1 Answers1

0

for image transfer to watch always use the WCSession method

- (WCSessionFileTransfer *)transferFile:(NSURL *)file metadata:(nullable NSDictionary<NSString *, id> *)metadata;

we should transfer only a small amount of data through other methods of WCSession

Bhargavi
  • 515
  • 4
  • 14