diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..708ab6f
Binary files /dev/null and b/.DS_Store differ
diff --git a/.gitignore b/.gitignore
index bbe1cfe..3594b15 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
November.xcodeproj/xcuserdata
November.xcscheme
+xcuserdata
diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/November.podspec b/November.podspec
index 5c26dd9..1959c24 100644
--- a/November.podspec
+++ b/November.podspec
@@ -18,11 +18,12 @@ Pod::Spec.new do |spec|
spec.ios.deployment_target = '8.0'
spec.osx.deployment_target = '10.13'
+ spec.tvos.deployment_target = '11.2'
spec.source = { :git => "https://github.com/ManueGE/November.git", :tag => "#{spec.version}" }
spec.requires_arc = true
spec.framework = "Foundation"
- spec.source_files = "November/November/*.{swift}"
+ spec.source_files = "Sources/November/*.{swift}"
end
diff --git a/November.xcodeproj/project.pbxproj b/November.xcodeproj/project.pbxproj
index f229389..a476a35 100644
--- a/November.xcodeproj/project.pbxproj
+++ b/November.xcodeproj/project.pbxproj
@@ -7,16 +7,16 @@
objects = {
/* Begin PBXBuildFile section */
- 3222AA4C1D172DB300029DFE /* Date+DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3222AA4B1D172DB300029DFE /* Date+DateFormatter.swift */; };
32AD12CA1D12FF79005A1677 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32AD12C91D12FF79005A1677 /* AppDelegate.swift */; };
32AD12CC1D12FF79005A1677 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32AD12CB1D12FF79005A1677 /* ViewController.swift */; };
32AD12CF1D12FF79005A1677 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 32AD12CD1D12FF79005A1677 /* Main.storyboard */; };
32AD12D11D12FF79005A1677 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 32AD12D01D12FF79005A1677 /* Assets.xcassets */; };
32AD12D41D12FF79005A1677 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 32AD12D21D12FF79005A1677 /* LaunchScreen.storyboard */; };
- 32AD12E01D130052005A1677 /* DateFormatterProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32AD12DF1D130052005A1677 /* DateFormatterProvider.swift */; };
- 32AD12E21D1300E7005A1677 /* DateFormatter+Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32AD12E11D1300E7005A1677 /* DateFormatter+Configuration.swift */; };
32AD12EA1D130254005A1677 /* NovemberTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32AD12E91D130254005A1677 /* NovemberTests.swift */; };
- 32AD12F21D132853005A1677 /* NSDate+App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32AD12F11D132853005A1677 /* NSDate+App.swift */; };
+ 8D3C83FC23294B76001BF178 /* Date+DateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D3C83F823294B76001BF178 /* Date+DateFormatter.swift */; };
+ 8D3C83FD23294B76001BF178 /* NSDate+App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D3C83F923294B76001BF178 /* NSDate+App.swift */; };
+ 8D3C83FE23294B76001BF178 /* DateFormatter+Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D3C83FA23294B76001BF178 /* DateFormatter+Configuration.swift */; };
+ 8D3C83FF23294B76001BF178 /* DateFormatterProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D3C83FB23294B76001BF178 /* DateFormatterProvider.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -30,7 +30,6 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
- 3222AA4B1D172DB300029DFE /* Date+DateFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Date+DateFormatter.swift"; sourceTree = ""; };
32AD12C61D12FF79005A1677 /* November.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = November.app; sourceTree = BUILT_PRODUCTS_DIR; };
32AD12C91D12FF79005A1677 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
32AD12CB1D12FF79005A1677 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
@@ -38,12 +37,13 @@
32AD12D01D12FF79005A1677 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
32AD12D31D12FF79005A1677 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
32AD12D51D12FF79005A1677 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 32AD12DF1D130052005A1677 /* DateFormatterProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateFormatterProvider.swift; sourceTree = ""; };
- 32AD12E11D1300E7005A1677 /* DateFormatter+Configuration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DateFormatter+Configuration.swift"; sourceTree = ""; };
32AD12E71D130254005A1677 /* NovemberTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NovemberTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
32AD12E91D130254005A1677 /* NovemberTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NovemberTests.swift; sourceTree = ""; };
32AD12EB1D130254005A1677 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- 32AD12F11D132853005A1677 /* NSDate+App.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSDate+App.swift"; sourceTree = ""; };
+ 8D3C83F823294B76001BF178 /* Date+DateFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "Date+DateFormatter.swift"; path = "Sources/November/Date+DateFormatter.swift"; sourceTree = SOURCE_ROOT; };
+ 8D3C83F923294B76001BF178 /* NSDate+App.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "NSDate+App.swift"; path = "Sources/November/NSDate+App.swift"; sourceTree = SOURCE_ROOT; };
+ 8D3C83FA23294B76001BF178 /* DateFormatter+Configuration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "DateFormatter+Configuration.swift"; path = "Sources/November/DateFormatter+Configuration.swift"; sourceTree = SOURCE_ROOT; };
+ 8D3C83FB23294B76001BF178 /* DateFormatterProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DateFormatterProvider.swift; path = Sources/November/DateFormatterProvider.swift; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -85,10 +85,12 @@
32AD12C81D12FF79005A1677 /* November */ = {
isa = PBXGroup;
children = (
+ 8D3C83F823294B76001BF178 /* Date+DateFormatter.swift */,
+ 8D3C83FA23294B76001BF178 /* DateFormatter+Configuration.swift */,
+ 8D3C83FB23294B76001BF178 /* DateFormatterProvider.swift */,
+ 8D3C83F923294B76001BF178 /* NSDate+App.swift */,
32AD12C91D12FF79005A1677 /* AppDelegate.swift */,
32AD12CB1D12FF79005A1677 /* ViewController.swift */,
- 32AD12F11D132853005A1677 /* NSDate+App.swift */,
- 32AD12DE1D130047005A1677 /* November */,
32AD12CD1D12FF79005A1677 /* Main.storyboard */,
32AD12D01D12FF79005A1677 /* Assets.xcassets */,
32AD12D21D12FF79005A1677 /* LaunchScreen.storyboard */,
@@ -97,16 +99,6 @@
path = November;
sourceTree = "";
};
- 32AD12DE1D130047005A1677 /* November */ = {
- isa = PBXGroup;
- children = (
- 3222AA4B1D172DB300029DFE /* Date+DateFormatter.swift */,
- 32AD12DF1D130052005A1677 /* DateFormatterProvider.swift */,
- 32AD12E11D1300E7005A1677 /* DateFormatter+Configuration.swift */,
- );
- path = November;
- sourceTree = "";
- };
32AD12E81D130254005A1677 /* NovemberTests */ = {
isa = PBXGroup;
children = (
@@ -161,25 +153,25 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
- LastUpgradeCheck = 1000;
+ LastUpgradeCheck = 1020;
ORGANIZATIONNAME = manuege;
TargetAttributes = {
32AD12C51D12FF78005A1677 = {
CreatedOnToolsVersion = 7.3.1;
- DevelopmentTeam = CF864KN2XE;
- ProvisioningStyle = Automatic;
+ ProvisioningStyle = Manual;
};
32AD12E61D130254005A1677 = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = CF864KN2XE;
DevelopmentTeamName = "Manuel Garcia-Estan Martinez";
+ LastSwiftMigration = 1020;
TestTargetID = 32AD12C51D12FF78005A1677;
};
};
};
buildConfigurationList = 32AD12C11D12FF78005A1677 /* Build configuration list for PBXProject "November" */;
compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
+ developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
@@ -221,11 +213,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- 32AD12F21D132853005A1677 /* NSDate+App.swift in Sources */,
- 3222AA4C1D172DB300029DFE /* Date+DateFormatter.swift in Sources */,
- 32AD12E21D1300E7005A1677 /* DateFormatter+Configuration.swift in Sources */,
+ 8D3C83FC23294B76001BF178 /* Date+DateFormatter.swift in Sources */,
32AD12CC1D12FF79005A1677 /* ViewController.swift in Sources */,
- 32AD12E01D130052005A1677 /* DateFormatterProvider.swift in Sources */,
+ 8D3C83FE23294B76001BF178 /* DateFormatter+Configuration.swift in Sources */,
+ 8D3C83FF23294B76001BF178 /* DateFormatterProvider.swift in Sources */,
+ 8D3C83FD23294B76001BF178 /* NSDate+App.swift in Sources */,
32AD12CA1D12FF79005A1677 /* AppDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -320,7 +312,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
- SWIFT_VERSION = 3.0;
+ SWIFT_VERSION = 5.0;
};
name = Debug;
};
@@ -368,7 +360,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
- SWIFT_VERSION = 3.0;
+ SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
@@ -378,12 +370,13 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- DEVELOPMENT_TEAM = CF864KN2XE;
+ CODE_SIGN_STYLE = Manual;
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = November/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.manuege.november;
PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 4.2;
+ PROVISIONING_PROFILE_SPECIFIER = "";
};
name = Debug;
};
@@ -392,13 +385,14 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
- DEVELOPMENT_TEAM = CF864KN2XE;
+ CODE_SIGN_STYLE = Manual;
+ DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = November/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.manuege.november;
PRODUCT_NAME = "$(TARGET_NAME)";
+ PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
- SWIFT_VERSION = 4.2;
};
name = Release;
};
@@ -410,7 +404,6 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.manuege.november-tests";
PRODUCT_NAME = "$(TARGET_NAME)";
- SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/November.app/November";
};
name = Debug;
@@ -424,7 +417,6 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.manuege.november-tests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
- SWIFT_VERSION = 4.2;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/November.app/November";
};
name = Release;
diff --git a/November/.DS_Store b/November/.DS_Store
new file mode 100644
index 0000000..5008ddf
Binary files /dev/null and b/November/.DS_Store differ
diff --git a/November/AppDelegate.swift b/November/AppDelegate.swift
index ca12671..1422df6 100644
--- a/November/AppDelegate.swift
+++ b/November/AppDelegate.swift
@@ -13,7 +13,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
- private func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
+ func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
return true
}
}
diff --git a/November/Assets.xcassets/AppIcon.appiconset/Contents.json b/November/Assets.xcassets/AppIcon.appiconset/Contents.json
index 118c98f..19882d5 100644
--- a/November/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ b/November/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -1,5 +1,15 @@
{
"images" : [
+ {
+ "idiom" : "iphone",
+ "size" : "20x20",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "iphone",
+ "size" : "20x20",
+ "scale" : "3x"
+ },
{
"idiom" : "iphone",
"size" : "29x29",
@@ -29,6 +39,11 @@
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
+ },
+ {
+ "idiom" : "ios-marketing",
+ "size" : "1024x1024",
+ "scale" : "1x"
}
],
"info" : {
diff --git a/Package.swift b/Package.swift
new file mode 100755
index 0000000..10a8e5e
--- /dev/null
+++ b/Package.swift
@@ -0,0 +1,14 @@
+// swift-tools-version:5.1
+// The swift-tools-version declares the minimum version of Swift required to build this package.
+
+import PackageDescription
+
+let package = Package(
+ name: "November",
+ products: [
+ .library(name: "November", targets: ["November"]),
+ ],
+ targets: [
+ .target(name: "November", dependencies: [])
+ ]
+)
diff --git a/Sources/.DS_Store b/Sources/.DS_Store
new file mode 100644
index 0000000..62788e7
Binary files /dev/null and b/Sources/.DS_Store differ
diff --git a/November/November/Date+DateFormatter.swift b/Sources/November/Date+DateFormatter.swift
similarity index 89%
rename from November/November/Date+DateFormatter.swift
rename to Sources/November/Date+DateFormatter.swift
index 62dbc9a..8465327 100644
--- a/November/November/Date+DateFormatter.swift
+++ b/Sources/November/Date+DateFormatter.swift
@@ -18,7 +18,7 @@ public extension Date {
- parameter formatter: The provider of the `NSFormatter` used in the conversion
- returns: the string representation of the date using the given configurator
*/
- public func string(with formatter: DateFormatter) -> String {
+ func string(with formatter: DateFormatter) -> String {
return formatter.string(from: self)
}
@@ -28,7 +28,7 @@ public extension Date {
- parameter formatter: The `NSFormatter` used in the conversion
- returns: the date instantiated with the given string and the formatter. Will return `nil` if the string couldn't be parsed
*/
- public init?(string: String, formatter: DateFormatter) {
+ init?(string: String, formatter: DateFormatter) {
guard let date = formatter.date(from: string) else { return nil }
self.init(timeIntervalSince1970: date.timeIntervalSince1970)
}
diff --git a/November/November/DateFormatter+Configuration.swift b/Sources/November/DateFormatter+Configuration.swift
similarity index 92%
rename from November/November/DateFormatter+Configuration.swift
rename to Sources/November/DateFormatter+Configuration.swift
index 573927f..bd8174b 100644
--- a/November/November/DateFormatter+Configuration.swift
+++ b/Sources/November/DateFormatter+Configuration.swift
@@ -91,7 +91,7 @@ public extension Date {
- parameter locale: The locale used to perform the conversion. Default is `nil`, so the default location for `DateFormatter` will be used
- returns: the string representation for the date using the given dateStyle, timeStyle and locale
*/
- public func string(dateStyle: DateFormatter.Style, timeStyle: DateFormatter.Style, locale: Locale? = nil) -> String {
+ func string(dateStyle: DateFormatter.Style, timeStyle: DateFormatter.Style, locale: Locale? = nil) -> String {
if let locale = locale {
return string(with: .localizedStyle(dateStyle: dateStyle, timeStyle: timeStyle, locale: locale))
}
@@ -107,7 +107,7 @@ public extension Date {
- parameter locale: The locale used to perform the conversion. Default is `nil`, so the default location for `DateFormatter` will be used
- returns: the string representation for the date using the given template and locale
*/
- public func string(withTemplate template: String, locale: Locale? = nil) -> String {
+ func string(withTemplate template: String, locale: Locale? = nil) -> String {
if let locale = locale {
return string(with: .localizedTemplate(template: template, locale: locale))
}
@@ -123,7 +123,7 @@ public extension Date {
- parameter locale: The locale used to perform the conversion. Default is `nil`, so the default location for `DateFormatter` will be used
- returns: the string representation for the date using the given format and locale
*/
- public func string(withFormat format: String, locale: Locale? = nil) -> String {
+ func string(withFormat format: String, locale: Locale? = nil) -> String {
if let locale = locale {
return string(with: .localizedFormat(format: format, locale: locale))
}
@@ -142,7 +142,7 @@ public extension Date {
- parameter locale: The locale used to perform the conversion. Default is `nil`, so the default location for `DateFormatter` will be used
- returns: the date instantiated with the given dateStyle, timeStyle and locale. Will return `nil` if the string couldn't be parsed
*/
- public init?(string: String, dateStyle: DateFormatter.Style, timeStyle: DateFormatter.Style, locale: Locale? = nil) {
+ init?(string: String, dateStyle: DateFormatter.Style, timeStyle: DateFormatter.Style, locale: Locale? = nil) {
if let locale = locale {
self.init(string: string, configuration: .localizedStyle(dateStyle: dateStyle, timeStyle: timeStyle, locale: locale))
}
@@ -158,7 +158,7 @@ public extension Date {
- parameter locale: The locale used to perform the conversion. Default is `nil`, so the default location for `DateFormatter` will be used
- returns: the date instantiated with the given template and locale. Will return `nil` if the string couldn't be parsed
*/
- public init?(string: String, template: String, locale: Locale? = nil) {
+ init?(string: String, template: String, locale: Locale? = nil) {
if let locale = locale {
self.init(string: string, configuration: .localizedTemplate(template: template, locale: locale))
}
@@ -174,7 +174,7 @@ public extension Date {
- parameter locale: The locale used to perform the conversion. Default is `nil`, so the default location for `DateFormatter` will be used
- returns: the date instantiated with the given format and locale. Will return `nil` if the string couldn't be parsed
*/
- public init?(string: String, format: String, locale: Locale? = nil) {
+ init?(string: String, format: String, locale: Locale? = nil) {
if let locale = locale {
self.init(string: string, configuration: .localizedFormat(format: format, locale: locale))
}
diff --git a/November/November/DateFormatterProvider.swift b/Sources/November/DateFormatterProvider.swift
similarity index 100%
rename from November/November/DateFormatterProvider.swift
rename to Sources/November/DateFormatterProvider.swift
diff --git a/November/NSDate+App.swift b/Sources/November/NSDate+App.swift
similarity index 100%
rename from November/NSDate+App.swift
rename to Sources/November/NSDate+App.swift