Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription

let package = Package(
name: "CalendarKit",
platforms: [
.iOS(.v9)
],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "CalendarKit",
targets: ["CalendarKit"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
.package(url: "https://github.com/tomaculum/Neon.git", .branch("master")),
.package(url: "https://github.com/maniramezan/DateTools.git", .branch("mani_swiftpm"))
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(name: "CalendarKit", dependencies: ["Neon", "DateToolsSwift"], path: "Source")
],
swiftLanguageVersions: [.version("5.1")]
)
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,23 @@ pod try CalendarKit

## Installation

**CalendarKit** is available through [CocoaPods](http://cocoapods.org). To install it, add the following line to your Podfile:

**CalendarKit** is available through [CocoaPods](http://cocoapods.org) or Swift Package Manager (Xcode11+).

### CocoaPods

To install it, add the following line to your Podfile:

```ruby
pod 'CalendarKit'
```

### Swift Package Manager (Xcode 11+)

Open your project, select `File > Swift Packages > Add Package Depedency` and copy the [repository URL](https://github.com/richardtop/CalendarKit.git) into the search bar.

A more detailed guide can be found here: [Adding Package Dependencies to Your App](https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app)

## Usage
Subclass DayViewController and implement `DayViewDataSource` protocol to show events.
CalendarKit requires `DayViewDataSource` to return an array of objects conforming to `EventDescriptor` protocol, specifying all the information needed to display a particular event:
Expand Down