iOS app won't launch (iOS 15.1 and Xcode 13.1)

After updating my device (iPhone X) to iOS 15.1, I am facing issues with an App that I've been developing; when I run it on my iPhone using Xcode, everything works fine - the app launches normally and does not experience any crash. However, if I launch it directly in the iPhone, it does not work; it closes right after I tap on its icon. Does anybody know what the cause could be? Thanks in advance

Dear @bperezme

I hope I can help you find the cause

final class BaseNavigationBar: UINavigationBar {
   
  // MARK: - Properties
   
  public static let customNavigationBarHeight: CGFloat = 80.0
  public static let customNavigationBarOffset: CGFloat = Constants.UI.getSafeAreaTopPadding() == 0 ?
                              BaseNavigationBar.customNavigationBarHeight - 64.0 : 0
   
  // MARK: - Override Methods
   
  override func sizeThatFits(_ size: CGSize) -> CGSize {
    return CGSize(width: UIScreen.main.bounds.width, height: BaseNavigationBar.customNavigationBarHeight)
  }
   
  override func layoutSubviews() {
    super.layoutSubviews()

      frame = CGRect(x: frame.origin.x, y: 0, width: frame.size.width, height: BaseNavigationBar.customNavigationBarHeight)

      .....
  }
}

This line loops infinitely on iOS 15.1 frame = CGRect(x: frame.origin.x, y: 0, width: frame.size.width, height: BaseNavigationBar.customNavigationBarHeight)

iOS app won't launch (iOS 15.1 and Xcode 13.1)
 
 
Q