Skip to content

Commit

Permalink
Added Podspec support based on teambition#11
Browse files Browse the repository at this point in the history
  • Loading branch information
meetakshay99 committed Jan 10, 2018
1 parent 141beab commit 8d502cb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
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' => '[email protected]' }
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

0 comments on commit 8d502cb

Please sign in to comment.