exyte / Chat

A SwiftUI Chat UI framework with fully customizable message cells and a built-in media picker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swift Errors in MessageMenu.swift

abegehr opened this issue · comments

After updating to 1.2.2 from 1.0.3, I'm getting Errors during compile in the latest Xcode 15.0.1 with iOS 17:

Screenshot 2023-11-06 at 23 32 23 Screenshot 2023-11-06 at 23 32 30

This is the code snippet in MessagesMenu.swift > body:

    var body: some View {
        FloatingButton(mainButtonView: mainButton().allowsHitTesting(false), buttons: [
            menuButton(title: "Reply", icon: theme.images.messageMenu.reply, action: .reply)
        ], isOpen: $isShowingMenu)
        .straight()
        .mainZStackAlignment(.top)
        .initialOpacity(0)
        .direction(.bottom)
        .alignment(alignment)
        .spacing(2)
        .animation(.linear(duration: 0.2))
        .menuButtonsSize($menuButtonsSize)
    }

Link to code in GH repo: https://github.com/exyte/Chat/blob/main/Sources/ExyteChat/ChatView/MessageView/MessageMenu.swift#L33

I tried resetting the SPM package cache and cleaning the project but the issue persists. Any ideas?

The issue might be coming from Floating button since it affects modifiers on FloatingButton: https://github.com/exyte/FloatingButton

Manually adding FloatingButton package https://github.com/exyte/FloatingButton as a dependency in SPM solves the issue for me 🎉

Hey @abegehr, thank you for bringing this to our attention. I'm not sure what's happening, since the Chat's package says "FloatingButton version from 1.0.1" which should include latest release of same major version, but I enforced the latest version, hope that helps. Have a wonderful day!