-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pip window turns black when launch the local camera app #16
Comments
@CaiWanFeng, Apple changed window class for iOS 18. In iOS 17, there is another type scene class for pip window and when we open camera app, pip window scene still foreground active. But in iOS 18, Apple uses UIWindowScene class for pip window, and it becomes background when we open camera app, then if we close the camera app, it become foreground active again. I tried some other alternative categories and modes for audio session to solve it but no success. It can be made, because some apps still provides this function on iOS 18 too. |
@ismail-go @ibrahimdevs Code updated and make sure your Xcode version is below 16.0. |
@CaiWanFeng Why did you mention that Xcode should below 16? We spent some time to what causes this issue. And detect it is not working when we build with Xcode 16 like you said, but it is working when we build with Xcode 15. Is there any way to work it with Xcode 16 or do you know why this is not working with Xcode 16? Because we have to publish our apps only with Xcode 16 after 2025. So we can’t send new builds after 1 month. Thanks 🙏 |
@ibrahimdevs I guess Apple did not care whether these custom pip is work or not in new SDK. What's more, maybe Apple did not want we to use these KVC technologies at all. |
@CaiWanFeng @ismail-go @ibrahimdevs @Ben-Spotec Hi guys, I've been looking for a way to do this recently, and with the help of rednote users "Previs Shot 分镜" and "Claude" AI, I've found the following implementation: You can add Here are my guesses:Apple recognizes two ways to use picture-in-picture, one is to play a video and the other is to make a video call. As you know from the above dialog, picture-in-picture for playing videos is automatically disabled when the camera is enabled in versions higher than iOS 18 and Xcode 16. But picture-in-picture works fine if you use video calls, I think it might be because Apple thinks that video calls must be kept available. Apple Documents: https://developer.apple.com/documentation/avkit/adopting-picture-in-picture-for-video-calls But it's still a problem:
嗨!各位好,我最近也在寻找相关的方法,在小红书用户「Previs Shot 分镜」和「Claude」AI 的帮助下,找到了以下实现方式: 你可以在任意 SwiftUI 视图内添加 以下是我的猜测:苹果认可使用画中画的方式有两种,一种是播放视频,另一种则是视频通话。 苹果文档:https://developer.apple.com/documentation/avkit/adopting-picture-in-picture-for-video-calls 但它仍然存在问题:
|
Hi! Your strategy was working well until the published ios 18.
When i run on the devices which are ios 17, There is no problem and when I try to run it ios 18 still no problem
but after the launching the local native camera app while pip mode is running,
the pip window turns the black.
Do you have any idea about this?
The text was updated successfully, but these errors were encountered: