Skip to content

Instantly share code, notes, and snippets.

@tak-km
Created December 25, 2018 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tak-km/e1b1ff6247465aede60179fb17d05fb9 to your computer and use it in GitHub Desktop.
Save tak-km/e1b1ff6247465aede60179fb17d05fb9 to your computer and use it in GitHub Desktop.
func session(_ session: WCSession, didReceive file: WCSessionFile ) {
count+=1
let data: NSData = NSData( contentsOf: file.fileURL )!
if(file.fileURL.absoluteString.contains("qr")){
print(count,file.fileURL.absoluteString)
QRImage = UIImage( data: data as Data )!
self.QRImageView.setImage(QRImage)
}
if(file.fileURL.absoluteString.contains("icon")){
print(count,file.fileURL.absoluteString)
IconImage = UIImage( data: data as Data )!
self.IconImageView.setImage(IconImage)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment