Skip to content

Commit 5d881ce

Browse files
committed
Added test projects for different platforms and diffferent integrations methods. iOS / watchOS project is still a work in progress.
1 parent 97fee4f commit 5d881ce

File tree

62 files changed

+6593
-13
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+6593
-13
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,8 @@ DerivedData
2121
*.xcuserstate
2222
*.xcscmblueprint
2323

24+
# Cocoapods
25+
Podfile.lock
26+
Pods
27+
2428
Archives

Log4swift.xcodeproj/project.pbxproj

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,7 @@
882882
SDKROOT = macosx;
883883
SWIFT_OBJC_INTERFACE_HEADER_NAME = "log4swift-Swift.h";
884884
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
885+
SWIFT_VERSION = 4.0;
885886
VERSIONING_SYSTEM = "apple-generic";
886887
VERSION_INFO_PREFIX = "";
887888
};
@@ -938,6 +939,7 @@
938939
SDKROOT = macosx;
939940
SWIFT_OBJC_INTERFACE_HEADER_NAME = "log4swift-Swift.h";
940941
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
942+
SWIFT_VERSION = 4.0;
941943
VERSIONING_SYSTEM = "apple-generic";
942944
VERSION_INFO_PREFIX = "";
943945
};
@@ -958,7 +960,6 @@
958960
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
959961
PRODUCT_MODULE_NAME = "$(PROJECT_NAME:c99extidentifier)";
960962
SKIP_INSTALL = YES;
961-
SWIFT_VERSION = 4.0;
962963
};
963964
name = Debug;
964965
};
@@ -978,7 +979,6 @@
978979
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
979980
PRODUCT_MODULE_NAME = "$(PROJECT_NAME:c99extidentifier)";
980981
SKIP_INSTALL = YES;
981-
SWIFT_VERSION = 4.0;
982982
};
983983
name = Release;
984984
};
@@ -990,7 +990,6 @@
990990
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
991991
PRODUCT_BUNDLE_IDENTIFIER = fr.duquennoy.log4swiftTests;
992992
PRODUCT_NAME = Log4swiftTests;
993-
SWIFT_VERSION = 4.0;
994993
};
995994
name = Debug;
996995
};
@@ -1002,7 +1001,6 @@
10021001
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
10031002
PRODUCT_BUNDLE_IDENTIFIER = fr.duquennoy.log4swiftTests;
10041003
PRODUCT_NAME = Log4swiftTests;
1005-
SWIFT_VERSION = 4.0;
10061004
};
10071005
name = Release;
10081006
};
@@ -1014,7 +1012,6 @@
10141012
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
10151013
PRODUCT_BUNDLE_IDENTIFIER = fr.duquennoy.log4swiftTests;
10161014
PRODUCT_NAME = "$(TARGET_NAME)";
1017-
SWIFT_VERSION = 3.0;
10181015
};
10191016
name = Debug;
10201017
};
@@ -1026,7 +1023,6 @@
10261023
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
10271024
PRODUCT_BUNDLE_IDENTIFIER = fr.duquennoy.log4swiftTests;
10281025
PRODUCT_NAME = "$(TARGET_NAME)";
1029-
SWIFT_VERSION = 3.0;
10301026
};
10311027
name = Release;
10321028
};
@@ -1050,7 +1046,6 @@
10501046
SKIP_INSTALL = YES;
10511047
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
10521048
SWIFT_OBJC_BRIDGING_HEADER = "";
1053-
SWIFT_VERSION = 3.0;
10541049
TARGETED_DEVICE_FAMILY = 3;
10551050
TVOS_DEPLOYMENT_TARGET = 9.0;
10561051
};
@@ -1075,7 +1070,6 @@
10751070
SDKROOT = appletvos;
10761071
SKIP_INSTALL = YES;
10771072
SWIFT_OBJC_BRIDGING_HEADER = "";
1078-
SWIFT_VERSION = 3.0;
10791073
TARGETED_DEVICE_FAMILY = 3;
10801074
TVOS_DEPLOYMENT_TARGET = 9.0;
10811075
VALIDATE_PRODUCT = YES;
@@ -1107,7 +1101,6 @@
11071101
PROVISIONING_PROFILE = "";
11081102
SDKROOT = iphoneos;
11091103
SKIP_INSTALL = YES;
1110-
SWIFT_VERSION = 4.0;
11111104
TARGETED_DEVICE_FAMILY = "1,2";
11121105
};
11131106
name = Debug;
@@ -1131,7 +1124,6 @@
11311124
PROVISIONING_PROFILE = "";
11321125
SDKROOT = iphoneos;
11331126
SKIP_INSTALL = YES;
1134-
SWIFT_VERSION = 4.0;
11351127
TARGETED_DEVICE_FAMILY = "1,2";
11361128
VALIDATE_PRODUCT = YES;
11371129
};

