Skip to content

Commit

Permalink
- Spec fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-plebanovich committed Nov 16, 2021
1 parent 93a7b0e commit 30dba08
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 31 deletions.
17 changes: 4 additions & 13 deletions CarthageSupport/LogsManager.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/* Begin PBXBuildFile section */
0D54D90B261C903C00F6814C /* _DDTTYLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 0D54D909261C903C00F6814C /* _DDTTYLogger.h */; settings = {ATTRIBUTES = (Public, ); }; };
0D54D90C261C903C00F6814C /* _DDTTYLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D54D90A261C903C00F6814C /* _DDTTYLogger.m */; };
0D93892A27445A4600529662 /* NotificationLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = E201A84D2214200500258902 /* NotificationLogger.swift */; };
0DD92F5A23C07F9C009F9A19 /* CrashLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DD92F5923C07F9C009F9A19 /* CrashLogger.swift */; };
0DE150E5260640E40067545C /* Data+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DE150E2260640E40067545C /* Data+Utils.swift */; };
0DE150EC260641410067545C /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DE150EB260641410067545C /* Utils.swift */; };
Expand All @@ -21,7 +22,6 @@
E201A85C2214200500258902 /* Array+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = E201A8442214200500258902 /* Array+Utils.swift */; };
E201A85D2214200500258902 /* String+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = E201A8452214200500258902 /* String+Utils.swift */; };
E201A85F2214200500258902 /* Log.swift in Sources */ = {isa = PBXBuildFile; fileRef = E201A8472214200500258902 /* Log.swift */; };
E201A8632214200500258902 /* NotificationLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = E201A84D2214200500258902 /* NotificationLogger.swift */; };
E201A8642214200500258902 /* ConsoleLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = E201A84E2214200500258902 /* ConsoleLogger.swift */; };
E201A8652214200500258902 /* BaseLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = E201A8502214200500258902 /* BaseLogger.swift */; };
E201A8662214200500258902 /* BaseLogFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = E201A8512214200500258902 /* BaseLogFormatter.swift */; };
Expand Down Expand Up @@ -207,7 +207,6 @@
E201A84E2214200500258902 /* ConsoleLogger.swift */,
0DD92F5923C07F9C009F9A19 /* CrashLogger.swift */,
E2E0791222A812B500DECBD8 /* FileLogger.swift */,
E201A84D2214200500258902 /* NotificationLogger.swift */,
);
name = "_Message Loggers";
path = "../../LogsManager/Classes/_Message Loggers";
Expand Down Expand Up @@ -277,22 +276,14 @@
E2F9F8E223E03F88009E328F /* LogsManagerExtensionUnsafe */ = {
isa = PBXGroup;
children = (
E2F9F8F623E0422F009E328F /* _Alert Logger */,
E2F9F8F723E0422F009E328F /* AlertLogger.swift */,
E201A84D2214200500258902 /* NotificationLogger.swift */,
E2F9F8E323E03F88009E328F /* LogsManagerExtensionUnsafe.h */,
E2F9F8E423E03F88009E328F /* Info.plist */,
);
path = LogsManagerExtensionUnsafe;
sourceTree = "<group>";
};
E2F9F8F623E0422F009E328F /* _Alert Logger */ = {
isa = PBXGroup;
children = (
E2F9F8F723E0422F009E328F /* AlertLogger.swift */,
);
name = "_Alert Logger";
path = "../../LogsManager/ExtensionUnsafeClasses/_Alert Logger";
sourceTree = "<group>";
};
F1BD9B4AF93178888C20C526 /* Frameworks */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -488,7 +479,6 @@
E201A8642214200500258902 /* ConsoleLogger.swift in Sources */,
0DE150EC260641410067545C /* Utils.swift in Sources */,
0DE150F32606417C0067545C /* DateFormatter+Utils.swift in Sources */,
E201A8632214200500258902 /* NotificationLogger.swift in Sources */,
0DD92F5A23C07F9C009F9A19 /* CrashLogger.swift in Sources */,
E201A8652214200500258902 /* BaseLogger.swift in Sources */,
);
Expand All @@ -498,6 +488,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
0D93892A27445A4600529662 /* NotificationLogger.swift in Sources */,
E2F9F8F823E0422F009E328F /* AlertLogger.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@

import Foundation
import UserNotifications

#if !COCOAPODS
import LogsManager
#endif
import CocoaLumberjack


/// Logger that fires local notifications. Assure that notification permissions were granted for alert presentation.
@available(iOS 10.0, *)
@available(iOS 10.0, macOS 10.14, *)
open class NotificationLogger: BaseAbstractTextLogger {

// ******************************* MARK: - BaseAbstractTextLogger Overrides
Expand Down
10 changes: 4 additions & 6 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ PODS:
- CocoaLumberjack/Core (3.7.2)
- CocoaLumberjack/Swift (3.7.2):
- CocoaLumberjack/Core
- LogsManager (9.1.12):
- LogsManager/ExtensionUnsafe (= 9.1.12)
- LogsManager/Core (9.1.12):
- LogsManager (9.1.13):
- LogsManager/ExtensionUnsafe (= 9.1.13)
- LogsManager/ExtensionUnsafe (9.1.13):
- CocoaLumberjack/Swift (>= 3.7.2)
- LogsManager/ExtensionUnsafe (9.1.12):
- LogsManager/Core
- Nimble (9.2.1)
- Quick (4.0.0)
- RoutableLogger (9.1.12)
Expand Down Expand Up @@ -49,7 +47,7 @@ CHECKOUT OPTIONS:
SPEC CHECKSUMS:
APExtensions: 61ac6903670be0a2dba70dacbc4bd39f768e47af
CocoaLumberjack: b7e05132ff94f6ae4dfa9d5bce9141893a21d9da
LogsManager: 29cd86c03188eec0e74f8c4e3f549e17675204a7
LogsManager: 16a01d654f1a143b88cddcf0bc539d6fd3beb446
Nimble: e7e615c0335ee4bf5b0d786685451e62746117d5
Quick: 6473349e43b9271a8d43839d9ba1c442ed1b7ac4
RoutableLogger: 9ad367e9a79df59c3cf5a1707ba9598ffbae8784
Expand Down
16 changes: 10 additions & 6 deletions LogsManager.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,27 @@ Logs manager on top of CocoaLumberjack. Allows to easily configure log component
s.source = { :git => 'https://github.com/APUtils/LogsManager.git', :tag => s.version.to_s }

s.swift_versions = ['5.1']
s.frameworks = 'Foundation', 'UIKit'
s.frameworks = 'Foundation'

s.default_subspec = 'ExtensionUnsafe'
s.ios.deployment_target = '9.0'
s.osx.deployment_target = '10.10'
s.watchos.deployment_target = '3.0'
s.tvos.deployment_target = '9.0'

s.subspec 'Core' do |subspec|
subspec.source_files = 'LogsManager/Classes/**/*', 'LogsManager/Shared/**/*'
subspec.dependency 'CocoaLumberjack/Swift', '>= 3.7.2'

subspec.ios.deployment_target = '9.0'
subspec.osx.deployment_target = '10.10'
subspec.watchos.deployment_target = '3.0'
subspec.tvos.deployment_target = '9.0'
subspec.source_files = 'LogsManager/Classes/**/*', 'LogsManager/Shared/**/*'
subspec.dependency 'CocoaLumberjack/Swift', '>= 3.7.2'
end

s.subspec 'ExtensionUnsafe' do |subspec|
subspec.source_files = 'LogsManager/ExtensionUnsafeClasses/**/*'
subspec.dependency 'LogsManager/Core'
subspec.ios.deployment_target = '9.0'
subspec.source_files = 'LogsManager/ExtensionUnsafeClasses/**/*', 'LogsManager/Classes/**/*', 'LogsManager/Shared/**/*'
subspec.dependency 'CocoaLumberjack/Swift', '>= 3.7.2'
end

end
4 changes: 2 additions & 2 deletions LogsManager/Classes/_Extensions/DDLogMessage+Utils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ public extension DDLogMessage.Parameters {

if let error = error as? Error, let userInfo = error._userInfo {
let options: JSONSerialization.WritingOptions
if #available(iOS 13.0, *) {
if #available(iOS 13.0, tvOS 13.0, macOS 10.15, watchOSApplicationExtension 6.0, *) {
options = [.sortedKeys, .fragmentsAllowed, .withoutEscapingSlashes]
} else if #available(iOS 11.0, *) {
} else if #available(iOS 11.0, tvOS 11.0, macOS 10.13, watchOSApplicationExtension 4.0, *) {
options = [.sortedKeys, .fragmentsAllowed]
} else {
options = [.fragmentsAllowed]
Expand Down
4 changes: 2 additions & 2 deletions podCheck.command
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ cd "$base_dir"
set -e

# Checking lib lint
pod lib lint
pod lib lint --no-clean

# Checking spec lint
pod spec lint
pod spec lint --no-clean

0 comments on commit 30dba08

Please sign in to comment.