xavierserrai commented on issue #1693:
URL: https://github.com/apache/cordova-ios/issues/1693#issuecomment-5368321099

   Dears,
   
   After some testing, I found the root cause:
   
   Problem: The code used [UIApplication sharedApplication].statusBarFrame, 
which was deprecated in iOS 13.0.
   
   Fix: Replaced all 3 occurrences with the modern UIWindowScene-based API:
   
   1. initializeStatusBarBackgroundView (line ~201) — Replaced [UIApplication 
sharedApplication].statusBarFrame with 
windowScene.statusBarManager.statusBarFrame. Also replaced the deprecated 
[[UIApplication sharedApplication] statusBarOrientation] with 
self.viewController.view.window.windowScene.interfaceOrientation.
   
   2. resizeStatusBarBackgroundView (line ~422) — Same replacement for 
statusBarFrame.
   
   3. resizeWebView (line ~439) — Same replacement for statusBarFrame (this was 
the line reported in the original warning).
   
   Pattern used in all cases:
   
   ``````
   CGRect statusBarFrame = CGRectZero;
   if (@available(iOS 13.0, *)) {
       UIWindowScene *windowScene = self.viewController.view.window.windowScene;
       statusBarFrame = windowScene.statusBarManager.statusBarFrame;
   }
   ```````
   
   Generated with Kiro and XCode MCP.
   
   Thanks,


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to