Skip to content
Open
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
22 changes: 22 additions & 0 deletions RRuleSwift.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Pod::Spec.new do |s|
s.name = "RRuleSwift"
s.version = "0.2.0"
s.summary = "Swift rrule library for working with recurrence rules of calendar dates."
s.description = <<-DESC
Swift rrule library for working with recurrence rules of calendar dates.
It wraps the rrule.js library (https://github.com/jkbrzt/rrule).
DESC

s.homepage = "https://github.com/teambition/RRuleSwift"
s.screenshots = "https://raw.githubusercontent.com/teambition/RRuleSwift/master/Gif/RRuleSwiftExample.gif"
s.license = "MIT"
s.author = { 'Teambition' => 'dev@teambition.com' }
s.ios.deployment_target = "8.0"
s.watchos.deployment_target = "2.0"
s.source = { :git => "https://github.com/teambition/RRuleSwift.git", :tag => "#{s.version}" }
s.source_files = "Sources", "Sources/**/*.{h,m}"
s.watchos.exclude_files = "Sources/JavaScriptBridge.swift", "Sources/Iterators.swift"
s.resource = "Sources/lib/*.js"
s.frameworks = "Foundation", "EventKit"
s.ios.frameworks = "Foundation", "EventKit", "JavaScriptCore"
end
6 changes: 5 additions & 1 deletion Sources/JavaScriptBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ import Foundation
import EventKit

internal struct JavaScriptBridge {

// This class is needed to be able to get out bundle
private class DummyClass {}

internal static func rrulejs() -> String? {
let libPath = Bundle(identifier: "Teambition.RRuleSwift-iOS")?.path(forResource: "rrule", ofType: "js") ?? Bundle.main.path(forResource: "rrule", ofType: "js")
let libPath = Bundle(for: DummyClass.self).path(forResource: "rrule", ofType: "js") ?? Bundle.main.path(forResource: "rrule", ofType: "js")
guard let rrulelibPath = libPath else {
return nil
}
Expand Down