4 ms·
Are they saying that they needed the API to have the iPhone app drive the watch app? By rendering to the screen, screenshotting it, and sending that to the wat
by lallysingh 5y ago
Are they saying that they needed the API to have the iPhone app drive the watch app? By rendering to the screen, screenshotting it, and sending that to the watch? Sounds like bullshit.
What does the watch have to do with the phone?
- willio58 5y agoNot long ago the Apple Watch was very limited in what it could render on-device. So a bunch of apps had to do it this way.
- basseq 5y agoBut only Uber (allegedly) had access to the private entitlement. So how did other apps do it, and why couldn't Uber? That said, this is certainly a "special relationship" with big partners like Uber to get their apps working at Apple Watch launch in 2015[1]. That the access "wasn't removed already if it was no longer required", well... I think we can all understand legacy code. [1] "It is likely that the Cupertino tech giant had to give this access after it gave app developers a four-month window to develop apps for its Watch before the unveiling of the product."
- willio58 5y agoI’m not sure why this access required a “special relationship”. I remember years ago reading public Apple dev docs that recommended rendering certain things on iPhone and sending them over to the watch as a rasterized image.
- wlesieutre 5y agoIt says specifically for maps rendering. Keep in mind the original Apple Watch had a 520 mhz single core processor and 256 MB of RAM shared with the OS and anything else running in the background. And pre-SwiftUI, 3rd party developers were working with WatchKit which was a lot more limited than what Apple was using internally. Could that render a single map frame? Probably. But if this was an animated map showing the car location with zoom/pan to follow along, I can definitely see it making sense to offload to the phone. What surprises me is that they needed a private entitlement for this, since you should be able to render a view out to an image without any entitlements [1]. Maybe that solution doesn't work offscreen? Or if the map was animated, maybe this can't play smoothly enough? [1] https://stackoverflow.com/questions/30696307/how-to-convert-a-uiview-to-an-image https://stackoverflow.com/questions/30696307/how-to-convert-...
- wlesieutre 5y agoMore info on WatchKit, per [1] > Can I use custom views in the Apple Watch? Can I customize the interface elements beyond their public API? > No. You can’t use custom views. WatchKit only supports certain native interface elements. None of the interface elements can be subclassed or customized beyond their public API. The available interface elements are WKInterfaceLabel, WKInterfaceButton, WKInterfaceImage, WKInterfaceGroup, WKInterfaceSeparator, WKInterfaceTable, WKInterfaceSwitch, WKInterfaceMap, WKInterfaceSlider and WKInterfaceTimer. In the original watchOS release, you can't even draw shapes, only display images. So to make a custom map you'd have to render the image yourself for display as a WKInterfaceImage. With watchOS 2 you were able to draw to a WKInterfaceImage with Core Graphics [2], but Uber had written their app before this. [1] https://www.raywenderlich.com/1950-watchkit-faq https://www.raywenderlich.com/1950-watchkit-faq [2] https://github.com/shu223/watchOS-2-Sampler#draw-paths-updated-by-hoppenichu https://github.com/shu223/watchOS-2-Sampler#draw-paths-updat...
- lallysingh 5y agoYeah that's the part that seems off. It implies that the image for the watch was on the iphone screen first, which doesn't seem quite "professional quality". Did they render something high quality (to look good on three options) with the GPU and then subsample the image for the watch?
- dmajor2 5y agoIf I remember correctly, the "secret API call" was to the framebuffer. They were rendering the maps using the iPhones cpu/gpu, then pushing the rasters to the watch. The watch was not yet able to render the maps in realtime. Uber had to be able to create screens even in the background, so the API could have taken a snapshot of the active part of the screen buffer.