From 9aac071f90368cb76ed32546b15b52426f4319bd Mon Sep 17 00:00:00 2001 From: Xin Hong Date: Mon, 6 Jun 2016 17:02:52 +0800 Subject: [PATCH] optimize generator memory --- RRuleSwift/Generators.swift | 33 ++-- RRuleSwift/Supporting Files/Info.plist | 2 +- .../Base.lproj/MainInterface.storyboard | 50 ++++++ RRuleSwiftExample-TodayExtension/Info.plist | 33 ++++ .../TodayViewController.swift | 76 ++++++++ RRuleSwiftExample.xcodeproj/project.pbxproj | 167 +++++++++++++++++- .../RRuleSwiftExample-TodayExtension.xcscheme | 108 +++++++++++ .../xcschemes/xcschememanagement.plist | 10 ++ RRuleSwiftExample/Info.plist | 4 +- 9 files changed, 456 insertions(+), 27 deletions(-) create mode 100644 RRuleSwiftExample-TodayExtension/Base.lproj/MainInterface.storyboard create mode 100644 RRuleSwiftExample-TodayExtension/Info.plist create mode 100644 RRuleSwiftExample-TodayExtension/TodayViewController.swift create mode 100644 RRuleSwiftExample.xcodeproj/xcuserdata/hongxin.xcuserdatad/xcschemes/RRuleSwiftExample-TodayExtension.xcscheme diff --git a/RRuleSwift/Generators.swift b/RRuleSwift/Generators.swift index cffce56..b1d2432 100644 --- a/RRuleSwift/Generators.swift +++ b/RRuleSwift/Generators.swift @@ -11,22 +11,28 @@ import JavaScriptCore internal struct Generator { static let endlessRecurrenceCount = 500 + static let rruleContext: JSContext? = { + guard let rrulejs = JavaScriptBridge.rrulejs() else { + return nil + } + let context = JSContext() + context.exceptionHandler = { context, exception in + print("[RRuleSwift] rrule.js error: \(exception)") + } + context.evaluateScript(rrulejs) + return context + }() } public extension RecurrenceRule { public func allOccurrences(endlessRecurrenceCount: Int = Generator.endlessRecurrenceCount) -> [NSDate] { - guard let rrulejs = JavaScriptBridge.rrulejs() else { + guard let _ = JavaScriptBridge.rrulejs() else { return [] } let ruleJSONString = toJSONString(endlessRecurrenceCount: endlessRecurrenceCount) - let context = JSContext() - context.exceptionHandler = { context, exception in - print("[RRuleSwift] rrule.js error: \(exception)") - } - context.evaluateScript(rrulejs) - context.evaluateScript("var rule = new RRule({ \(ruleJSONString) })") - guard let allOccurrences = context.evaluateScript("rule.all()").toArray() as? [NSDate] else { + Generator.rruleContext?.evaluateScript("var rule = new RRule({ \(ruleJSONString) })") + guard let allOccurrences = Generator.rruleContext?.evaluateScript("rule.all()").toArray() as? [NSDate] else { return [] } @@ -51,7 +57,7 @@ public extension RecurrenceRule { } public func occurrencesBetween(date date: NSDate, andDate otherDate: NSDate, endlessRecurrenceCount: Int = Generator.endlessRecurrenceCount) -> [NSDate] { - guard let rrulejs = JavaScriptBridge.rrulejs() else { + guard let _ = JavaScriptBridge.rrulejs() else { return [] } @@ -61,13 +67,8 @@ public extension RecurrenceRule { let untilDateJSON = RRule.ISO8601DateFormatter.stringFromDate(untilDate) let ruleJSONString = toJSONString(endlessRecurrenceCount: endlessRecurrenceCount) - let context = JSContext() - context.exceptionHandler = { context, exception in - print("[RRuleSwift] rrule.js error: \(exception)") - } - context.evaluateScript(rrulejs) - context.evaluateScript("var rule = new RRule({ \(ruleJSONString) })") - guard let betweenOccurrences = context.evaluateScript("rule.between(new Date('\(beginDateJSON)'), new Date('\(untilDateJSON)'))").toArray() as? [NSDate] else { + Generator.rruleContext?.evaluateScript("var rule = new RRule({ \(ruleJSONString) })") + guard let betweenOccurrences = Generator.rruleContext?.evaluateScript("rule.between(new Date('\(beginDateJSON)'), new Date('\(untilDateJSON)'))").toArray() as? [NSDate] else { return [] } diff --git a/RRuleSwift/Supporting Files/Info.plist b/RRuleSwift/Supporting Files/Info.plist index bc568f7..eabb8de 100644 --- a/RRuleSwift/Supporting Files/Info.plist +++ b/RRuleSwift/Supporting Files/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.0.8 + 0.0.9 CFBundleSignature ???? CFBundleVersion diff --git a/RRuleSwiftExample-TodayExtension/Base.lproj/MainInterface.storyboard b/RRuleSwiftExample-TodayExtension/Base.lproj/MainInterface.storyboard new file mode 100644 index 0000000..1998fe0 --- /dev/null +++ b/RRuleSwiftExample-TodayExtension/Base.lproj/MainInterface.storyboard @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RRuleSwiftExample-TodayExtension/Info.plist b/RRuleSwiftExample-TodayExtension/Info.plist new file mode 100644 index 0000000..17471bd --- /dev/null +++ b/RRuleSwiftExample-TodayExtension/Info.plist @@ -0,0 +1,33 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + RRuleSwiftExample-TodayExtension + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + XPC! + CFBundleShortVersionString + 0.0.9 + CFBundleSignature + ???? + CFBundleVersion + 9 + NSExtension + + NSExtensionMainStoryboard + MainInterface + NSExtensionPointIdentifier + com.apple.widget-extension + + + diff --git a/RRuleSwiftExample-TodayExtension/TodayViewController.swift b/RRuleSwiftExample-TodayExtension/TodayViewController.swift new file mode 100644 index 0000000..e408300 --- /dev/null +++ b/RRuleSwiftExample-TodayExtension/TodayViewController.swift @@ -0,0 +1,76 @@ +// +// TodayViewController.swift +// RRuleSwiftExample-TodayExtension +// +// Created by 洪鑫 on 16/6/6. +// Copyright © 2016年 Teambition. All rights reserved. +// + +import UIKit +import NotificationCenter +import RRuleSwift + +class TodayViewController: UIViewController, NCWidgetProviding { + 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 viewDidLoad() { + super.viewDidLoad() + var rule = RecurrenceRule(recurrenceWithRRuleString: "RRULE:FREQ=WEEKLY;DTSTART=20151119T014500Z;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR;UNTIL=20170101T014500Z")! + 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) + let date1 = dateFormatter.dateFromString("2016-06-06 00:00:00 Sun")! + let date2 = dateFormatter.dateFromString("2016-12-13 00:00:00 Sun")! + + 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) + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + + } + + func widgetPerformUpdateWithCompletionHandler(completionHandler: ((NCUpdateResult) -> Void)) { + // Perform any setup necessary in order to update the view. + + // If an error is encountered, use NCUpdateResult.Failed + // If there's no update required, use NCUpdateResult.NoData + // If there's an update, use NCUpdateResult.NewData + + completionHandler(NCUpdateResult.NewData) + } +} diff --git a/RRuleSwiftExample.xcodeproj/project.pbxproj b/RRuleSwiftExample.xcodeproj/project.pbxproj index 994a2d3..19edc26 100644 --- a/RRuleSwiftExample.xcodeproj/project.pbxproj +++ b/RRuleSwiftExample.xcodeproj/project.pbxproj @@ -11,24 +11,50 @@ D31B13811CA8D8E400D0B863 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D31B137F1CA8D8E400D0B863 /* Main.storyboard */; }; D31B13831CA8D8E400D0B863 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D31B13821CA8D8E400D0B863 /* Assets.xcassets */; }; D31B13A81CA8E29000D0B863 /* RRuleExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D31B13A71CA8E29000D0B863 /* RRuleExampleViewController.swift */; }; - D31B13B51CA9571900D0B863 /* RRuleSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D31B13B41CA9571900D0B863 /* RRuleSwift.framework */; }; - D31B13B61CA9571900D0B863 /* RRuleSwift.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D31B13B41CA9571900D0B863 /* RRuleSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 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 */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + D325D6511D0574E00021E620 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D31B13701CA8D8E400D0B863 /* Project object */; + proxyType = 1; + remoteGlobalIDString = D325D6451D0574E00021E620; + remoteInfo = "RRuleSwiftExample-TodayExtension"; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXCopyFilesBuildPhase section */ - D31B13B71CA9571900D0B863 /* Embed Frameworks */ = { + D325D62F1D05737F0021E620 /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( - D31B13B61CA9571900D0B863 /* RRuleSwift.framework in Embed Frameworks */, + D325D62E1D05737F0021E620 /* RRuleSwift.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; + D325D6571D0574E10021E620 /* Embed App Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + D325D6531D0574E00021E620 /* RRuleSwiftExample-TodayExtension.appex in Embed App Extensions */, + ); + name = "Embed App Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ @@ -38,9 +64,14 @@ D31B13821CA8D8E400D0B863 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; D31B13871CA8D8E400D0B863 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D31B13A71CA8E29000D0B863 /* RRuleExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RRuleExampleViewController.swift; sourceTree = ""; }; - D31B13B41CA9571900D0B863 /* RRuleSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; name = RRuleSwift.framework; path = "/Users/hongxin/Library/Developer/Xcode/DerivedData/RRuleSwift-bsfdvctfhfasceecxzjeffpridns/Build/Products/Debug-iphonesimulator/RRuleSwift.framework"; 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 = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -48,7 +79,16 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D31B13B51CA9571900D0B863 /* RRuleSwift.framework in Frameworks */, + D325D62D1D05737F0021E620 /* RRuleSwift.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D325D6431D0574E00021E620 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D325D6491D0574E00021E620 /* NotificationCenter.framework in Frameworks */, + D325D6591D0575E40021E620 /* RRuleSwift.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -58,8 +98,10 @@ D31B136F1CA8D8E400D0B863 = { isa = PBXGroup; children = ( - D31B13B41CA9571900D0B863 /* RRuleSwift.framework */, + D325D62C1D05737F0021E620 /* RRuleSwift.framework */, D31B137A1CA8D8E400D0B863 /* RRuleSwiftExample */, + D325D64A1D0574E00021E620 /* RRuleSwiftExample-TodayExtension */, + D325D6471D0574E00021E620 /* Frameworks */, D31B13791CA8D8E400D0B863 /* Products */, ); sourceTree = ""; @@ -68,6 +110,7 @@ isa = PBXGroup; children = ( D31B13781CA8D8E400D0B863 /* RRuleSwiftExample.app */, + D325D6461D0574E00021E620 /* RRuleSwiftExample-TodayExtension.appex */, ); name = Products; sourceTree = ""; @@ -86,6 +129,24 @@ path = RRuleSwiftExample; sourceTree = ""; }; + D325D6471D0574E00021E620 /* Frameworks */ = { + isa = PBXGroup; + children = ( + D325D6481D0574E00021E620 /* NotificationCenter.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + D325D64A1D0574E00021E620 /* RRuleSwiftExample-TodayExtension */ = { + isa = PBXGroup; + children = ( + D325D64B1D0574E00021E620 /* TodayViewController.swift */, + D325D64D1D0574E00021E620 /* MainInterface.storyboard */, + D325D6501D0574E00021E620 /* Info.plist */, + ); + path = "RRuleSwiftExample-TodayExtension"; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -96,17 +157,36 @@ D31B13741CA8D8E400D0B863 /* Sources */, D31B13751CA8D8E400D0B863 /* Frameworks */, D31B13761CA8D8E400D0B863 /* Resources */, - D31B13B71CA9571900D0B863 /* Embed Frameworks */, + D325D62F1D05737F0021E620 /* Embed Frameworks */, + D325D6571D0574E10021E620 /* Embed App Extensions */, ); buildRules = ( ); dependencies = ( + D325D6521D0574E00021E620 /* PBXTargetDependency */, ); name = RRuleSwiftExample; productName = RRuleSwift; productReference = D31B13781CA8D8E400D0B863 /* RRuleSwiftExample.app */; productType = "com.apple.product-type.application"; }; + D325D6451D0574E00021E620 /* RRuleSwiftExample-TodayExtension */ = { + isa = PBXNativeTarget; + buildConfigurationList = D325D6541D0574E10021E620 /* Build configuration list for PBXNativeTarget "RRuleSwiftExample-TodayExtension" */; + buildPhases = ( + D325D6421D0574E00021E620 /* Sources */, + D325D6431D0574E00021E620 /* Frameworks */, + D325D6441D0574E00021E620 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "RRuleSwiftExample-TodayExtension"; + productName = "RRuleSwiftExample-TodayExtension"; + productReference = D325D6461D0574E00021E620 /* RRuleSwiftExample-TodayExtension.appex */; + productType = "com.apple.product-type.app-extension"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -120,6 +200,9 @@ D31B13771CA8D8E400D0B863 = { CreatedOnToolsVersion = 7.3; }; + D325D6451D0574E00021E620 = { + CreatedOnToolsVersion = 7.3.1; + }; }; }; buildConfigurationList = D31B13731CA8D8E400D0B863 /* Build configuration list for PBXProject "RRuleSwiftExample" */; @@ -136,6 +219,7 @@ projectRoot = ""; targets = ( D31B13771CA8D8E400D0B863 /* RRuleSwiftExample */, + D325D6451D0574E00021E620 /* RRuleSwiftExample-TodayExtension */, ); }; /* End PBXProject section */ @@ -150,6 +234,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + D325D6441D0574E00021E620 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D325D64F1D0574E00021E620 /* MainInterface.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -164,8 +256,24 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + D325D6421D0574E00021E620 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D325D64C1D0574E00021E620 /* TodayViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + D325D6521D0574E00021E620 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D325D6451D0574E00021E620 /* RRuleSwiftExample-TodayExtension */; + targetProxy = D325D6511D0574E00021E620 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin PBXVariantGroup section */ D31B137F1CA8D8E400D0B863 /* Main.storyboard */ = { isa = PBXVariantGroup; @@ -175,6 +283,14 @@ name = Main.storyboard; sourceTree = ""; }; + D325D64D1D0574E00021E620 /* MainInterface.storyboard */ = { + isa = PBXVariantGroup; + children = ( + D325D64E1D0574E00021E620 /* Base */, + ); + name = MainInterface.storyboard; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -267,6 +383,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; INFOPLIST_FILE = "$(SRCROOT)/RRuleSwiftExample/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = Teambition.RRuleSwiftExample; @@ -278,6 +395,7 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; INFOPLIST_FILE = "$(SRCROOT)/RRuleSwiftExample/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = Teambition.RRuleSwiftExample; @@ -285,6 +403,30 @@ }; name = Release; }; + D325D6551D0574E10021E620 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = "RRuleSwiftExample-TodayExtension/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Teambition.RRuleSwiftExample.RRuleSwiftExample-TodayExtension"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + D325D6561D0574E10021E620 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + INFOPLIST_FILE = "RRuleSwiftExample-TodayExtension/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Teambition.RRuleSwiftExample.RRuleSwiftExample-TodayExtension"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -306,6 +448,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + D325D6541D0574E10021E620 /* Build configuration list for PBXNativeTarget "RRuleSwiftExample-TodayExtension" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D325D6551D0574E10021E620 /* Debug */, + D325D6561D0574E10021E620 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = D31B13701CA8D8E400D0B863 /* Project object */; diff --git a/RRuleSwiftExample.xcodeproj/xcuserdata/hongxin.xcuserdatad/xcschemes/RRuleSwiftExample-TodayExtension.xcscheme b/RRuleSwiftExample.xcodeproj/xcuserdata/hongxin.xcuserdatad/xcschemes/RRuleSwiftExample-TodayExtension.xcscheme new file mode 100644 index 0000000..fc2b506 --- /dev/null +++ b/RRuleSwiftExample.xcodeproj/xcuserdata/hongxin.xcuserdatad/xcschemes/RRuleSwiftExample-TodayExtension.xcscheme @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RRuleSwiftExample.xcodeproj/xcuserdata/hongxin.xcuserdatad/xcschemes/xcschememanagement.plist b/RRuleSwiftExample.xcodeproj/xcuserdata/hongxin.xcuserdatad/xcschemes/xcschememanagement.plist index 4c4d957..5212179 100644 --- a/RRuleSwiftExample.xcodeproj/xcuserdata/hongxin.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/RRuleSwiftExample.xcodeproj/xcuserdata/hongxin.xcuserdatad/xcschemes/xcschememanagement.plist @@ -4,6 +4,11 @@ SchemeUserState + RRuleSwiftExample-TodayExtension.xcscheme + + orderHint + 2 + RRuleSwiftExample.xcscheme orderHint @@ -17,6 +22,11 @@ primary + D325D6451D0574E00021E620 + + primary + + diff --git a/RRuleSwiftExample/Info.plist b/RRuleSwiftExample/Info.plist index 44dfdc5..32a3359 100644 --- a/RRuleSwiftExample/Info.plist +++ b/RRuleSwiftExample/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.0.8 + 0.0.9 CFBundleSignature ???? CFBundleVersion - 8 + 9 LSRequiresIPhoneOS UILaunchStoryboardName