Reputation: 12499
I'd like to show in a WatchKit app the user's avatar image from its paired iOS app. Such image is downloaded by the iOS app querying a REST web service when the user logs in the app. How could I get it from the WatchKit app?
The downloaded avatar is persisted as a .jpeg file in the Documents folder of the iOS app.
Upvotes: 0
Views: 931
Reputation: 16643
The easiest way to solve your issue is to write the avatar image out to the App Group directory instead of the Documents directory in the iOS app. Then you can load the avatar image from the App Group file system directly from the Watch Extension. In order to do this, you'll need to make the following changes.
WKInterfaceDevice
shared image cacheWKInterfaceImage
or WKInterfaceGroup
to be displayedHopefully that helps make things a bit more clear.
Upvotes: 3