diff --git a/AFDateHelper.podspec b/AFDateHelper.podspec index f680870..df0ea6f 100644 --- a/AFDateHelper.podspec +++ b/AFDateHelper.podspec @@ -9,8 +9,8 @@ Pod::Spec.new do |s| s.name = "AFDateHelper" - s.version = "3.4.2" - s.summary = "NSDate Extension for Swift 2.0" + s.version = "3.5.0" + s.summary = "NSDate Extension for Swift 3.0" s.description = <<-DESC Extension for NSDate in Swift for creating, modifying or comparing dates. DESC diff --git a/AFDateHelper.xcodeproj/project.pbxproj b/AFDateHelper.xcodeproj/project.pbxproj index b86d229..5d03a55 100644 --- a/AFDateHelper.xcodeproj/project.pbxproj +++ b/AFDateHelper.xcodeproj/project.pbxproj @@ -7,15 +7,15 @@ objects = { /* Begin PBXBuildFile section */ - 63B7E9B61CF6DCFE00E9D8EF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63B7E9B51CF6DCFE00E9D8EF /* AppDelegate.swift */; }; - 63B7E9BB1CF6DCFF00E9D8EF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 63B7E9B91CF6DCFF00E9D8EF /* Main.storyboard */; }; - 63B7E9BD1CF6DCFF00E9D8EF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 63B7E9BC1CF6DCFF00E9D8EF /* Assets.xcassets */; }; 63B7E9C21CF6DD1300E9D8EF /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65889B721965051C0049740E /* ViewController.swift */; }; 63B7E9C31CF6DE8B00E9D8EF /* AFDateExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65D016A019771E80005220FB /* AFDateExtension.swift */; }; 65889B711965051C0049740E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65889B701965051C0049740E /* AppDelegate.swift */; }; 65889B731965051C0049740E /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65889B721965051C0049740E /* ViewController.swift */; }; 65889B781965051C0049740E /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 65889B771965051C0049740E /* Images.xcassets */; }; 65B75F2D19744D6D000AEFD4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 65B75F2C19744D6D000AEFD4 /* Main.storyboard */; }; + 65B802BB1D835DF7005361F4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65B802BA1D835DF7005361F4 /* AppDelegate.swift */; }; + 65B802BD1D836A06005361F4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 65B802BC1D836A06005361F4 /* Assets.xcassets */; }; + 65B802C21D836A18005361F4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 65B802C01D836A18005361F4 /* Main.storyboard */; }; 65D016A119771E80005220FB /* AFDateExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65D016A019771E80005220FB /* AFDateExtension.swift */; }; 65D86DED1BA0DB3E0081A0F9 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 65D86DEC1BA0DB3E0081A0F9 /* Launch Screen.storyboard */; }; CD1B226D1CB62C8400992308 /* AFDateHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = CD1B226C1CB62C8400992308 /* AFDateHelper.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -24,9 +24,6 @@ /* Begin PBXFileReference section */ 63B7E9B31CF6DCFE00E9D8EF /* AppleTVDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AppleTVDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 63B7E9B51CF6DCFE00E9D8EF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = AppleTVDemo/AppDelegate.swift; sourceTree = ""; }; - 63B7E9BA1CF6DCFF00E9D8EF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 63B7E9BC1CF6DCFF00E9D8EF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = AppleTVDemo/Assets.xcassets; sourceTree = ""; }; 63B7E9BE1CF6DCFF00E9D8EF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; name = Info.plist; path = AppleTVDemo/Info.plist; sourceTree = ""; }; 655AEB42192D42990053AD6C /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 655AEB44192D42990053AD6C /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; @@ -39,6 +36,9 @@ 65889B771965051C0049740E /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = AppDemo/Images.xcassets; sourceTree = ""; }; 65B75F2C19744D6D000AEFD4 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = AppDemo/Main.storyboard; sourceTree = ""; }; 65B7EA75197082AA0097E598 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + 65B802BA1D835DF7005361F4 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = AppleTVDemo/AppDelegate.swift; sourceTree = SOURCE_ROOT; }; + 65B802BC1D836A06005361F4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = AppleTVDemo/Assets.xcassets; sourceTree = SOURCE_ROOT; }; + 65B802C11D836A18005361F4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = AppleTVDemo/Base.lproj/Main.storyboard; sourceTree = SOURCE_ROOT; }; 65D016A019771E80005220FB /* AFDateExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AFDateExtension.swift; sourceTree = ""; }; 65D86DEC1BA0DB3E0081A0F9 /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = "Launch Screen.storyboard"; path = "AppDemo/Launch Screen.storyboard"; sourceTree = ""; }; 65DE9BBB1B3C639D00F66BEC /* AFDateHelper.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AFDateHelper.podspec; sourceTree = ""; }; @@ -75,9 +75,9 @@ 63B7E9B41CF6DCFE00E9D8EF /* AppleTVDemo */ = { isa = PBXGroup; children = ( - 63B7E9B51CF6DCFE00E9D8EF /* AppDelegate.swift */, - 63B7E9B91CF6DCFF00E9D8EF /* Main.storyboard */, - 63B7E9BC1CF6DCFF00E9D8EF /* Assets.xcassets */, + 65B802BA1D835DF7005361F4 /* AppDelegate.swift */, + 65B802BC1D836A06005361F4 /* Assets.xcassets */, + 65B802C01D836A18005361F4 /* Main.storyboard */, 63B7E9BE1CF6DCFF00E9D8EF /* Info.plist */, ); name = AppleTVDemo; @@ -228,6 +228,8 @@ TargetAttributes = { 63B7E9B21CF6DCFE00E9D8EF = { CreatedOnToolsVersion = 7.3.1; + DevelopmentTeam = ERA9S8SPNY; + LastSwiftMigration = 0800; }; 65889B6B1965051C0049740E = { CreatedOnToolsVersion = 6.0; @@ -265,8 +267,8 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 63B7E9BD1CF6DCFF00E9D8EF /* Assets.xcassets in Resources */, - 63B7E9BB1CF6DCFF00E9D8EF /* Main.storyboard in Resources */, + 65B802BD1D836A06005361F4 /* Assets.xcassets in Resources */, + 65B802C21D836A18005361F4 /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -294,9 +296,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 65B802BB1D835DF7005361F4 /* AppDelegate.swift in Sources */, 63B7E9C31CF6DE8B00E9D8EF /* AFDateExtension.swift in Sources */, 63B7E9C21CF6DD1300E9D8EF /* ViewController.swift in Sources */, - 63B7E9B61CF6DCFE00E9D8EF /* AppDelegate.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -321,13 +323,12 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ - 63B7E9B91CF6DCFF00E9D8EF /* Main.storyboard */ = { + 65B802C01D836A18005361F4 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( - 63B7E9BA1CF6DCFF00E9D8EF /* Base */, + 65B802C11D836A18005361F4 /* Base */, ); name = Main.storyboard; - path = AppleTVDemo; sourceTree = ""; }; /* End PBXVariantGroup section */ @@ -341,6 +342,7 @@ CLANG_ANALYZER_NONNULL = YES; CLANG_WARN_UNREACHABLE_CODE = YES; DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = ERA9S8SPNY; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "$(SRCROOT)/AppleTVDemo/Info.plist"; @@ -350,6 +352,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; }; @@ -364,6 +367,7 @@ CLANG_WARN_UNREACHABLE_CODE = YES; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = ERA9S8SPNY; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "$(SRCROOT)/AppleTVDemo/Info.plist"; @@ -373,6 +377,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; }; diff --git a/AFDateHelper/AFDateExtension.swift b/AFDateHelper/AFDateExtension.swift index 0df94b8..7cd1df6 100644 --- a/AFDateHelper/AFDateExtension.swift +++ b/AFDateHelper/AFDateExtension.swift @@ -1,7 +1,7 @@ // // AFDateExtension.swift // -// Version 3.4.2 +// Version 3.5.0 // // Created by Melvin Rivera on 7/15/14. // Copyright (c) 2014. All rights reserved. @@ -127,7 +127,7 @@ public extension Date { var s = string if string.hasSuffix("Z") { - s = s.substring(to: s.length-1) + "GMT" + s = s.substring(to: s.length-1).appending("GMT") as NSString } let formatter = Date.formatter(RSSFormat) if let date = formatter.date(from: string as String) { @@ -140,7 +140,7 @@ public extension Date { var s = string if string.hasSuffix("Z") { - s = s.substring(to: s.length-1) + "GMT" + s = s.substring(to: s.length-1).appending("GMT") as NSString } let formatter = Date.formatter(AltRSSFormat) if let date = formatter.date(from: string as String) { diff --git a/AppDemo/AppDelegate.swift b/AppDemo/AppDelegate.swift index 0b43eb0..ab4fa58 100644 --- a/AppDemo/AppDelegate.swift +++ b/AppDemo/AppDelegate.swift @@ -11,7 +11,7 @@ import UIKit class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool { + private func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool { return true } } diff --git a/AppDemo/Images.xcassets/AppIcon.appiconset/Contents.json b/AppDemo/Images.xcassets/AppIcon.appiconset/Contents.json index eeea76c..1d060ed 100644 --- a/AppDemo/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/AppDemo/Images.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", @@ -30,6 +40,16 @@ "size" : "60x60", "scale" : "3x" }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, { "idiom" : "ipad", "size" : "29x29", diff --git a/AppleTVDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json b/AppleTVDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json index 6a3dcfa..dea6e49 100644 --- a/AppleTVDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json +++ b/AppleTVDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json @@ -12,6 +12,12 @@ "filename" : "App Icon - Small.imagestack", "role" : "primary-app-icon" }, + { + "size" : "2320x720", + "idiom" : "tv", + "filename" : "Top Shelf Image Wide.imageset", + "role" : "top-shelf-image-wide" + }, { "size" : "1920x720", "idiom" : "tv", @@ -23,4 +29,4 @@ "version" : 1, "author" : "xcode" } -} +} \ No newline at end of file diff --git a/AppleTVDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json b/AppleTVDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json new file mode 100644 index 0000000..0564959 --- /dev/null +++ b/AppleTVDemo/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image Wide.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "idiom" : "tv", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/AppleTVDemo/Base.lproj/Main.storyboard b/AppleTVDemo/Base.lproj/Main.storyboard index 88603c5..38bd321 100644 --- a/AppleTVDemo/Base.lproj/Main.storyboard +++ b/AppleTVDemo/Base.lproj/Main.storyboard @@ -1,7 +1,8 @@ - + - + + @@ -12,25 +13,25 @@ - - + + - + @@ -65,4 +66,9 @@ + + + + + diff --git a/README.md b/README.md index e243932..393c945 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Platform](https://img.shields.io/cocoapods/p/AFDateHelper.svg?style=flat)](http://cocoapods.org/pods/AFDateHelper) [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -An NSDate Extension for Swift 2.0 +An NSDate Extension for Swift 3.0 ![Sample Project Screenshot](https://raw.githubusercontent.com/melvitax/AFDateHelper/master/Screenshot.png "Sample Project Screenshot") @@ -173,4 +173,4 @@ Melvin Rivera, melvin@allforces.com ## License -AFDateHelper is available under the MIT license. See the LICENSE file for more info. \ No newline at end of file +AFDateHelper is available under the MIT license. See the LICENSE file for more info.