Recent searches


No recent searches

ZendeskSDKMessaging SDK broken in SwiftUI



Posted Dec 02, 2024

Hi, 

 

We are using ZendeskSDKMessaging (https://github.com/zendesk/sdk_messaging_ios) , as part of the general update of our app, we need to use SwiftUI. We tried to invoke the messaging UI by Wrapping into a UIViewRepresentable, we are able to get the UI working but the close button on the navigationbar doesnt show up, we tried manually setting it to navbar but sdk seem to override all of those. We could see some constraint breaks (see below) which we believe is causing this issue. Can you take a look? this is blocking us from SwiftUI migration

 

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.
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:0x600002290190 H:|-(12)-[UIStackView:0x112aa7500]   (active, names: '|':ZendeskSDKUIComponents.ButtonsView:0x112aa7310 )>",
   "<NSLayoutConstraint:0x600002291180 UIStackView:0x112aa7500.trailing == ZendeskSDKUIComponents.ButtonsView:0x112aa7310.trailing - 12   (active)>",
   "<NSLayoutConstraint:0x600002292260 'UIView-Encapsulated-Layout-Width' ZendeskSDKUIComponents.ButtonsView:0x112aa7310.width == 0   (active)>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x600002291180 UIStackView:0x112aa7500.trailing == ZendeskSDKUIComponents.ButtonsView:0x112aa7310.trailing - 12   (active)>


0

1

1 comment

image avatar

Erica Girges

Zendesk Developer Advocacy

Hi Anoop, 
 
If you haven't already checked it out, our docs have a walkthrough on how to make this migration.

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post