From 07b0065e21ec3eeabd2930ecf0129254cd3e7ff4 Mon Sep 17 00:00:00 2001 From: StormXX Date: Wed, 17 Aug 2016 16:02:47 +0800 Subject: [PATCH 1/2] add watchOS support --- .gitignore | 133 ++++++++ RRuleSwift.xcodeproj/project.pbxproj | 263 ++++++++++++---- .../xcschemes/RRuleSwift watchOS.xcscheme | 80 +++++ .../xcschemes/RRuleSwift.xcscheme | 6 +- .../README__ignoredByTemplate__ | 1 + .../ExtensionDelegate.swift | 26 ++ RRuleSwiftExample-Watch Extension/Info.plist | 38 +++ .../InterfaceController.swift | 74 +++++ .../NotificationController.swift | 53 ++++ .../PushNotificationPayload.apns | 18 ++ .../AppIcon.appiconset/Contents.json | 55 ++++ .../Base.lproj/Interface.storyboard | 39 +++ RRuleSwiftExample-Watch/Info.plist | 35 +++ RRuleSwiftExample.xcodeproj/project.pbxproj | 290 +++++++++++++++++- {RRuleSwift => Sources}/EKWeekday+RRule.swift | 0 {RRuleSwift => Sources}/ExclusionDate.swift | 0 {RRuleSwift => Sources}/Generators.swift | 0 {RRuleSwift => Sources}/InclusionDate.swift | 0 .../JavaScriptBridge.swift | 2 +- .../NSDate+Comparison.swift | 0 {RRuleSwift => Sources}/RRule.swift | 0 .../RecurrenceFrequency.swift | 0 {RRuleSwift => Sources}/RecurrenceRule.swift | 0 .../Supporting Files/Info-iOS.plist | 0 Sources/Supporting Files/Info-watchOS.plist | 26 ++ Sources/Supporting Files/RRuleSwift.h | 19 ++ {RRuleSwift => Sources}/lib/nlp.js | 0 {RRuleSwift => Sources}/lib/rrule.js | 0 28 files changed, 1075 insertions(+), 83 deletions(-) create mode 100644 .gitignore create mode 100644 RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift watchOS.xcscheme create mode 100644 RRuleSwiftExample-Watch Extension/Assets.xcassets/README__ignoredByTemplate__ create mode 100644 RRuleSwiftExample-Watch Extension/ExtensionDelegate.swift create mode 100644 RRuleSwiftExample-Watch Extension/Info.plist create mode 100644 RRuleSwiftExample-Watch Extension/InterfaceController.swift create mode 100644 RRuleSwiftExample-Watch Extension/NotificationController.swift create mode 100644 RRuleSwiftExample-Watch Extension/PushNotificationPayload.apns create mode 100644 RRuleSwiftExample-Watch/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 RRuleSwiftExample-Watch/Base.lproj/Interface.storyboard create mode 100644 RRuleSwiftExample-Watch/Info.plist rename {RRuleSwift => Sources}/EKWeekday+RRule.swift (100%) rename {RRuleSwift => Sources}/ExclusionDate.swift (100%) rename {RRuleSwift => Sources}/Generators.swift (100%) rename {RRuleSwift => Sources}/InclusionDate.swift (100%) rename {RRuleSwift => Sources}/JavaScriptBridge.swift (97%) rename {RRuleSwift => Sources}/NSDate+Comparison.swift (100%) rename {RRuleSwift => Sources}/RRule.swift (100%) rename {RRuleSwift => Sources}/RecurrenceFrequency.swift (100%) rename {RRuleSwift => Sources}/RecurrenceRule.swift (100%) rename RRuleSwift/Supporting Files/Info.plist => Sources/Supporting Files/Info-iOS.plist (100%) create mode 100644 Sources/Supporting Files/Info-watchOS.plist create mode 100644 Sources/Supporting Files/RRuleSwift.h rename {RRuleSwift => Sources}/lib/nlp.js (100%) rename {RRuleSwift => Sources}/lib/rrule.js (100%) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fe427cf --- /dev/null +++ b/.gitignore @@ -0,0 +1,133 @@ +# Created by https://www.gitignore.io/api/swift + +### Swift ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData +.swift-version +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots + + +# Created by https://www.gitignore.io/api/swift + +### Swift ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xcuserstate + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots + diff --git a/RRuleSwift.xcodeproj/project.pbxproj b/RRuleSwift.xcodeproj/project.pbxproj index 213afee..f06c471 100644 --- a/RRuleSwift.xcodeproj/project.pbxproj +++ b/RRuleSwift.xcodeproj/project.pbxproj @@ -7,33 +7,48 @@ objects = { /* Begin PBXBuildFile section */ - D31B13AA1CA8F37F00D0B863 /* RRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = D31B13A91CA8F37F00D0B863 /* RRule.swift */; }; - D31B13AE1CA90A9A00D0B863 /* RecurrenceRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = D31B13AD1CA90A9A00D0B863 /* RecurrenceRule.swift */; }; - D31B13B01CA90ED300D0B863 /* RecurrenceFrequency.swift in Sources */ = {isa = PBXBuildFile; fileRef = D31B13AF1CA90ED300D0B863 /* RecurrenceFrequency.swift */; }; - D31B13B21CA91F9000D0B863 /* EKWeekday+RRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = D31B13B11CA91F9000D0B863 /* EKWeekday+RRule.swift */; }; - D31B13BF1CAA7F1800D0B863 /* Generators.swift in Sources */ = {isa = PBXBuildFile; fileRef = D31B13BE1CAA7F1700D0B863 /* Generators.swift */; }; - D382675C1CB4BCFB0080C91A /* NSDate+Comparison.swift in Sources */ = {isa = PBXBuildFile; fileRef = D382675B1CB4BCFB0080C91A /* NSDate+Comparison.swift */; }; - D393D72F1CBF507700B89FB8 /* ExclusionDate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D393D72E1CBF507700B89FB8 /* ExclusionDate.swift */; }; - D393D7311CBF79C800B89FB8 /* InclusionDate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D393D7301CBF79C800B89FB8 /* InclusionDate.swift */; }; - D3D7E3E51CB3E03F00BF052F /* nlp.js in Resources */ = {isa = PBXBuildFile; fileRef = D3D7E3E31CB3E03F00BF052F /* nlp.js */; }; - D3D7E3E61CB3E03F00BF052F /* rrule.js in Resources */ = {isa = PBXBuildFile; fileRef = D3D7E3E41CB3E03F00BF052F /* rrule.js */; }; - D3D7E3E81CB3EBC800BF052F /* JavaScriptBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3D7E3E71CB3EBC800BF052F /* JavaScriptBridge.swift */; }; + EB48D1611D641D45001EE872 /* EKWeekday+RRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D1511D641D45001EE872 /* EKWeekday+RRule.swift */; }; + EB48D1621D641D45001EE872 /* EKWeekday+RRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D1511D641D45001EE872 /* EKWeekday+RRule.swift */; }; + EB48D1631D641D45001EE872 /* ExclusionDate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D1521D641D45001EE872 /* ExclusionDate.swift */; }; + EB48D1641D641D45001EE872 /* ExclusionDate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D1521D641D45001EE872 /* ExclusionDate.swift */; }; + EB48D1651D641D45001EE872 /* Generators.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D1531D641D45001EE872 /* Generators.swift */; }; + EB48D1671D641D45001EE872 /* InclusionDate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D1541D641D45001EE872 /* InclusionDate.swift */; }; + EB48D1681D641D45001EE872 /* InclusionDate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D1541D641D45001EE872 /* InclusionDate.swift */; }; + EB48D1691D641D45001EE872 /* JavaScriptBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D1551D641D45001EE872 /* JavaScriptBridge.swift */; }; + EB48D16A1D641D45001EE872 /* JavaScriptBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D1551D641D45001EE872 /* JavaScriptBridge.swift */; }; + EB48D16B1D641D45001EE872 /* nlp.js in Resources */ = {isa = PBXBuildFile; fileRef = EB48D1571D641D45001EE872 /* nlp.js */; }; + EB48D16C1D641D45001EE872 /* nlp.js in Resources */ = {isa = PBXBuildFile; fileRef = EB48D1571D641D45001EE872 /* nlp.js */; }; + EB48D16D1D641D45001EE872 /* rrule.js in Resources */ = {isa = PBXBuildFile; fileRef = EB48D1581D641D45001EE872 /* rrule.js */; }; + EB48D16E1D641D45001EE872 /* rrule.js in Resources */ = {isa = PBXBuildFile; fileRef = EB48D1581D641D45001EE872 /* rrule.js */; }; + EB48D16F1D641D45001EE872 /* NSDate+Comparison.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D1591D641D45001EE872 /* NSDate+Comparison.swift */; }; + EB48D1701D641D45001EE872 /* NSDate+Comparison.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D1591D641D45001EE872 /* NSDate+Comparison.swift */; }; + EB48D1711D641D45001EE872 /* RecurrenceFrequency.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D15A1D641D45001EE872 /* RecurrenceFrequency.swift */; }; + EB48D1721D641D45001EE872 /* RecurrenceFrequency.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D15A1D641D45001EE872 /* RecurrenceFrequency.swift */; }; + EB48D1731D641D45001EE872 /* RecurrenceRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D15B1D641D45001EE872 /* RecurrenceRule.swift */; }; + EB48D1741D641D45001EE872 /* RecurrenceRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D15B1D641D45001EE872 /* RecurrenceRule.swift */; }; + EB48D1751D641D45001EE872 /* RRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D15C1D641D45001EE872 /* RRule.swift */; }; + EB48D1761D641D45001EE872 /* RRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D15C1D641D45001EE872 /* RRule.swift */; }; + EB48D17B1D641D45001EE872 /* RRuleSwift.h in Headers */ = {isa = PBXBuildFile; fileRef = EB48D1601D641D45001EE872 /* RRuleSwift.h */; settings = {ATTRIBUTES = (Public, ); }; }; + EB48D17C1D641D45001EE872 /* RRuleSwift.h in Headers */ = {isa = PBXBuildFile; fileRef = EB48D1601D641D45001EE872 /* RRuleSwift.h */; settings = {ATTRIBUTES = (Private, ); }; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ D31B13971CA8E02E00D0B863 /* RRuleSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RRuleSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D31B139C1CA8E02E00D0B863 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D31B13A91CA8F37F00D0B863 /* RRule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RRule.swift; sourceTree = ""; }; - D31B13AD1CA90A9A00D0B863 /* RecurrenceRule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecurrenceRule.swift; sourceTree = ""; }; - D31B13AF1CA90ED300D0B863 /* RecurrenceFrequency.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecurrenceFrequency.swift; sourceTree = ""; }; - D31B13B11CA91F9000D0B863 /* EKWeekday+RRule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKWeekday+RRule.swift"; sourceTree = ""; }; - D31B13BE1CAA7F1700D0B863 /* Generators.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Generators.swift; sourceTree = ""; }; - D382675B1CB4BCFB0080C91A /* NSDate+Comparison.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSDate+Comparison.swift"; sourceTree = ""; }; - D393D72E1CBF507700B89FB8 /* ExclusionDate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExclusionDate.swift; sourceTree = ""; }; - D393D7301CBF79C800B89FB8 /* InclusionDate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InclusionDate.swift; sourceTree = ""; }; - D3D7E3E31CB3E03F00BF052F /* nlp.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = nlp.js; sourceTree = ""; }; - D3D7E3E41CB3E03F00BF052F /* rrule.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = rrule.js; sourceTree = ""; }; - D3D7E3E71CB3EBC800BF052F /* JavaScriptBridge.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JavaScriptBridge.swift; sourceTree = ""; }; + EB48D1371D641AD6001EE872 /* RRuleSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RRuleSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + EB48D1511D641D45001EE872 /* EKWeekday+RRule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKWeekday+RRule.swift"; sourceTree = ""; }; + EB48D1521D641D45001EE872 /* ExclusionDate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExclusionDate.swift; sourceTree = ""; }; + EB48D1531D641D45001EE872 /* Generators.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Generators.swift; sourceTree = ""; }; + EB48D1541D641D45001EE872 /* InclusionDate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InclusionDate.swift; sourceTree = ""; }; + EB48D1551D641D45001EE872 /* JavaScriptBridge.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JavaScriptBridge.swift; sourceTree = ""; }; + EB48D1571D641D45001EE872 /* nlp.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = nlp.js; sourceTree = ""; }; + EB48D1581D641D45001EE872 /* rrule.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = rrule.js; sourceTree = ""; }; + EB48D1591D641D45001EE872 /* NSDate+Comparison.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSDate+Comparison.swift"; sourceTree = ""; }; + EB48D15A1D641D45001EE872 /* RecurrenceFrequency.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecurrenceFrequency.swift; sourceTree = ""; }; + EB48D15B1D641D45001EE872 /* RecurrenceRule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RecurrenceRule.swift; sourceTree = ""; }; + EB48D15C1D641D45001EE872 /* RRule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RRule.swift; sourceTree = ""; }; + EB48D15E1D641D45001EE872 /* Info-iOS.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Info-iOS.plist"; sourceTree = ""; }; + EB48D15F1D641D45001EE872 /* Info-watchOS.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Info-watchOS.plist"; sourceTree = ""; }; + EB48D1601D641D45001EE872 /* RRuleSwift.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RRuleSwift.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -44,14 +59,20 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + EB48D1331D641AD6001EE872 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ D31B138D1CA8E02E00D0B863 = { isa = PBXGroup; children = ( - D31B13991CA8E02E00D0B863 /* RRuleSwift */, - D31B13A21CA8E13A00D0B863 /* Supporting Files */, + EB48D1311D641ABB001EE872 /* Sources */, D31B13981CA8E02E00D0B863 /* Products */, ); sourceTree = ""; @@ -60,43 +81,46 @@ isa = PBXGroup; children = ( D31B13971CA8E02E00D0B863 /* RRuleSwift.framework */, + EB48D1371D641AD6001EE872 /* RRuleSwift.framework */, ); name = Products; sourceTree = ""; }; - D31B13991CA8E02E00D0B863 /* RRuleSwift */ = { + EB48D1311D641ABB001EE872 /* Sources */ = { isa = PBXGroup; children = ( - D3D7E3E21CB3E03F00BF052F /* lib */, - D31B13AD1CA90A9A00D0B863 /* RecurrenceRule.swift */, - D393D7301CBF79C800B89FB8 /* InclusionDate.swift */, - D393D72E1CBF507700B89FB8 /* ExclusionDate.swift */, - D31B13A91CA8F37F00D0B863 /* RRule.swift */, - D31B13BE1CAA7F1700D0B863 /* Generators.swift */, - D31B13AF1CA90ED300D0B863 /* RecurrenceFrequency.swift */, - D31B13B11CA91F9000D0B863 /* EKWeekday+RRule.swift */, - D382675B1CB4BCFB0080C91A /* NSDate+Comparison.swift */, - D3D7E3E71CB3EBC800BF052F /* JavaScriptBridge.swift */, + EB48D1511D641D45001EE872 /* EKWeekday+RRule.swift */, + EB48D1521D641D45001EE872 /* ExclusionDate.swift */, + EB48D1531D641D45001EE872 /* Generators.swift */, + EB48D1541D641D45001EE872 /* InclusionDate.swift */, + EB48D1551D641D45001EE872 /* JavaScriptBridge.swift */, + EB48D1561D641D45001EE872 /* lib */, + EB48D1591D641D45001EE872 /* NSDate+Comparison.swift */, + EB48D15A1D641D45001EE872 /* RecurrenceFrequency.swift */, + EB48D15B1D641D45001EE872 /* RecurrenceRule.swift */, + EB48D15C1D641D45001EE872 /* RRule.swift */, + EB48D15D1D641D45001EE872 /* Supporting Files */, ); - path = RRuleSwift; + path = Sources; sourceTree = ""; }; - D31B13A21CA8E13A00D0B863 /* Supporting Files */ = { + EB48D1561D641D45001EE872 /* lib */ = { isa = PBXGroup; children = ( - D31B139C1CA8E02E00D0B863 /* Info.plist */, + EB48D1571D641D45001EE872 /* nlp.js */, + EB48D1581D641D45001EE872 /* rrule.js */, ); - name = "Supporting Files"; - path = "RRuleSwift/Supporting Files"; + path = lib; sourceTree = ""; }; - D3D7E3E21CB3E03F00BF052F /* lib */ = { + EB48D15D1D641D45001EE872 /* Supporting Files */ = { isa = PBXGroup; children = ( - D3D7E3E31CB3E03F00BF052F /* nlp.js */, - D3D7E3E41CB3E03F00BF052F /* rrule.js */, + EB48D15E1D641D45001EE872 /* Info-iOS.plist */, + EB48D15F1D641D45001EE872 /* Info-watchOS.plist */, + EB48D1601D641D45001EE872 /* RRuleSwift.h */, ); - path = lib; + path = "Supporting Files"; sourceTree = ""; }; /* End PBXGroup section */ @@ -106,15 +130,24 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + EB48D17B1D641D45001EE872 /* RRuleSwift.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EB48D1341D641AD6001EE872 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + EB48D17C1D641D45001EE872 /* RRuleSwift.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - D31B13961CA8E02E00D0B863 /* RRuleSwift */ = { + D31B13961CA8E02E00D0B863 /* RRuleSwift-iOS */ = { isa = PBXNativeTarget; - buildConfigurationList = D31B139F1CA8E02E00D0B863 /* Build configuration list for PBXNativeTarget "RRuleSwift" */; + buildConfigurationList = D31B139F1CA8E02E00D0B863 /* Build configuration list for PBXNativeTarget "RRuleSwift-iOS" */; buildPhases = ( D31B13921CA8E02E00D0B863 /* Sources */, D31B13931CA8E02E00D0B863 /* Frameworks */, @@ -125,11 +158,29 @@ ); dependencies = ( ); - name = RRuleSwift; + name = "RRuleSwift-iOS"; productName = RRuleSwift; productReference = D31B13971CA8E02E00D0B863 /* RRuleSwift.framework */; productType = "com.apple.product-type.framework"; }; + EB48D1361D641AD6001EE872 /* RRuleSwift-watchOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = EB48D13C1D641AD6001EE872 /* Build configuration list for PBXNativeTarget "RRuleSwift-watchOS" */; + buildPhases = ( + EB48D1321D641AD6001EE872 /* Sources */, + EB48D1331D641AD6001EE872 /* Frameworks */, + EB48D1341D641AD6001EE872 /* Headers */, + EB48D1351D641AD6001EE872 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "RRuleSwift-watchOS"; + productName = "RRuleSwift watchOS"; + productReference = EB48D1371D641AD6001EE872 /* RRuleSwift.framework */; + productType = "com.apple.product-type.framework"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -142,6 +193,9 @@ D31B13961CA8E02E00D0B863 = { CreatedOnToolsVersion = 7.3; }; + EB48D1361D641AD6001EE872 = { + CreatedOnToolsVersion = 7.3; + }; }; }; buildConfigurationList = D31B13911CA8E02E00D0B863 /* Build configuration list for PBXProject "RRuleSwift" */; @@ -156,7 +210,8 @@ projectDirPath = ""; projectRoot = ""; targets = ( - D31B13961CA8E02E00D0B863 /* RRuleSwift */, + D31B13961CA8E02E00D0B863 /* RRuleSwift-iOS */, + EB48D1361D641AD6001EE872 /* RRuleSwift-watchOS */, ); }; /* End PBXProject section */ @@ -166,8 +221,17 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - D3D7E3E51CB3E03F00BF052F /* nlp.js in Resources */, - D3D7E3E61CB3E03F00BF052F /* rrule.js in Resources */, + EB48D16D1D641D45001EE872 /* rrule.js in Resources */, + EB48D16B1D641D45001EE872 /* nlp.js in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EB48D1351D641AD6001EE872 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EB48D16E1D641D45001EE872 /* rrule.js in Resources */, + EB48D16C1D641D45001EE872 /* nlp.js in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -178,15 +242,30 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - D31B13AA1CA8F37F00D0B863 /* RRule.swift in Sources */, - D31B13B21CA91F9000D0B863 /* EKWeekday+RRule.swift in Sources */, - D382675C1CB4BCFB0080C91A /* NSDate+Comparison.swift in Sources */, - D31B13AE1CA90A9A00D0B863 /* RecurrenceRule.swift in Sources */, - D3D7E3E81CB3EBC800BF052F /* JavaScriptBridge.swift in Sources */, - D393D7311CBF79C800B89FB8 /* InclusionDate.swift in Sources */, - D31B13B01CA90ED300D0B863 /* RecurrenceFrequency.swift in Sources */, - D393D72F1CBF507700B89FB8 /* ExclusionDate.swift in Sources */, - D31B13BF1CAA7F1800D0B863 /* Generators.swift in Sources */, + EB48D1671D641D45001EE872 /* InclusionDate.swift in Sources */, + EB48D1631D641D45001EE872 /* ExclusionDate.swift in Sources */, + EB48D1711D641D45001EE872 /* RecurrenceFrequency.swift in Sources */, + EB48D1611D641D45001EE872 /* EKWeekday+RRule.swift in Sources */, + EB48D1651D641D45001EE872 /* Generators.swift in Sources */, + EB48D1731D641D45001EE872 /* RecurrenceRule.swift in Sources */, + EB48D1691D641D45001EE872 /* JavaScriptBridge.swift in Sources */, + EB48D16F1D641D45001EE872 /* NSDate+Comparison.swift in Sources */, + EB48D1751D641D45001EE872 /* RRule.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EB48D1321D641AD6001EE872 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EB48D1681D641D45001EE872 /* InclusionDate.swift in Sources */, + EB48D1641D641D45001EE872 /* ExclusionDate.swift in Sources */, + EB48D1721D641D45001EE872 /* RecurrenceFrequency.swift in Sources */, + EB48D1621D641D45001EE872 /* EKWeekday+RRule.swift in Sources */, + EB48D1741D641D45001EE872 /* RecurrenceRule.swift in Sources */, + EB48D16A1D641D45001EE872 /* JavaScriptBridge.swift in Sources */, + EB48D1701D641D45001EE872 /* NSDate+Comparison.swift in Sources */, + EB48D1761D641D45001EE872 /* RRule.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -292,11 +371,11 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "$(SRCROOT)/RRuleSwift/Supporting Files/Info.plist"; + INFOPLIST_FILE = "Sources/Supporting Files/Info-iOS.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = Teambition.RRuleSwift; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_NAME = RRuleSwift; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; @@ -310,15 +389,60 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "$(SRCROOT)/RRuleSwift/Supporting Files/Info.plist"; + INFOPLIST_FILE = "Sources/Supporting Files/Info-iOS.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = Teambition.RRuleSwift; - PRODUCT_NAME = "$(TARGET_NAME)"; + PRODUCT_NAME = RRuleSwift; SKIP_INSTALL = YES; }; name = Release; }; + EB48D13D1D641AD6001EE872 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CLANG_ENABLE_MODULES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Sources/Supporting Files/Info-watchOS.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.Teambition.RRuleSwift-watchOS"; + PRODUCT_NAME = RRuleSwift; + SDKROOT = watchos; + SKIP_INSTALL = YES; + SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME).h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 2.2; + }; + name = Debug; + }; + EB48D13E1D641AD6001EE872 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + APPLICATION_EXTENSION_API_ONLY = YES; + CLANG_ENABLE_MODULES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Sources/Supporting Files/Info-watchOS.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.Teambition.RRuleSwift-watchOS"; + PRODUCT_NAME = RRuleSwift; + SDKROOT = watchos; + SKIP_INSTALL = YES; + SWIFT_OBJC_INTERFACE_HEADER_NAME = "$(SWIFT_MODULE_NAME).h"; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 2.2; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -331,7 +455,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - D31B139F1CA8E02E00D0B863 /* Build configuration list for PBXNativeTarget "RRuleSwift" */ = { + D31B139F1CA8E02E00D0B863 /* Build configuration list for PBXNativeTarget "RRuleSwift-iOS" */ = { isa = XCConfigurationList; buildConfigurations = ( D31B13A01CA8E02E00D0B863 /* Debug */, @@ -340,6 +464,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + EB48D13C1D641AD6001EE872 /* Build configuration list for PBXNativeTarget "RRuleSwift-watchOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EB48D13D1D641AD6001EE872 /* Debug */, + EB48D13E1D641AD6001EE872 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = D31B138E1CA8E02E00D0B863 /* Project object */; diff --git a/RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift watchOS.xcscheme b/RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift watchOS.xcscheme new file mode 100644 index 0000000..861eec3 --- /dev/null +++ b/RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift watchOS.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift.xcscheme b/RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift.xcscheme index bbcdb94..b47ef23 100644 --- a/RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift.xcscheme +++ b/RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift.xcscheme @@ -16,7 +16,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "D31B13961CA8E02E00D0B863" BuildableName = "RRuleSwift.framework" - BlueprintName = "RRuleSwift" + BlueprintName = "RRuleSwift-iOS" ReferencedContainer = "container:RRuleSwift.xcodeproj"> @@ -47,7 +47,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "D31B13961CA8E02E00D0B863" BuildableName = "RRuleSwift.framework" - BlueprintName = "RRuleSwift" + BlueprintName = "RRuleSwift-iOS" ReferencedContainer = "container:RRuleSwift.xcodeproj"> @@ -65,7 +65,7 @@ BuildableIdentifier = "primary" BlueprintIdentifier = "D31B13961CA8E02E00D0B863" BuildableName = "RRuleSwift.framework" - BlueprintName = "RRuleSwift" + BlueprintName = "RRuleSwift-iOS" ReferencedContainer = "container:RRuleSwift.xcodeproj"> diff --git a/RRuleSwiftExample-Watch Extension/Assets.xcassets/README__ignoredByTemplate__ b/RRuleSwiftExample-Watch Extension/Assets.xcassets/README__ignoredByTemplate__ new file mode 100644 index 0000000..b601d38 --- /dev/null +++ b/RRuleSwiftExample-Watch Extension/Assets.xcassets/README__ignoredByTemplate__ @@ -0,0 +1 @@ +Did you know that git does not support storing empty directories? diff --git a/RRuleSwiftExample-Watch Extension/ExtensionDelegate.swift b/RRuleSwiftExample-Watch Extension/ExtensionDelegate.swift new file mode 100644 index 0000000..478e494 --- /dev/null +++ b/RRuleSwiftExample-Watch Extension/ExtensionDelegate.swift @@ -0,0 +1,26 @@ +// +// ExtensionDelegate.swift +// RRuleSwiftExample-Watch Extension +// +// Created by DangGu on 16/8/17. +// Copyright © 2016年 Teambition. All rights reserved. +// + +import WatchKit + +class ExtensionDelegate: NSObject, WKExtensionDelegate { + + func applicationDidFinishLaunching() { + // Perform any final initialization of your application. + } + + func applicationDidBecomeActive() { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillResignActive() { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, etc. + } + +} diff --git a/RRuleSwiftExample-Watch Extension/Info.plist b/RRuleSwiftExample-Watch Extension/Info.plist new file mode 100644 index 0000000..a227b2f --- /dev/null +++ b/RRuleSwiftExample-Watch Extension/Info.plist @@ -0,0 +1,38 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + RRuleSwiftExample-Watch Extension + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + XPC! + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSExtension + + NSExtensionAttributes + + WKAppBundleIdentifier + Teambition.RRuleSwiftExample.watchkitapp + + NSExtensionPointIdentifier + com.apple.watchkit + + WKExtensionDelegateClassName + $(PRODUCT_MODULE_NAME).ExtensionDelegate + + diff --git a/RRuleSwiftExample-Watch Extension/InterfaceController.swift b/RRuleSwiftExample-Watch Extension/InterfaceController.swift new file mode 100644 index 0000000..380ab87 --- /dev/null +++ b/RRuleSwiftExample-Watch Extension/InterfaceController.swift @@ -0,0 +1,74 @@ +// +// InterfaceController.swift +// RRuleSwiftExample-Watch Extension +// +// Created by DangGu on 16/8/17. +// Copyright © 2016年 Teambition. All rights reserved. +// + +import WatchKit +import Foundation +import RRuleSwift + +class InterfaceController: WKInterfaceController { + let dateFormatter: NSDateFormatter = { + let dateFormatter = NSDateFormatter() + dateFormatter.timeZone = NSTimeZone.defaultTimeZone() + dateFormatter.locale = NSLocale(localeIdentifier: "en_US_POSIX") + dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss EEE" + return dateFormatter + }() + + override func awakeWithContext(context: AnyObject?) { + super.awakeWithContext(context) + let ruleString = "RRULE:FREQ=WEEKLY;DTSTART=20151119T014500Z;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR;UNTIL=20170101T014500Z" + var rule = RecurrenceRule(recurrenceWithRRuleString: ruleString)! + rule.exdate = ExclusionDate(exdateString: "EXDATE:20151120T014500Z,20151123T014500Z,20151126T014500Z,20151127T014500Z,20151130T014500Z,20151201T014500Z,20151202T014500Z,20151203T014500Z,20151207T014500Z,20151210T014500Z,20151211T014500Z,20151215T014500Z,20151216T014500Z,20151217T014500Z,20151221T014500Z,20151222T014500Z,20151223T014500Z,20151228T014500Z,20151229T014500Z", unitGranularity: .Day) + rule.toRRuleString() + +// let occurrences1 = rule.occurrencesBetween(date: date1, andDate: date2) +// let occurrences2 = rule.occurrencesBetween(date: date1, andDate: date2) +// let occurrences3 = rule.occurrencesBetween(date: date1, andDate: date2) +// let occurrences4 = rule.occurrencesBetween(date: date1, andDate: date2) +// let occurrences5 = rule.occurrencesBetween(date: date1, andDate: date2) +// let occurrences6 = rule.occurrencesBetween(date: date1, andDate: date2) +// let occurrences7 = rule.occurrencesBetween(date: date1, andDate: date2) +// let occurrences8 = rule.occurrencesBetween(date: date1, andDate: date2) +// let occurrences9 = rule.occurrencesBetween(date: date1, andDate: date2) +// let occurrences10 = rule.occurrencesBetween(date: date1, andDate: date2) +// let _ = rule.occurrencesBetween(date: date1, andDate: date2) +// let _ = rule.occurrencesBetween(date: date1, andDate: date2) +// let _ = rule.occurrencesBetween(date: date1, andDate: date2) +// let _ = rule.occurrencesBetween(date: date1, andDate: date2) +// let _ = rule.occurrencesBetween(date: date1, andDate: date2) +// let _ = rule.occurrencesBetween(date: date1, andDate: date2) +// let _ = rule.occurrencesBetween(date: date1, andDate: date2) +// let _ = rule.occurrencesBetween(date: date1, andDate: date2) +// let _ = rule.occurrencesBetween(date: date1, andDate: date2) +// let _ = rule.occurrencesBetween(date: date1, andDate: date2) +// +// print(occurrences1) +// print(occurrences2) +// print(occurrences3) +// print(occurrences4) +// print(occurrences5) +// print(occurrences6) +// print(occurrences7) +// print(occurrences8) +// print(occurrences9) +// print(occurrences10) + + // Configure interface objects here. + } + + override func willActivate() { + // This method is called when watch view controller is about to be visible to user + super.willActivate() + } + + override func didDeactivate() { + // This method is called when watch view controller is no longer visible + super.didDeactivate() + } + +} diff --git a/RRuleSwiftExample-Watch Extension/NotificationController.swift b/RRuleSwiftExample-Watch Extension/NotificationController.swift new file mode 100644 index 0000000..a60ddc0 --- /dev/null +++ b/RRuleSwiftExample-Watch Extension/NotificationController.swift @@ -0,0 +1,53 @@ +// +// NotificationController.swift +// RRuleSwiftExample-Watch Extension +// +// Created by DangGu on 16/8/17. +// Copyright © 2016年 Teambition. All rights reserved. +// + +import WatchKit +import Foundation + + +class NotificationController: WKUserNotificationInterfaceController { + + override init() { + // Initialize variables here. + super.init() + + // Configure interface objects here. + } + + override func willActivate() { + // This method is called when watch view controller is about to be visible to user + super.willActivate() + } + + override func didDeactivate() { + // This method is called when watch view controller is no longer visible + super.didDeactivate() + } + + /* + override func didReceiveLocalNotification(localNotification: UILocalNotification, withCompletion completionHandler: ((WKUserNotificationInterfaceType) -> Void)) { + // This method is called when a local notification needs to be presented. + // Implement it if you use a dynamic notification interface. + // Populate your dynamic notification interface as quickly as possible. + // + // After populating your dynamic notification interface call the completion block. + completionHandler(.Custom) + } + */ + + /* + override func didReceiveRemoteNotification(remoteNotification: [NSObject : AnyObject], withCompletion completionHandler: ((WKUserNotificationInterfaceType) -> Void)) { + // This method is called when a remote notification needs to be presented. + // Implement it if you use a dynamic notification interface. + // Populate your dynamic notification interface as quickly as possible. + // + // After populating your dynamic notification interface call the completion block. + completionHandler(.Custom) + } + */ +} diff --git a/RRuleSwiftExample-Watch Extension/PushNotificationPayload.apns b/RRuleSwiftExample-Watch Extension/PushNotificationPayload.apns new file mode 100644 index 0000000..e793a02 --- /dev/null +++ b/RRuleSwiftExample-Watch Extension/PushNotificationPayload.apns @@ -0,0 +1,18 @@ +{ + "aps": { + "alert": { + "body": "Test message", + "title": "Optional title" + }, + "category": "myCategory" + }, + + "WatchKit Simulator Actions": [ + { + "title": "First Button", + "identifier": "firstButtonAction" + } + ], + + "customKey": "Use this file to define a testing payload for your notifications. The aps dictionary specifies the category, alert text and title. The WatchKit Simulator Actions array can provide info for one or more action buttons in addition to the standard Dismiss button. Any other top level keys are custom payload. If you have multiple such JSON files in your project, you'll be able to select them when choosing to debug the notification interface of your Watch App." +} diff --git a/RRuleSwiftExample-Watch/Assets.xcassets/AppIcon.appiconset/Contents.json b/RRuleSwiftExample-Watch/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..dd221ba --- /dev/null +++ b/RRuleSwiftExample-Watch/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,55 @@ +{ + "images" : [ + { + "size" : "24x24", + "idiom" : "watch", + "scale" : "2x", + "role" : "notificationCenter", + "subtype" : "38mm" + }, + { + "size" : "27.5x27.5", + "idiom" : "watch", + "scale" : "2x", + "role" : "notificationCenter", + "subtype" : "42mm" + }, + { + "size" : "29x29", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "watch", + "role" : "companionSettings", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "watch", + "scale" : "2x", + "role" : "appLauncher", + "subtype" : "38mm" + }, + { + "size" : "86x86", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "38mm" + }, + { + "size" : "98x98", + "idiom" : "watch", + "scale" : "2x", + "role" : "quickLook", + "subtype" : "42mm" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/RRuleSwiftExample-Watch/Base.lproj/Interface.storyboard b/RRuleSwiftExample-Watch/Base.lproj/Interface.storyboard new file mode 100644 index 0000000..f06935f --- /dev/null +++ b/RRuleSwiftExample-Watch/Base.lproj/Interface.storyboard @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RRuleSwiftExample-Watch/Info.plist b/RRuleSwiftExample-Watch/Info.plist new file mode 100644 index 0000000..b64a36a --- /dev/null +++ b/RRuleSwiftExample-Watch/Info.plist @@ -0,0 +1,35 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + RRuleSwiftExample + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + + WKCompanionAppBundleIdentifier + Teambition.RRuleSwiftExample + WKWatchKitApp + + + diff --git a/RRuleSwiftExample.xcodeproj/project.pbxproj b/RRuleSwiftExample.xcodeproj/project.pbxproj index 19edc26..0f9c776 100644 --- a/RRuleSwiftExample.xcodeproj/project.pbxproj +++ b/RRuleSwiftExample.xcodeproj/project.pbxproj @@ -13,13 +13,20 @@ D31B13A81CA8E29000D0B863 /* RRuleExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D31B13A71CA8E29000D0B863 /* RRuleExampleViewController.swift */; }; D31B13BB1CAA35E200D0B863 /* PickerViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D31B13BA1CAA35E200D0B863 /* PickerViewCell.swift */; }; D31B13BD1CAA3B0D00D0B863 /* DatePickerCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D31B13BC1CAA3B0D00D0B863 /* DatePickerCell.swift */; }; - D325D62D1D05737F0021E620 /* RRuleSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D325D62C1D05737F0021E620 /* RRuleSwift.framework */; }; - D325D62E1D05737F0021E620 /* RRuleSwift.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D325D62C1D05737F0021E620 /* RRuleSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; D325D6491D0574E00021E620 /* NotificationCenter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D325D6481D0574E00021E620 /* NotificationCenter.framework */; }; D325D64C1D0574E00021E620 /* TodayViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D325D64B1D0574E00021E620 /* TodayViewController.swift */; }; D325D64F1D0574E00021E620 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D325D64D1D0574E00021E620 /* MainInterface.storyboard */; }; D325D6531D0574E00021E620 /* RRuleSwiftExample-TodayExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = D325D6461D0574E00021E620 /* RRuleSwiftExample-TodayExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; - D325D6591D0575E40021E620 /* RRuleSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D325D62C1D05737F0021E620 /* RRuleSwift.framework */; }; + EB48D1831D64202E001EE872 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EB48D1811D64202E001EE872 /* Interface.storyboard */; }; + EB48D1851D64202E001EE872 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EB48D1841D64202E001EE872 /* Assets.xcassets */; }; + EB48D18C1D64202E001EE872 /* RRuleSwiftExample-Watch Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = EB48D18B1D64202E001EE872 /* RRuleSwiftExample-Watch Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + EB48D1931D64202E001EE872 /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D1921D64202E001EE872 /* InterfaceController.swift */; }; + EB48D1951D64202E001EE872 /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D1941D64202E001EE872 /* ExtensionDelegate.swift */; }; + EB48D1971D64202E001EE872 /* NotificationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EB48D1961D64202E001EE872 /* NotificationController.swift */; }; + EB48D1991D64202E001EE872 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EB48D1981D64202E001EE872 /* Assets.xcassets */; }; + EB48D19D1D64202E001EE872 /* RRuleSwiftExample-Watch.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = EB48D17F1D64202E001EE872 /* RRuleSwiftExample-Watch.app */; }; + EB48D1A71D643394001EE872 /* RRuleSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EB48D1A61D643394001EE872 /* RRuleSwift.framework */; }; + EB48D1A81D643394001EE872 /* RRuleSwift.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EB48D1A61D643394001EE872 /* RRuleSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -30,31 +37,67 @@ remoteGlobalIDString = D325D6451D0574E00021E620; remoteInfo = "RRuleSwiftExample-TodayExtension"; }; + EB48D18D1D64202E001EE872 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D31B13701CA8D8E400D0B863 /* Project object */; + proxyType = 1; + remoteGlobalIDString = EB48D18A1D64202E001EE872; + remoteInfo = "RRuleSwiftExample-Watch Extension"; + }; + EB48D19B1D64202E001EE872 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D31B13701CA8D8E400D0B863 /* Project object */; + proxyType = 1; + remoteGlobalIDString = EB48D17E1D64202E001EE872; + remoteInfo = "RRuleSwiftExample-Watch"; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ - D325D62F1D05737F0021E620 /* Embed Frameworks */ = { + D325D6571D0574E10021E620 /* Embed App Extensions */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; - dstSubfolderSpec = 10; + dstSubfolderSpec = 13; files = ( - D325D62E1D05737F0021E620 /* RRuleSwift.framework in Embed Frameworks */, + D325D6531D0574E00021E620 /* RRuleSwiftExample-TodayExtension.appex in Embed App Extensions */, ); - name = "Embed Frameworks"; + name = "Embed App Extensions"; runOnlyForDeploymentPostprocessing = 0; }; - D325D6571D0574E10021E620 /* Embed App Extensions */ = { + EB48D1A31D64202E001EE872 /* Embed App Extensions */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 13; files = ( - D325D6531D0574E00021E620 /* RRuleSwiftExample-TodayExtension.appex in Embed App Extensions */, + EB48D18C1D64202E001EE872 /* RRuleSwiftExample-Watch Extension.appex in Embed App Extensions */, ); name = "Embed App Extensions"; runOnlyForDeploymentPostprocessing = 0; }; + EB48D1A51D64202E001EE872 /* Embed Watch Content */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = "$(CONTENTS_FOLDER_PATH)/Watch"; + dstSubfolderSpec = 16; + files = ( + EB48D19D1D64202E001EE872 /* RRuleSwiftExample-Watch.app in Embed Watch Content */, + ); + name = "Embed Watch Content"; + runOnlyForDeploymentPostprocessing = 0; + }; + EB48D1A91D643394001EE872 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + EB48D1A81D643394001EE872 /* RRuleSwift.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ @@ -66,12 +109,24 @@ D31B13A71CA8E29000D0B863 /* RRuleExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RRuleExampleViewController.swift; sourceTree = ""; }; D31B13BA1CAA35E200D0B863 /* PickerViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PickerViewCell.swift; sourceTree = ""; }; D31B13BC1CAA3B0D00D0B863 /* DatePickerCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DatePickerCell.swift; sourceTree = ""; }; - D325D62C1D05737F0021E620 /* RRuleSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = RRuleSwift.framework; path = "/Users/hongxin/Library/Developer/Xcode/DerivedData/RRuleSwift-bsfdvctfhfasceecxzjeffpridns/Build/Products/Debug-iphoneos/RRuleSwift.framework"; sourceTree = ""; }; D325D6461D0574E00021E620 /* RRuleSwiftExample-TodayExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "RRuleSwiftExample-TodayExtension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; D325D6481D0574E00021E620 /* NotificationCenter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NotificationCenter.framework; path = System/Library/Frameworks/NotificationCenter.framework; sourceTree = SDKROOT; }; D325D64B1D0574E00021E620 /* TodayViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TodayViewController.swift; sourceTree = ""; }; D325D64E1D0574E00021E620 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainInterface.storyboard; sourceTree = ""; }; D325D6501D0574E00021E620 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + EB48D17F1D64202E001EE872 /* RRuleSwiftExample-Watch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "RRuleSwiftExample-Watch.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + EB48D1821D64202E001EE872 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Interface.storyboard; sourceTree = ""; }; + EB48D1841D64202E001EE872 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + EB48D1861D64202E001EE872 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + EB48D18B1D64202E001EE872 /* RRuleSwiftExample-Watch Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "RRuleSwiftExample-Watch Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; + EB48D1911D64202E001EE872 /* PushNotificationPayload.apns */ = {isa = PBXFileReference; lastKnownFileType = text; path = PushNotificationPayload.apns; sourceTree = ""; }; + EB48D1921D64202E001EE872 /* InterfaceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InterfaceController.swift; sourceTree = ""; }; + EB48D1941D64202E001EE872 /* ExtensionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExtensionDelegate.swift; sourceTree = ""; }; + EB48D1961D64202E001EE872 /* NotificationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationController.swift; sourceTree = ""; }; + EB48D1981D64202E001EE872 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + EB48D19A1D64202E001EE872 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + EB48D1A61D643394001EE872 /* RRuleSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = RRuleSwift.framework; path = "/Users/StormXX/Library/Developer/Xcode/DerivedData/RRuleSwift-fkbgafmxczazdlbyzxeusnkrviec/Build/Products/Debug-watchsimulator/RRuleSwift.framework"; sourceTree = ""; }; + EB48D1AA1D6433A2001EE872 /* RRuleSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = RRuleSwift.framework; path = "/Users/StormXX/Library/Developer/Xcode/DerivedData/RRuleSwift-fkbgafmxczazdlbyzxeusnkrviec/Build/Products/Debug-iphonesimulator/RRuleSwift.framework"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -79,7 +134,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D325D62D1D05737F0021E620 /* RRuleSwift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -88,7 +142,14 @@ buildActionMask = 2147483647; files = ( D325D6491D0574E00021E620 /* NotificationCenter.framework in Frameworks */, - D325D6591D0575E40021E620 /* RRuleSwift.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EB48D1881D64202E001EE872 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + EB48D1A71D643394001EE872 /* RRuleSwift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -98,9 +159,12 @@ D31B136F1CA8D8E400D0B863 = { isa = PBXGroup; children = ( - D325D62C1D05737F0021E620 /* RRuleSwift.framework */, + EB48D1AA1D6433A2001EE872 /* RRuleSwift.framework */, + EB48D1A61D643394001EE872 /* RRuleSwift.framework */, D31B137A1CA8D8E400D0B863 /* RRuleSwiftExample */, D325D64A1D0574E00021E620 /* RRuleSwiftExample-TodayExtension */, + EB48D1801D64202E001EE872 /* RRuleSwiftExample-Watch */, + EB48D18F1D64202E001EE872 /* RRuleSwiftExample-Watch Extension */, D325D6471D0574E00021E620 /* Frameworks */, D31B13791CA8D8E400D0B863 /* Products */, ); @@ -111,6 +175,8 @@ children = ( D31B13781CA8D8E400D0B863 /* RRuleSwiftExample.app */, D325D6461D0574E00021E620 /* RRuleSwiftExample-TodayExtension.appex */, + EB48D17F1D64202E001EE872 /* RRuleSwiftExample-Watch.app */, + EB48D18B1D64202E001EE872 /* RRuleSwiftExample-Watch Extension.appex */, ); name = Products; sourceTree = ""; @@ -147,6 +213,37 @@ path = "RRuleSwiftExample-TodayExtension"; sourceTree = ""; }; + EB48D1801D64202E001EE872 /* RRuleSwiftExample-Watch */ = { + isa = PBXGroup; + children = ( + EB48D1811D64202E001EE872 /* Interface.storyboard */, + EB48D1841D64202E001EE872 /* Assets.xcassets */, + EB48D1861D64202E001EE872 /* Info.plist */, + ); + path = "RRuleSwiftExample-Watch"; + sourceTree = ""; + }; + EB48D18F1D64202E001EE872 /* RRuleSwiftExample-Watch Extension */ = { + isa = PBXGroup; + children = ( + EB48D1921D64202E001EE872 /* InterfaceController.swift */, + EB48D1941D64202E001EE872 /* ExtensionDelegate.swift */, + EB48D1961D64202E001EE872 /* NotificationController.swift */, + EB48D1981D64202E001EE872 /* Assets.xcassets */, + EB48D19A1D64202E001EE872 /* Info.plist */, + EB48D1901D64202E001EE872 /* Supporting Files */, + ); + path = "RRuleSwiftExample-Watch Extension"; + sourceTree = ""; + }; + EB48D1901D64202E001EE872 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + EB48D1911D64202E001EE872 /* PushNotificationPayload.apns */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -157,13 +254,14 @@ D31B13741CA8D8E400D0B863 /* Sources */, D31B13751CA8D8E400D0B863 /* Frameworks */, D31B13761CA8D8E400D0B863 /* Resources */, - D325D62F1D05737F0021E620 /* Embed Frameworks */, D325D6571D0574E10021E620 /* Embed App Extensions */, + EB48D1A51D64202E001EE872 /* Embed Watch Content */, ); buildRules = ( ); dependencies = ( D325D6521D0574E00021E620 /* PBXTargetDependency */, + EB48D19C1D64202E001EE872 /* PBXTargetDependency */, ); name = RRuleSwiftExample; productName = RRuleSwift; @@ -187,6 +285,41 @@ productReference = D325D6461D0574E00021E620 /* RRuleSwiftExample-TodayExtension.appex */; productType = "com.apple.product-type.app-extension"; }; + EB48D17E1D64202E001EE872 /* RRuleSwiftExample-Watch */ = { + isa = PBXNativeTarget; + buildConfigurationList = EB48D1A41D64202E001EE872 /* Build configuration list for PBXNativeTarget "RRuleSwiftExample-Watch" */; + buildPhases = ( + EB48D17D1D64202E001EE872 /* Resources */, + EB48D1A31D64202E001EE872 /* Embed App Extensions */, + ); + buildRules = ( + ); + dependencies = ( + EB48D18E1D64202E001EE872 /* PBXTargetDependency */, + ); + name = "RRuleSwiftExample-Watch"; + productName = "RRuleSwiftExample-Watch"; + productReference = EB48D17F1D64202E001EE872 /* RRuleSwiftExample-Watch.app */; + productType = "com.apple.product-type.application.watchapp2"; + }; + EB48D18A1D64202E001EE872 /* RRuleSwiftExample-Watch Extension */ = { + isa = PBXNativeTarget; + buildConfigurationList = EB48D1A21D64202E001EE872 /* Build configuration list for PBXNativeTarget "RRuleSwiftExample-Watch Extension" */; + buildPhases = ( + EB48D1871D64202E001EE872 /* Sources */, + EB48D1881D64202E001EE872 /* Frameworks */, + EB48D1891D64202E001EE872 /* Resources */, + EB48D1A91D643394001EE872 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "RRuleSwiftExample-Watch Extension"; + productName = "RRuleSwiftExample-Watch Extension"; + productReference = EB48D18B1D64202E001EE872 /* RRuleSwiftExample-Watch Extension.appex */; + productType = "com.apple.product-type.watchkit2-extension"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -203,6 +336,12 @@ D325D6451D0574E00021E620 = { CreatedOnToolsVersion = 7.3.1; }; + EB48D17E1D64202E001EE872 = { + CreatedOnToolsVersion = 7.3; + }; + EB48D18A1D64202E001EE872 = { + CreatedOnToolsVersion = 7.3; + }; }; }; buildConfigurationList = D31B13731CA8D8E400D0B863 /* Build configuration list for PBXProject "RRuleSwiftExample" */; @@ -220,6 +359,8 @@ targets = ( D31B13771CA8D8E400D0B863 /* RRuleSwiftExample */, D325D6451D0574E00021E620 /* RRuleSwiftExample-TodayExtension */, + EB48D17E1D64202E001EE872 /* RRuleSwiftExample-Watch */, + EB48D18A1D64202E001EE872 /* RRuleSwiftExample-Watch Extension */, ); }; /* End PBXProject section */ @@ -242,6 +383,23 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + EB48D17D1D64202E001EE872 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EB48D1851D64202E001EE872 /* Assets.xcassets in Resources */, + EB48D1831D64202E001EE872 /* Interface.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EB48D1891D64202E001EE872 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EB48D1991D64202E001EE872 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -264,6 +422,16 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + EB48D1871D64202E001EE872 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EB48D1971D64202E001EE872 /* NotificationController.swift in Sources */, + EB48D1951D64202E001EE872 /* ExtensionDelegate.swift in Sources */, + EB48D1931D64202E001EE872 /* InterfaceController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -272,6 +440,16 @@ target = D325D6451D0574E00021E620 /* RRuleSwiftExample-TodayExtension */; targetProxy = D325D6511D0574E00021E620 /* PBXContainerItemProxy */; }; + EB48D18E1D64202E001EE872 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = EB48D18A1D64202E001EE872 /* RRuleSwiftExample-Watch Extension */; + targetProxy = EB48D18D1D64202E001EE872 /* PBXContainerItemProxy */; + }; + EB48D19C1D64202E001EE872 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = EB48D17E1D64202E001EE872 /* RRuleSwiftExample-Watch */; + targetProxy = EB48D19B1D64202E001EE872 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -291,6 +469,14 @@ name = MainInterface.storyboard; sourceTree = ""; }; + EB48D1811D64202E001EE872 /* Interface.storyboard */ = { + isa = PBXVariantGroup; + children = ( + EB48D1821D64202E001EE872 /* Base */, + ); + name = Interface.storyboard; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -427,6 +613,66 @@ }; name = Release; }; + EB48D19E1D64202E001EE872 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + IBSC_MODULE = RRuleSwiftExample_Watch_Extension; + INFOPLIST_FILE = "RRuleSwiftExample-Watch/Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = Teambition.RRuleSwiftExample.watchkitapp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 2.2; + }; + name = Debug; + }; + EB48D19F1D64202E001EE872 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + IBSC_MODULE = RRuleSwiftExample_Watch_Extension; + INFOPLIST_FILE = "RRuleSwiftExample-Watch/Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = Teambition.RRuleSwiftExample.watchkitapp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 2.2; + }; + name = Release; + }; + EB48D1A01D64202E001EE872 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = "RRuleSwiftExample-Watch Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Teambition.RRuleSwiftExample.watchkitapp.watchkitextension; + PRODUCT_NAME = "${TARGET_NAME}"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 2.2; + }; + name = Debug; + }; + EB48D1A11D64202E001EE872 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = "RRuleSwiftExample-Watch Extension/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = Teambition.RRuleSwiftExample.watchkitapp.watchkitextension; + PRODUCT_NAME = "${TARGET_NAME}"; + SDKROOT = watchos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = 4; + WATCHOS_DEPLOYMENT_TARGET = 2.2; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -457,6 +703,22 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + EB48D1A21D64202E001EE872 /* Build configuration list for PBXNativeTarget "RRuleSwiftExample-Watch Extension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EB48D1A01D64202E001EE872 /* Debug */, + EB48D1A11D64202E001EE872 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + EB48D1A41D64202E001EE872 /* Build configuration list for PBXNativeTarget "RRuleSwiftExample-Watch" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EB48D19E1D64202E001EE872 /* Debug */, + EB48D19F1D64202E001EE872 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; /* End XCConfigurationList section */ }; rootObject = D31B13701CA8D8E400D0B863 /* Project object */; diff --git a/RRuleSwift/EKWeekday+RRule.swift b/Sources/EKWeekday+RRule.swift similarity index 100% rename from RRuleSwift/EKWeekday+RRule.swift rename to Sources/EKWeekday+RRule.swift diff --git a/RRuleSwift/ExclusionDate.swift b/Sources/ExclusionDate.swift similarity index 100% rename from RRuleSwift/ExclusionDate.swift rename to Sources/ExclusionDate.swift diff --git a/RRuleSwift/Generators.swift b/Sources/Generators.swift similarity index 100% rename from RRuleSwift/Generators.swift rename to Sources/Generators.swift diff --git a/RRuleSwift/InclusionDate.swift b/Sources/InclusionDate.swift similarity index 100% rename from RRuleSwift/InclusionDate.swift rename to Sources/InclusionDate.swift diff --git a/RRuleSwift/JavaScriptBridge.swift b/Sources/JavaScriptBridge.swift similarity index 97% rename from RRuleSwift/JavaScriptBridge.swift rename to Sources/JavaScriptBridge.swift index 6730297..d38fced 100644 --- a/RRuleSwift/JavaScriptBridge.swift +++ b/Sources/JavaScriptBridge.swift @@ -11,7 +11,7 @@ import EventKit internal struct JavaScriptBridge { internal static func rrulejs() -> String? { - let libPath = NSBundle(identifier: "Teambition.RRuleSwift")?.pathForResource("rrule", ofType: "js") ?? NSBundle.mainBundle().pathForResource("rrule", ofType: "js") + let libPath = NSBundle(identifier: "Teambition.RRuleSwift-iOS")?.pathForResource("rrule", ofType: "js") ?? NSBundle.mainBundle().pathForResource("rrule", ofType: "js") guard let rrulelibPath = libPath else { return nil } diff --git a/RRuleSwift/NSDate+Comparison.swift b/Sources/NSDate+Comparison.swift similarity index 100% rename from RRuleSwift/NSDate+Comparison.swift rename to Sources/NSDate+Comparison.swift diff --git a/RRuleSwift/RRule.swift b/Sources/RRule.swift similarity index 100% rename from RRuleSwift/RRule.swift rename to Sources/RRule.swift diff --git a/RRuleSwift/RecurrenceFrequency.swift b/Sources/RecurrenceFrequency.swift similarity index 100% rename from RRuleSwift/RecurrenceFrequency.swift rename to Sources/RecurrenceFrequency.swift diff --git a/RRuleSwift/RecurrenceRule.swift b/Sources/RecurrenceRule.swift similarity index 100% rename from RRuleSwift/RecurrenceRule.swift rename to Sources/RecurrenceRule.swift diff --git a/RRuleSwift/Supporting Files/Info.plist b/Sources/Supporting Files/Info-iOS.plist similarity index 100% rename from RRuleSwift/Supporting Files/Info.plist rename to Sources/Supporting Files/Info-iOS.plist diff --git a/Sources/Supporting Files/Info-watchOS.plist b/Sources/Supporting Files/Info-watchOS.plist new file mode 100644 index 0000000..d3de8ee --- /dev/null +++ b/Sources/Supporting Files/Info-watchOS.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/Sources/Supporting Files/RRuleSwift.h b/Sources/Supporting Files/RRuleSwift.h new file mode 100644 index 0000000..62eb87f --- /dev/null +++ b/Sources/Supporting Files/RRuleSwift.h @@ -0,0 +1,19 @@ +// +// RRuleSwift.h +// RRuleSwift +// +// Created by DangGu on 16/8/17. +// Copyright © 2016年 Teambition. All rights reserved. +// + +#import + +//! Project version number for RRuleSwift +FOUNDATION_EXPORT double RRuleSwift_VersionNumber; + +//! Project version string for RRuleSwift. +FOUNDATION_EXPORT const unsigned char RRuleSwift_VersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/RRuleSwift/lib/nlp.js b/Sources/lib/nlp.js similarity index 100% rename from RRuleSwift/lib/nlp.js rename to Sources/lib/nlp.js diff --git a/RRuleSwift/lib/rrule.js b/Sources/lib/rrule.js similarity index 100% rename from RRuleSwift/lib/rrule.js rename to Sources/lib/rrule.js From b98859ea180d8277bb6ae8868b241e646d879751 Mon Sep 17 00:00:00 2001 From: StormXX Date: Wed, 17 Aug 2016 22:24:08 +0800 Subject: [PATCH 2/2] edit scheme name --- .../xcschemes/{RRuleSwift.xcscheme => RRuleSwift iOS.xcscheme} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename RRuleSwift.xcodeproj/xcshareddata/xcschemes/{RRuleSwift.xcscheme => RRuleSwift iOS.xcscheme} (100%) diff --git a/RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift.xcscheme b/RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift iOS.xcscheme similarity index 100% rename from RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift.xcscheme rename to RRuleSwift.xcodeproj/xcshareddata/xcschemes/RRuleSwift iOS.xcscheme