I'm having trouble converting my app from WatchOS 1 to WatchOS2. I'm programmatically creating a sequence of images on the iPhone for the Watch to play.
I'm putting them in a zip file (using SSZipArchive) in iOS and using transferFile()
to send it over to the watch where I unzip it in the Watch Extension delegate to the shared container between the Watch Extension and Watch App, that the Watch App can play the sequence later:
func session(session: WCSession, didReceiveFile file: WCSessionFile)
{
imagesURL = NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier("group.com.xxxx.images")
SSZipArchive.unzipFileAtPath(file.fileURL.path, toDestination:imagesURL!.path)
}
I've checked that the shared group is set up correctly, and I can see the image files in the shared directory (imagesURL!.path).
But when I get ready to play the sequence with:
image.setImageNamed("myImages") // myImages0.png, myImages1.png, myImages2.png, etc.
I get the error: Unable to find image named "myImages" on watch
- Am I putting the images in the right place?
- Am I referring to them correctly in setImageNamed?
- Am I missing something else?