Log4swift/LoggerFactory+loadFromFile.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extension LoggerFactory : FileObserverDelegate {
3333
/// Load configuration file in plist format.
3434
/// - parameter filePath: the path to the file to load
3535
/// - parameter autoReload: true if the configuration file should be reloaded automatically when modified. If file does not exist, it will be loaded when created. Only one file can be auto-reloaded at a time. If a second file is marked as such, the first one will no longer be.
36-
public func readConfiguration(fromPlistFile filePath: String, autoReload: Bool = false, reloadInterval: TimeInterval = 5.0) throws {
36+
@objc public func readConfiguration(fromPlistFile filePath: String, autoReload: Bool = false, reloadInterval: TimeInterval = 5.0) throws {
3737
let expandedFilePath = (filePath as NSString).expandingTildeInPath
3838
let configurationNSDictionary = NSDictionary(contentsOfFile: expandedFilePath)
3939
if let configurationDictionary = configurationNSDictionary as? Dictionary<String, Any> {
@@ -46,7 +46,7 @@ extension LoggerFactory : FileObserverDelegate {
4646
}
4747

4848
/// Reads a whole configuration from the given dictionary.
49-
public func readConfiguration(fromDictionary configurationDictionary: Dictionary<String, Any>) throws {
49+
@objc public func readConfiguration(fromDictionary configurationDictionary: Dictionary<String, Any>) throws {
5050
_ = try self.readConfigurationToTupple(fromDictionary: configurationDictionary)
5151
}
5252

Log4swift/LoggerFactory.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The logger factory is responsible for
2727
* matching UTI identifiers to loggers
2828
*/
2929
@objc public final class LoggerFactory: NSObject {
30-
static public let sharedInstance = LoggerFactory()
30+
@objc static public let sharedInstance = LoggerFactory()
3131

3232
/// Errors that can be thrown by logger factory
3333
public enum LoggerError: Error {

TestProjects/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# xcworkspaces for the test projects will be created by the different package managers on request, it should not be versioned.
2+
*.xcworkspace
3+
*.err
4+
*.log
5+
6+
Cartfile.resolved
7+
Carthage
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
git "../../../Log4swift/" "master"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"images" : [
3+
{
4+
"size" : "24x24",
5+
"idiom" : "watch",
6+
"scale" : "2x",
7+
"role" : "notificationCenter",
8+
"subtype" : "38mm"
9+
},
10+
{
11+
"size" : "27.5x27.5",
12+
"idiom" : "watch",
13+
"scale" : "2x",
14+
"role" : "notificationCenter",
15+
"subtype" : "42mm"
16+
},
17+
{
18+
"size" : "29x29",
19+
"idiom" : "watch",
20+
"role" : "companionSettings",
21+
"scale" : "2x"
22+
},
23+
{
24+
"size" : "29x29",
25+
"idiom" : "watch",
26+
"role" : "companionSettings",
27+
"scale" : "3x"
28+
},
29+
{
30+
"size" : "40x40",
31+
"idiom" : "watch",
32+
"scale" : "2x",
33+
"role" : "appLauncher",
34+
"subtype" : "38mm"
35+
},
36+
{
37+
"size" : "86x86",
38+
"idiom" : "watch",
39+
"scale" : "2x",
40+
"role" : "quickLook",
41+
"subtype" : "38mm"
42+
},
43+
{
44+
"size" : "98x98",
45+
"idiom" : "watch",
46+
"scale" : "2x",
47+
"role" : "quickLook",
48+
"subtype" : "42mm"
49+
}
50+
],
51+
"info" : {
52+
"version" : 1,
53+
"author" : "xcode"
54+
}
55+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="AgC-eL-Hgc">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="11055"/>
6+
</dependencies>
7+
<scenes>
8+
<!--Interface Controller-->
9+
<scene sceneID="aou-V4-d1y">
10+
<objects>
11+
<controller id="AgC-eL-Hgc" customClass="InterfaceController" customModuleProvider="target"/>
12+
</objects>
13+
</scene>
14+
</scenes>
15+
</document>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>$(DEVELOPMENT_LANGUAGE)</string>
7+
<key>CFBundleDisplayName</key>
8+
<string>iOS+watchOS-swift-carthage WatchKit App</string>
9+
<key>CFBundleExecutable</key>
10+
<string>$(EXECUTABLE_NAME)</string>
11+
<key>CFBundleIdentifier</key>
12+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
13+
<key>CFBundleInfoDictionaryVersion</key>
14+
<string>6.0</string>
15+
<key>CFBundleName</key>
16+
<string>$(PRODUCT_NAME)</string>
17+
<key>CFBundlePackageType</key>
18+
<string>APPL</string>
19+
<key>CFBundleShortVersionString</key>
20+
<string>1.0</string>
21+
<key>CFBundleVersion</key>
22+
<string>1</string>
23+
<key>UISupportedInterfaceOrientations</key>
24+
<array>
25+
<string>UIInterfaceOrientationPortrait</string>
26+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
27+
</array>
28+
<key>WKCompanionAppBundleIdentifier</key>
29+
<string>fr.duquennoy.Log4swiftTestApp</string>
30+
<key>WKWatchKitApp</key>
31+
<true/>
32+
</dict>
33+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "watch",
5+
"screenWidth" : "{130,145}",
6+
"scale" : "2x"
7+
},
8+
{
9+
"idiom" : "watch",
10+
"screenWidth" : "{146,165}",
11+
"scale" : "2x"
12+
}
13+
],
14+
"info" : {
15+
"version" : 1,
16+
"author" : "xcode"
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"assets" : [
3+
{
4+
"idiom" : "watch",
5+
"filename" : "Circular.imageset",
6+
"role" : "circular"
7+
},
8+
{
9+
"idiom" : "watch",
10+
"filename" : "Extra Large.imageset",
11+
"role" : "extra-large"
12+
},
13+
{
14+
"idiom" : "watch",
15+
"filename" : "Modular.imageset",
16+
"role" : "modular"
17+
},
18+
{
19+
"idiom" : "watch",
20+
"filename" : "Utilitarian.imageset",
21+
"role" : "utilitarian"
22+
}
23+
],
24+
"info" : {
25+
"version" : 1,
26+
"author" : "xcode"
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "watch",
5+
"screenWidth" : "{130,145}",
6+
"scale" : "2x"
7+
},
8+
{
9+
"idiom" : "watch",
10+
"screenWidth" : "{146,165}",
11+
"scale" : "2x"
12+
}
13+
],
14+
"info" : {
15+
"version" : 1,
16+
"author" : "xcode"
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "watch",
5+
"screenWidth" : "{130,145}",
6+
"scale" : "2x"
7+
},
8+
{
9+
"idiom" : "watch",
10+
"screenWidth" : "{146,165}",
11+
"scale" : "2x"
12+
}
13+
],
14+
"info" : {
15+
"version" : 1,
16+
"author" : "xcode"
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "watch",
5+
"screenWidth" : "{130,145}",
6+
"scale" : "2x"
7+
},
8+
{
9+
"idiom" : "watch",
10+
"screenWidth" : "{146,165}",
11+
"scale" : "2x"
12+
}
13+
],
14+
"info" : {
15+
"version" : 1,
16+
"author" : "xcode"
17+
}
18+
}

0 commit comments

Comments
 (0)