You are saying Google has the picture in picture enabled for the Android YouTube app but not for the Apple Youtube app?
From my understanding, that's correct. It probably isn't a huge surprise given the weird contention between the two when it comes to YouTube on Apple platforms. For example, it wasn't until tvOS 14 (the release that came out about a month ago) where you could finally watch YouTube in 4K on the AppleTV. I remember trying to watch Cobra Kai back when it released on YouTube Red/Premium, and having to go back to my HTPC as I could only do 1080p (and no HDR) on the AppleTV.
Although, if I recall, iOS does sometimes get features in
other Google apps first.
Why would it be any different using the same application on ios? It just does not seem like implementation should be different unless it's something specific to that OS.
I'm going to have to guess a bit, because I don't know exactly how Google writes its apps. For example, you can write fully native apps (Android uses Java, iOS uses Swift or Objective-C) or use cross-platform libraries to write a single app that is translated to the mobile platform's native language. An example of this is Microsoft's
Xamarin. However, the important thing to note about cross-platform libraries is that they need to support the feature for a native OS before the cross-platform app will support it.
However, it is worth noting that while PiP was introduced on iPhones in iOS 14, I believe it has been on iPads since iOS 12 or 13. So, while you could argue that Google may have an excuse with iPhones only recently receiving the feature, I can assure you that YouTube on the iPad
does not support PiP either. (Frankly, it would be a lot nicer on the iPad given the larger screen.)
I would expect battery to be even more optimized on ios than Android.
I would argue that iOS's battery optimizations largely deal with
background tasks rather than the foreground app. The big difference between apps on iOS and Android is that when you minimize an app on iOS, it's
heavily restricted on what it's allowed to do while in the background. Also, being minimized, it's potentially on the chopping block for the memory management to dispose of the app if more RAM is needed.
As a side note, this is the reason why force-closing apps on iOS is a bad idea. Memory is getting powered regardless, but forcing the app to fully reopen every time due to force-closing it will cause it to use more processing rather than simply resuming from standby. In other words, those people that think force-closing helps save battery life are actually doing the exact opposite. Although, I have found that some apps are really nosey about your location... even when set to "only while using". For example, if I open the Best Buy app, the location icon at the top will not disappear unless I force-close the app, and that's when Best Buy's location setting is set to "only while using". I get allowing map programs to have your location while in the background, but Best Buy doesn't really need it. (I assume they use proximity for curbside pick-up.)