Hello,
Thank you for the suggestions!!.
Below is a simplified structure of our current implementation,
SceneDelegate.swift
import UIKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate, UIApplicationDelegate {
var viewController:ViewController!
func sceneDidBecomeActive(_ scene: UIScene) {
viewController.keyboardStatusHandler()
}
}
ViewController.swift
import UIKit
import Foundation
import GameController
class ViewController: UIViewController, WKUIDelegate, UINavigationControllerDelegate, AVAudioPlayerDelegate, WKNavigationDelegate, ConnectWebViewDelegate{
override func viewDidLoad() {
super.viewDidLoad()
//other code
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow), name: UIResponder.keyboardWillShowNotification, object: nil)
}
@objc func keyboardWillShow(_ notification: NSNotification) {
self.keyboardStatusHandler()
}
func keyboardStatusHandler(){
let isKeyboardConnected = GCKeyboard.coalesced != nil
if(!isKeyboardConnected){
//use webView.evaluateJavaScript to send result to Angular
} else {
//use webView.evaluateJavaScript to send result to Angular
}
}
}
As mentioned in my initial message, application is a hybrid app, and the steps described above reflect the code.
Based on your suggestion, I agree that this issue may be related to a memory management problem. I will attempt to reproduce the crash using both the Zombies Instrument and the Address Sanitiser as suggested.