Fastis icon indicating copy to clipboard operation
Fastis copied to clipboard

-[JTAppleCalendar.JTACMonthView scrollViewDidEndScrollingAnimation:]: unrecognized selector sent to instance 0x10bc45000

Open justingiffard-impact opened this issue 1 year ago • 2 comments

Im getting weird behaviour that I cannot figure out... Fastis used to work perfectly and now I have noticed that its not working at all in any of my views, neither UIKit or SwiftUI

I have the following view made based on the SwiftUI section on the README

struct CalendarDatePickerSheetView: View {
    @Binding
    var date: Date?

    var body: some View {
        FastisView(mode: .single) {
            switch $0 {
            case let .done(selectedDate):
                guard let selectedDate = selectedDate else { return }
                date = selectedDate
            case .cancel:
                break
            }
        }
        .title(L10n.Creator.Common.chooseDate)
        .initialValue(date)
        .minimumDate(Date())
        .allowToChooseNilDate(false)
    }
}

then call it as follows

.sheet(isPresented: $vm.isEndDatePickerPresented) {
    CalendarDatePickerSheetView(date: $vm.endDate)
}

and when I press the button in simulator it loads the FastisView and then crashes a second or two later and in simulator it crashes the preview instantly If I add an all exceptions breakpoint the crash happens in JTACMonthActionFunctions.swift:97 inside scrollToHeaderInSection and the error message is -[JTAppleCalendar.JTACMonthView scrollViewDidEndScrollingAnimation:]: unrecognized selector sent to instance 0x10bc45000

I unfortunately have no idea why this would happen specifically on this screen and not the other so if you have any ideas what would be causing this it would be greatly appreciated

justingiffard-impact avatar Jun 21 '24 19:06 justingiffard-impact

Hello! We tried to reproduce the error with your code but without success. Could you give me a git for your project?

UriyDevyataev avatar Oct 07 '24 10:10 UriyDevyataev

Try to add "OTHER_LDFLAGS": "-ObjC"

SuperY avatar Dec 10 '24 06:12 SuperY