We're currently migrating from AppDelegate
to UISceneDelegate
due to console warnings <UIScene lifecycle will soon be required. Failure to adopt will result in an assert in the future>.
Our application's UI, which is built on a single webpage, functions correctly when launched in the foreground after this migration.
However, we've encountered an issue with partial rendered UI components when launching the application from the background, such as upon receiving a VoIP call.
During a background launch, the following delegate calls occur before the client attempts to load a local webpage:
[08/07 16:25:49:037][ 0x101ea3910]<ALA_SIGNAL>: [OS-PLT] Exit -[AppDelegate application:didFinishLaunchingWithOptions:]
[08/07 16:25:49:084][ 0x10c0c4140]<PushToTalk> [Pushnotif] [] <ALA_SIGNAL>: [OS-CCF] Enter -[PushNotificationManager pushRegistry:didReceiveIncomingPushWithPayload:forType:withCompletionHandler:]
[08/07 16:25:49:098][ 0x101ea3910]Begin -[SceneDelegate scene:willConnectToSession:options:]
[08/07 16:25:49:098][ 0x101ea3910]Exit -[SceneDelegate scene:willConnectToSession:options:]
As part of client login process we load the index page in WebKit here:
[08/07 16:25:50:977][ 0x101ea3910]<ALA_SIGNAL>: [PLT-OS] Enter -[SceneDelegate loadUI:] [UI Launch Reason = 1]
Code:
NSString *path = [[NSBundle mainBundle]pathForResource:@"index" ofType:@"html" inDirectory:@"www"];
NSURL *urlReq = [NSURL fileURLWithPath:path];
[webView loadFileURL:urlReq allowingReadAccessToURL:urlReq];
The problem we're observing is that the webpage is only partially rendering in this background launch scenario (Seen after brought to FG).
Any insights or assistance you can provide would be greatly appreciated.