Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get data asynchronously data for eventsForDate from server api? #341

Closed
3 tasks done
mmswide opened this issue Jun 23, 2022 · 1 comment
Closed
3 tasks done
Labels

Comments

@mmswide
Copy link

mmswide commented Jun 23, 2022

New Issue Checklist

Issue Description

Code I'm using with CalendarKit
override func eventsForDate(_ date: Date) -> [EventDescriptor] {
                
        SNAPIManager.shared.getDayVehicleLogsGroup(date: date, deviceID: carKey.device_publicid, logType: Int(KFStoredLogType.dust.rawValue)) { vehicleLogGroups, error in
            if let error = error {
                Toast.init(text: error).show()
                return
            }
            if let vehicleLogGroups = vehicleLogGroups {
                self.generatedEvents = self.generateEventsForLogs(vehicleLogGroups)
                self.reloadData()
                
            }
        }

        return generatedEvents
    }
@richardtop
Copy link
Owner

This is better asked on stackoverflow.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants