diff --git a/.gitignore b/.gitignore index 5aaa105fc..c56cb7bd9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ XcodeCoverage +RELEASE_NOTES.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d9a1c477..f993dd919 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +#### Version 2.5.2 + +* Ensure that all the streams are downloadable at full speed. (#177) +* Post the video notification after setting the movie player’s contentURL property. (#233) +* Fixed playback of some age restricted videos. + #### Version 2.5.1 * Adaptation to YouTube API change. (#231) diff --git a/Scripts/release.sh b/Scripts/release.sh index 7541586eb..7ae0f6260 100755 --- a/Scripts/release.sh +++ b/Scripts/release.sh @@ -19,8 +19,15 @@ fi VERSION=$1 VERSION_PARTS=(${VERSION//./ }) +grep "#### Version ${VERSION}" RELEASE_NOTES.md > /dev/null || (echo "RELEASE_NOTES.md must contain release notes for version ${VERSION}" && exit 1) + git flow release start ${VERSION} +echo "Updating CHANGELOG" +echo -e "$(cat RELEASE_NOTES.md)\n\n$(cat CHANGELOG.md)" > CHANGELOG.md +git add CHANGELOG.md +git commit -m "Update CHANGELOG for version ${VERSION}" + echo "Updating version" CURRENT_PROJECT_VERSION=$(xcodebuild -project XCDYouTubeKit.xcodeproj -showBuildSettings | awk '/CURRENT_PROJECT_VERSION/{print $3}') CURRENT_PROJECT_VERSION=$(expr ${CURRENT_PROJECT_VERSION} + 1) @@ -39,15 +46,19 @@ git commit -m "Update version to ${VERSION}" update_badges "develop" "master" -git flow release finish ${VERSION} +# allow warnings until https://github.com/CocoaPods/CocoaPods/issues/5188 is resolved +pod lib lint --allow-warnings XCDYouTubeKit.podspec + +GIT_MERGE_AUTOEDIT=no git flow release finish -s -f RELEASE_NOTES.md ${VERSION} + +echo -e "#### Version X.Y.Z\n\n* " > RELEASE_NOTES.md update_badges "master" "develop" echo "Things remaining to do" echo " * git push with tags (master and develop)" echo " * check that build is passing on travis: https://travis-ci.org/0xced/XCDYouTubeKit/" -echo " * pod lib lint --verbose XCDYouTubeKit.podspec" -echo " * pod trunk push --verbose XCDYouTubeKit.podspec" -echo " * pod spec lint --verbose XCDYouTubeKit.podspec" +echo " * pod trunk push XCDYouTubeKit.podspec" +echo " * pod spec lint XCDYouTubeKit.podspec" echo " * create a new release on GitHub: https://github.com/0xced/XCDYouTubeKit/releases/new" echo " * close milestone on GitHub if applicable: https://github.com/0xced/XCDYouTubeKit/milestones" diff --git a/XCDYouTubeKit Demo/Podfile b/XCDYouTubeKit Demo/Podfile index c87ce977c..7ce898741 100644 --- a/XCDYouTubeKit Demo/Podfile +++ b/XCDYouTubeKit Demo/Podfile @@ -1,10 +1,10 @@ -xcodeproj 'XCDYouTubeKit Demo.xcodeproj' +project 'XCDYouTubeKit Demo.xcodeproj' workspace '../XCDYouTubeKit Demo.xcworkspace' inhibit_all_warnings! def import_pods - pod 'XCDLumberjackNSLogger', '~> 1.0.0' + pod 'XCDLumberjackNSLogger', '~> 1.0' end target 'XCDYouTubeKit iOS Demo' do @@ -18,7 +18,6 @@ target 'XCDYouTubeKit OS X Demo' do end target 'XCDYouTubeKit tvOS Demo' do - plugin 'cocoapods-expert-difficulty' platform :tvos, '9.0' - pod 'Google-API-Client/YouTube', '~> 1.0.422' + pod 'GoogleAPIClient/YouTube', '~> 1.0' end diff --git a/XCDYouTubeKit Demo/Podfile.lock b/XCDYouTubeKit Demo/Podfile.lock index c6cd3a8a4..b3813db8e 100644 --- a/XCDYouTubeKit Demo/Podfile.lock +++ b/XCDYouTubeKit Demo/Podfile.lock @@ -1,39 +1,40 @@ PODS: - - CocoaLumberjack (2.0.1): - - CocoaLumberjack/Default (= 2.0.1) - - CocoaLumberjack/Extensions (= 2.0.1) - - CocoaLumberjack/Core (2.0.1) - - CocoaLumberjack/Default (2.0.1): + - CocoaLumberjack (2.2.0): + - CocoaLumberjack/Default (= 2.2.0) + - CocoaLumberjack/Extensions (= 2.2.0) + - CocoaLumberjack/Core (2.2.0) + - CocoaLumberjack/Default (2.2.0): - CocoaLumberjack/Core - - CocoaLumberjack/Extensions (2.0.1): + - CocoaLumberjack/Extensions (2.2.0): - CocoaLumberjack/Default - - Google-API-Client/Common (1.0.422): - - gtm-http-fetcher (~> 1.0.141) - - gtm-oauth2 (~> 1.0.125) - - Google-API-Client/YouTube (1.0.422): - - Google-API-Client/Common - - gtm-http-fetcher (~> 1.0.141) - - gtm-oauth2 (~> 1.0.125) - - gtm-http-fetcher (1.0.141) - - gtm-oauth2 (1.0.126): - - gtm-http-fetcher (~> 1.0.141) + - GoogleAPIClient/Core (1.0.3): + - GTMSessionFetcher (~> 1.1) + - GoogleAPIClient/YouTube (1.0.3): + - GoogleAPIClient/Core + - GTMSessionFetcher (~> 1.1) + - GTMSessionFetcher (1.1.2): + - GTMSessionFetcher/Full (= 1.1.2) + - GTMSessionFetcher/Core (1.1.2) + - GTMSessionFetcher/Full (1.1.2): + - GTMSessionFetcher/Core (= 1.1.2) - NSLogger (1.5.1): - NSLogger/Standard (= 1.5.1) - NSLogger/Standard (1.5.1) - - XCDLumberjackNSLogger (1.0.1): - - CocoaLumberjack (~> 2.0.0) - - NSLogger (~> 1.5.1) + - XCDLumberjackNSLogger (1.0.2): + - CocoaLumberjack (~> 2.0) + - NSLogger (~> 1.5) DEPENDENCIES: - - Google-API-Client/YouTube (~> 1.0.422) - - XCDLumberjackNSLogger (~> 1.0.0) + - GoogleAPIClient/YouTube (~> 1.0) + - XCDLumberjackNSLogger (~> 1.0) SPEC CHECKSUMS: - CocoaLumberjack: 019d1361244274a6138c788c6cb80baabc13fb8f - Google-API-Client: cb712cf122f1d7fda966de4c2bc551324573366c - gtm-http-fetcher: 6d4617e7d343b6e4c082b777541c334eb6f5d81e - gtm-oauth2: 2a18b824e4f8a02df6cfe987beb59ae9d9697f9d + CocoaLumberjack: 17fe8581f84914d5d7e6360f7c70022b173c3ae0 + GoogleAPIClient: 06a32889d31c0f1c9ae528e31139ec3680b25e0d + GTMSessionFetcher: 765d87b1ff52999f865857c11bcdad516696cc89 NSLogger: 5ed223a2436df96244e033be750656dacdeec034 - XCDLumberjackNSLogger: 867392d7b40490e1b15aac9c1acee0952bf33d61 + XCDLumberjackNSLogger: 0226baa5148a2fa0d18731eee295fbf8f991f7ff -COCOAPODS: 0.39.0 +PODFILE CHECKSUM: 9d0d2c79901dca180e90c5f942f01e6e718c8673 + +COCOAPODS: 1.0.0.beta.8 diff --git a/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/CocoaLumberjack.modulemap b/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/CocoaLumberjack.modulemap deleted file mode 100644 index 8b95381e5..000000000 --- a/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/CocoaLumberjack.modulemap +++ /dev/null @@ -1,4 +0,0 @@ -framework module CocoaLumberjack { - header "CocoaLumberjack.h" - export * -} diff --git a/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/CocoaLumberjack.swift b/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/CocoaLumberjack.swift index 3562a9334..5f022ce9e 100644 --- a/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/CocoaLumberjack.swift +++ b/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/CocoaLumberjack.swift @@ -14,28 +14,32 @@ // prior written permission of Deusty, LLC. import Foundation -import CocoaLumberjack extension DDLogFlag { public static func fromLogLevel(logLevel: DDLogLevel) -> DDLogFlag { - return DDLogFlag(logLevel.rawValue) + return DDLogFlag(rawValue: logLevel.rawValue) } + + public init(_ logLevel: DDLogLevel) { + self = DDLogFlag(rawValue: logLevel.rawValue) + } ///returns the log level, or the lowest equivalant. public func toLogLevel() -> DDLogLevel { if let ourValid = DDLogLevel(rawValue: self.rawValue) { return ourValid } else { - let logFlag = self - if logFlag & .Verbose == .Verbose { + let logFlag:DDLogFlag = self + + if logFlag.contains(.Verbose) { return .Verbose - } else if logFlag & .Debug == .Debug { + } else if logFlag.contains(.Debug) { return .Debug - } else if logFlag & .Info == .Info { + } else if logFlag.contains(.Info) { return .Info - } else if logFlag & .Warning == .Warning { + } else if logFlag.contains(.Warning) { return .Warning - } else if logFlag & .Error == .Error { + } else if logFlag.contains(.Error) { return .Error } else { return .Off @@ -44,48 +48,44 @@ extension DDLogFlag { } } -extension DDMultiFormatter { - public var formatterArray: [DDLogFormatter] { - return self.formatters as! [DDLogFormatter] - } -} - public var defaultDebugLevel = DDLogLevel.Verbose public func resetDefaultDebugLevel() { defaultDebugLevel = DDLogLevel.Verbose } -public func SwiftLogMacro(isAsynchronous: Bool, level: DDLogLevel, flag flg: DDLogFlag, context: Int = 0, file: StaticString = __FILE__, function: StaticString = __FUNCTION__, line: UInt = __LINE__, tag: AnyObject? = nil, @autoclosure #string: () -> String) { +public func SwiftLogMacro(isAsynchronous: Bool, level: DDLogLevel, flag flg: DDLogFlag, context: Int = 0, file: StaticString = __FILE__, function: StaticString = __FUNCTION__, line: UInt = __LINE__, tag: AnyObject? = nil, @autoclosure string: () -> String) { if level.rawValue & flg.rawValue != 0 { - // Tell the DDLogMessage constructor to copy the C strings that get passed to it. Using string interpolation to prevent integer overflow warning when using StaticString.stringValue - let logMessage = DDLogMessage(message: string(), level: level, flag: flg, context: context, file: "\(file)", function: "\(function)", line: line, tag: tag, options: .CopyFile | .CopyFunction, timestamp: nil) + // Tell the DDLogMessage constructor to copy the C strings that get passed to it. + // Using string interpolation to prevent integer overflow warning when using StaticString.stringValue + let logMessage = DDLogMessage(message: string(), level: level, flag: flg, context: context, file: "\(file)", function: "\(function)", line: line, tag: tag, options: [.CopyFile, .CopyFunction], timestamp: nil) DDLog.log(isAsynchronous, message: logMessage) } } -public func DDLogDebug(@autoclosure logText: () -> String, level: DDLogLevel = defaultDebugLevel, context: Int = 0, file: StaticString = __FILE__, function: StaticString = __FUNCTION__, line: UWord = __LINE__, tag: AnyObject? = nil, asynchronous async: Bool = true) { - SwiftLogMacro(async, level, flag: .Debug, context: context, file: file, function: function, line: line, tag: tag, string: logText) +public func DDLogDebug(@autoclosure logText: () -> String, level: DDLogLevel = defaultDebugLevel, context: Int = 0, file: StaticString = __FILE__, function: StaticString = __FUNCTION__, line: UInt = __LINE__, tag: AnyObject? = nil, asynchronous async: Bool = true) { + SwiftLogMacro(async, level: level, flag: .Debug, context: context, file: file, function: function, line: line, tag: tag, string: logText) } -public func DDLogInfo(@autoclosure logText: () -> String, level: DDLogLevel = defaultDebugLevel, context: Int = 0, file: StaticString = __FILE__, function: StaticString = __FUNCTION__, line: UWord = __LINE__, tag: AnyObject? = nil, asynchronous async: Bool = true) { - SwiftLogMacro(async, level, flag: .Info, context: context, file: file, function: function, line: line, tag: tag, string: logText) +public func DDLogInfo(@autoclosure logText: () -> String, level: DDLogLevel = defaultDebugLevel, context: Int = 0, file: StaticString = __FILE__, function: StaticString = __FUNCTION__, line: UInt = __LINE__, tag: AnyObject? = nil, asynchronous async: Bool = true) { + SwiftLogMacro(async, level: level, flag: .Info, context: context, file: file, function: function, line: line, tag: tag, string: logText) } -public func DDLogWarn(@autoclosure logText: () -> String, level: DDLogLevel = defaultDebugLevel, context: Int = 0, file: StaticString = __FILE__, function: StaticString = __FUNCTION__, line: UWord = __LINE__, tag: AnyObject? = nil, asynchronous async: Bool = true) { - SwiftLogMacro(async, level, flag: .Warning, context: context, file: file, function: function, line: line, tag: tag, string: logText) +public func DDLogWarn(@autoclosure logText: () -> String, level: DDLogLevel = defaultDebugLevel, context: Int = 0, file: StaticString = __FILE__, function: StaticString = __FUNCTION__, line: UInt = __LINE__, tag: AnyObject? = nil, asynchronous async: Bool = true) { + SwiftLogMacro(async, level: level, flag: .Warning, context: context, file: file, function: function, line: line, tag: tag, string: logText) } -public func DDLogVerbose(@autoclosure logText: () -> String, level: DDLogLevel = defaultDebugLevel, context: Int = 0, file: StaticString = __FILE__, function: StaticString = __FUNCTION__, line: UWord = __LINE__, tag: AnyObject? = nil, asynchronous async: Bool = true) { - SwiftLogMacro(async, level, flag: .Verbose, context: context, file: file, function: function, line: line, tag: tag, string: logText) +public func DDLogVerbose(@autoclosure logText: () -> String, level: DDLogLevel = defaultDebugLevel, context: Int = 0, file: StaticString = __FILE__, function: StaticString = __FUNCTION__, line: UInt = __LINE__, tag: AnyObject? = nil, asynchronous async: Bool = true) { + SwiftLogMacro(async, level: level, flag: .Verbose, context: context, file: file, function: function, line: line, tag: tag, string: logText) } -public func DDLogError(@autoclosure logText: () -> String, level: DDLogLevel = defaultDebugLevel, context: Int = 0, file: StaticString = __FILE__, function: StaticString = __FUNCTION__, line: UWord = __LINE__, tag: AnyObject? = nil, asynchronous async: Bool = true) { - SwiftLogMacro(async, level, flag: .Error, context: context, file: file, function: function, line: line, tag: tag, string: logText) +public func DDLogError(@autoclosure logText: () -> String, level: DDLogLevel = defaultDebugLevel, context: Int = 0, file: StaticString = __FILE__, function: StaticString = __FUNCTION__, line: UInt = __LINE__, tag: AnyObject? = nil, asynchronous async: Bool = false) { + SwiftLogMacro(async, level: level, flag: .Error, context: context, file: file, function: function, line: line, tag: tag, string: logText) } -/// Analogous to the C preprocessor macro THIS_FILE +/// Analogous to the C preprocessor macro `THIS_FILE`. public func CurrentFileName(fileName: StaticString = __FILE__) -> String { // Using string interpolation to prevent integer overflow warning when using StaticString.stringValue - return "\(fileName)".lastPathComponent.stringByDeletingPathExtension + // This double-casting to NSString is necessary as changes to how Swift handles NSPathUtilities requres the string to be an NSString + return (("\(fileName)" as NSString).lastPathComponent as NSString).stringByDeletingPathExtension } diff --git a/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDASLLogCapture.h b/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDASLLogCapture.h index c87d0b1ac..f7fa79f3c 100644 --- a/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDASLLogCapture.h +++ b/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDASLLogCapture.h @@ -22,11 +22,27 @@ */ @interface DDASLLogCapture : NSObject +/** + * Start capturing logs + */ + (void)start; + +/** + * Stop capturing logs + */ + (void)stop; -// Default log level: DDLogLevelVerbose (i.e. capture all ASL messages). +/** + * Returns the current capture level. + * @note Default log level: DDLogLevelVerbose (i.e. capture all ASL messages). + */ + (DDLogLevel)captureLevel; + +/** + * Set the capture level + * + * @param level new level + */ + (void)setCaptureLevel:(DDLogLevel)level; @end diff --git a/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDASLLogCapture.m b/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDASLLogCapture.m index bb7f4c879..98d5342d7 100644 --- a/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDASLLogCapture.m +++ b/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDASLLogCapture.m @@ -99,7 +99,7 @@ + (void)configureAslQuery:(aslmsg)query { // Don't retrieve logs from our own DDASLLogger asl_set_query(query, kDDASLKeyDDLog, kDDASLDDLogValue, ASL_QUERY_OP_NOT_EQUAL); -#if !TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR +#if !TARGET_OS_IPHONE || TARGET_SIMULATOR int processId = [[NSProcessInfo processInfo] processIdentifier]; char pid[16]; sprintf(pid, "%d", processId); diff --git a/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDASLLogger.h b/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDASLLogger.h index 57c5f58f3..24cc1c3d1 100644 --- a/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDASLLogger.h +++ b/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDASLLogger.h @@ -32,7 +32,7 @@ extern const char* const kDDASLDDLogValue; * This class provides a logger for the Apple System Log facility. * * As described in the "Getting Started" page, - * the traditional NSLog() function directs it's output to two places: + * the traditional NSLog() function directs its output to two places: * * - Apple System Log * - StdErr (if stderr is a TTY) so log statements show up in Xcode console @@ -41,9 +41,13 @@ extern const char* const kDDASLDDLogValue; * However, if you instead choose to use file logging (for faster performance), * you may choose to use a file logger and a tty logger. **/ - @interface DDASLLogger : DDAbstractLogger +/** + * Singleton method + * + * @return the shared instance + */ + (instancetype)sharedInstance; // Inherited from DDAbstractLogger diff --git a/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDAbstractDatabaseLogger.h b/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDAbstractDatabaseLogger.h index 745a91b0f..aad36661e 100644 --- a/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDAbstractDatabaseLogger.h +++ b/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDAbstractDatabaseLogger.h @@ -27,7 +27,6 @@ * All that is needed for a concrete database logger is to extend this class * and override the methods in the implementation file that are prefixed with "db_". **/ - @interface DDAbstractDatabaseLogger : DDAbstractLogger { @protected @@ -67,6 +66,10 @@ * The default saveInterval is 60 seconds. **/ @property (assign, readwrite) NSUInteger saveThreshold; + +/** + * See the description for the `saveThreshold` property + */ @property (assign, readwrite) NSTimeInterval saveInterval; /** @@ -96,7 +99,15 @@ * The default deleteOnEverySave is NO. **/ @property (assign, readwrite) NSTimeInterval maxAge; + +/** + * See the description for the `maxAge` property + */ @property (assign, readwrite) NSTimeInterval deleteInterval; + +/** + * See the description for the `maxAge` property + */ @property (assign, readwrite) BOOL deleteOnEverySave; /** diff --git a/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDFileLogger.h b/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDFileLogger.h index d2f9ebb5d..f0bfdb6b7 100644 --- a/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDFileLogger.h +++ b/XCDYouTubeKit Demo/Pods/CocoaLumberjack/Classes/DDFileLogger.h @@ -46,28 +46,29 @@ extern unsigned long long const kDDDefaultLogFilesDiskQuota; #pragma mark - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// The LogFileManager protocol is designed to allow you to control all aspects of your log files. -// -// The primary purpose of this is to allow you to do something with the log files after they have been rolled. -// Perhaps you want to compress them to save disk space. -// Perhaps you want to upload them to an FTP server. -// Perhaps you want to run some analytics on the file. -// -// A default LogFileManager is, of course, provided. -// The default LogFileManager simply deletes old log files according to the maximumNumberOfLogFiles property. -// -// This protocol provides various methods to fetch the list of log files. -// -// There are two variants: sorted and unsorted. -// If sorting is not necessary, the unsorted variant is obviously faster. -// The sorted variant will return an array sorted by when the log files were created, -// with the most recently created log file at index 0, and the oldest log file at the end of the array. -// -// You can fetch only the log file paths (full path including name), log file names (name only), -// or an array of DDLogFileInfo objects. -// The DDLogFileInfo class is documented below, and provides a handy wrapper that -// gives you easy access to various file attributes such as the creation date or the file size. - +/** + * The LogFileManager protocol is designed to allow you to control all aspects of your log files. + * + * The primary purpose of this is to allow you to do something with the log files after they have been rolled. + * Perhaps you want to compress them to save disk space. + * Perhaps you want to upload them to an FTP server. + * Perhaps you want to run some analytics on the file. + * + * A default LogFileManager is, of course, provided. + * The default LogFileManager simply deletes old log files according to the maximumNumberOfLogFiles property. + * + * This protocol provides various methods to fetch the list of log files. + * + * There are two variants: sorted and unsorted. + * If sorting is not necessary, the unsorted variant is obviously faster. + * The sorted variant will return an array sorted by when the log files were created, + * with the most recently created log file at index 0, and the oldest log file at the end of the array. + * + * You can fetch only the log file paths (full path including name), log file names (name only), + * or an array of `DDLogFileInfo` objects. + * The `DDLogFileInfo` class is documented below, and provides a handy wrapper that + * gives you easy access to various file attributes such as the creation date or the file size. + */ @protocol DDLogFileManager @required @@ -93,25 +94,70 @@ extern unsigned long long const kDDDefaultLogFilesDiskQuota; // Public methods +/** + * Returns the logs directory (path) + */ - (NSString *)logsDirectory; +/** + * Returns an array of `NSString` objects, + * each of which is the filePath to an existing log file on disk. + **/ - (NSArray *)unsortedLogFilePaths; + +/** + * Returns an array of `NSString` objects, + * each of which is the fileName of an existing log file on disk. + **/ - (NSArray *)unsortedLogFileNames; + +/** + * Returns an array of `DDLogFileInfo` objects, + * each representing an existing log file on disk, + * and containing important information about the log file such as it's modification date and size. + **/ - (NSArray *)unsortedLogFileInfos; +/** + * Just like the `unsortedLogFilePaths` method, but sorts the array. + * The items in the array are sorted by creation date. + * The first item in the array will be the most recently created log file. + **/ - (NSArray *)sortedLogFilePaths; + +/** + * Just like the `unsortedLogFileNames` method, but sorts the array. + * The items in the array are sorted by creation date. + * The first item in the array will be the most recently created log file. + **/ - (NSArray *)sortedLogFileNames; + +/** + * Just like the `unsortedLogFileInfos` method, but sorts the array. + * The items in the array are sorted by creation date. + * The first item in the array will be the most recently created log file. + **/ - (NSArray *)sortedLogFileInfos; // Private methods (only to be used by DDFileLogger) +/** + * Generates a new unique log file path, and creates the corresponding log file. + **/ - (NSString *)createNewLogFile; @optional // Notifications from DDFileLogger +/** + * Called when a log file was archieved + */ - (void)didArchiveLogFile:(NSString *)logFilePath; + +/** + * Called when the roll action was executed and the log was archieved + */ - (void)didRollAndArchiveLogFile:(NSString *)logFilePath; @end @@ -125,18 +171,26 @@ extern unsigned long long const kDDDefaultLogFilesDiskQuota; * * All log files are placed inside the logsDirectory. * If a specific logsDirectory isn't specified, the default directory is used. - * On Mac, this is in ~/Library/Logs/. - * On iPhone, this is in ~/Library/Caches/Logs. + * On Mac, this is in `~/Library/Logs/`. + * On iPhone, this is in `~/Library/Caches/Logs`. * - * Log files are named "