Posts

Post marked as solved
8 Replies
0 Views
I filed FB8369431 for this bug too. I noticed that the problem is that the motion effect can't be added to the view. Immediately after adding it you can see that view.motionEffects is still empty. I haven't had time to do this, but it might help to use Hopper Dissasembler to look at the addMotionEffect implementation. Maybe there is a permission check we are failing, such as a new undocumented requirement to access the accelerometer data? Here is the very easy repro: let effect = UIInterpolatingMotionEffect(keyPath: "center.x",type: .tiltAlongHorizontalAxis) effect.minimumRelativeValue = -10 effect.maximumRelativeValue = 10 blueView.addMotionEffect(effect) if blueView.motionEffects.count == 0 { print("Oh no! Why didn't the effect get added? :'( ") }
Post not yet marked as solved
1 Replies
0 Views
I found a bit in the WWDC session 212 which answers my first question! There is an API on UIWindow to get the UIWindowScene. This simplifies my example:extension UIApplication { @discardableResult func closeSceneFor(view: UIView) -> Bool { if #available(iOS 13.0, *) { if let sceneSession = view.window?.windowScene?.session { let options = UIWindowSceneDestructionRequestOptions() options.windowDismissalAnimation = .standard requestSceneSessionDestruction(sceneSession, options: options, errorHandler: nil) return true } } return false } }I am still curious if it is safe to ignore the errorHandler parameter.
Post not yet marked as solved
8 Replies
0 Views
I did find that the window belongs to MobileDeviceUpdater, which lives in /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/Resources/MobileDeviceUpdater.appIt seems to actually be from Apple. Still not sure what it is doing and why it always fails to update. https://support.apple.com/en-us/HT208831
Post not yet marked as solved
8 Replies
0 Views
I keep running into this too. I don't think it is an iTunes window because I don't see the iTunes process running.Annoyingly, this update fails each time I try it so I can't get rid of this window. It pops up every time I connect my phone to charge.Is there any way to find out which process a specific window belongs to?