I am using Firebase in my SwiftUI/Combine app, and I have noticed several warnings that I would like to troubleshoot. They're not breaking things, but I'd like to resolve them. I am getting these warning using Xcode 12.4 with the latest Swift Package Dependencies: GoogleUtilities 7.2.2 and and Firebase 7.7.0.
This is the first warning as it appears in the console:
[GoogleUtilities/AppDelegateSwizzler][I-SWZ001014] App Delegate does not conform to UIApplicationDelegate protocol.
For reference, this is how I am configuring Firebase:
import SwiftUI
import Firebase
@main
struct MyApp: App {
@StateObject var authState = AuthState()
init() {
FirebaseApp.configure()
}
var body: some Scene {
WindowGroup {
RootView()
.environmentObject(authState)
}
}
}
This is the second warning, which appears after I set a navigation bar title using the .navigationBarTitle
modifier.
[LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(
"<NSLayoutConstraint:0x280c8cfa0 'BIB_Trailing_CB_Leading' H:[_UIModernBarButton:0x109219b60]-(6)-[_UIModernBarButton:0x109218760'Fullres'] (active)>",
"<NSLayoutConstraint:0x280c8cff0 'CB_Trailing_Trailing' _UIModernBarButton:0x109218760'Fullres'.trailing <= _UIButtonBarButton:0x109217100.trailing (active)>",
"<NSLayoutConstraint:0x280c8dd60 'UINav_static_button_horiz_position' _UIModernBarButton:0x109219b60.leading == UILayoutGuide:0x2816bcfc0'UIViewLayoutMarginsGuide'.leading (active)>",
"<NSLayoutConstraint:0x280c8ddb0 'UINavItemContentGuide-leading' H:[_UIButtonBarButton:0x109217100]-(0)-[UILayoutGuide:0x2816bcee0'UINavigationBarItemContentLayoutGuide'] (active)>",
"<NSLayoutConstraint:0x280c88f00 'UINavItemContentGuide-trailing' UILayoutGuide:0x2816bcee0'UINavigationBarItemContentLayoutGuide'.trailing == _UINavigationBarContentView:0x109214320.trailing (active)>",
"<NSLayoutConstraint:0x280c8e530 'UIView-Encapsulated-Layout-Width' _UINavigationBarContentView:0x109214320.width == 0 (active)>",
"<NSLayoutConstraint:0x280c892c0 'UIView-leftMargin-guide-constraint' H:|-(0)-[UILayoutGuide:0x2816bcfc0'UIViewLayoutMarginsGuide'](LTR) (active, names: '|':_UINavigationBarContentView:0x109214320 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x280c8cfa0 'BIB_Trailing_CB_Leading' H:[_UIModernBarButton:0x109219b60]-(6)-[_UIModernBarButton:0x109218760'Fullres'] (active)>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
Has anyone attempted to resolve these warnings?