Skip to content

Commit df458e3

Browse files
committed
Swift-Package-Manager-ized
Used `swift package init --type library` to add the files & dir structure necessary to use `NilCoalescingAssignmentOperators` with the Swift Package Manager. * SwiftPM added: ⁃ `Package.swift` ⁃ `Sources/` dir ⁃ `.gitignore` ‣ Removed the `/*.xcodeproj` line from the `.gitignore`— we do actually want the xcodeproj checked-in. ‣ It also added a `Tests/` die with stuff in there, but I deleted it.  _I'll implement tests some other day— for now, the extensive uses of `NilCoalescingAssignmentOperators` within my own currently-being-developed apps are providing far more robust testing than unit tests could provide._ * Moved `NilCoalescingAssignmentOperators.swift` into the new `Sources/` dir. * Ran `swift package generate-xcodeproj` to generate a `NilCoalescingAssignmentOperators.xcodeproj` too. ‣ Makes integration with Xcode apps easier, and as a bonus, makes the lib compatible with Carthage too. ‣ Changed `SWIFT_VERSION` to `3.0`. ‣ Changed `IPHONEOS_DEPLOYMENT_TARGET` to `iOS 8.0` and `MACOSX_DEPLOYMENT_TARGET` to `macOS 10.9`, which are minimum versions necessary to run Swift 3.
1 parent c3719f0 commit df458e3

File tree

8 files changed

+359
-0
lines changed

8 files changed

+359
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.DS_Store
2+
/.build
3+
/Packages
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<plist version="1.0">
3+
<dict>
4+
<key>CFBundleDevelopmentRegion</key>
5+
<string>en</string>
6+
<key>CFBundleExecutable</key>
7+
<string>$(EXECUTABLE_NAME)</string>
8+
<key>CFBundleIdentifier</key>
9+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
10+
<key>CFBundleInfoDictionaryVersion</key>
11+
<string>6.0</string>
12+
<key>CFBundleName</key>
13+
<string>$(PRODUCT_NAME)</string>
14+
<key>CFBundlePackageType</key>
15+
<string>FMWK</string>
16+
<key>CFBundleShortVersionString</key>
17+
<string>1.0</string>
18+
<key>CFBundleSignature</key>
19+
<string>????</string>
20+
<key>CFBundleVersion</key>
21+
<string>$(CURRENT_PROJECT_VERSION)</string>
22+
<key>NSPrincipalClass</key>
23+
<string></string>
24+
</dict>
25+
</plist>
Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 46;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
OBJ_19 /* NilCoalescingAssignmentOperators.swift in Sources */ = {isa = PBXBuildFile; fileRef = OBJ_9 /* NilCoalescingAssignmentOperators.swift */; };
11+
/* End PBXBuildFile section */
12+
13+
/* Begin PBXFileReference section */
14+
OBJ_13 /* NilCoalescingAssignmentOperators.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = NilCoalescingAssignmentOperators.framework; sourceTree = BUILT_PRODUCTS_DIR; };
15+
OBJ_6 /* Package.swift */ = {isa = PBXFileReference; explicitFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
16+
OBJ_9 /* NilCoalescingAssignmentOperators.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NilCoalescingAssignmentOperators.swift; sourceTree = "<group>"; };
17+
/* End PBXFileReference section */
18+
19+
/* Begin PBXFrameworksBuildPhase section */
20+
OBJ_20 /* Frameworks */ = {
21+
isa = PBXFrameworksBuildPhase;
22+
buildActionMask = 0;
23+
files = (
24+
);
25+
runOnlyForDeploymentPostprocessing = 0;
26+
};
27+
/* End PBXFrameworksBuildPhase section */
28+
29+
/* Begin PBXGroup section */
30+
OBJ_10 /* Tests */ = {
31+
isa = PBXGroup;
32+
children = (
33+
);
34+
path = Tests;
35+
sourceTree = "<group>";
36+
};
37+
OBJ_12 /* Products */ = {
38+
isa = PBXGroup;
39+
children = (
40+
OBJ_13 /* NilCoalescingAssignmentOperators.framework */,
41+
);
42+
name = Products;
43+
sourceTree = BUILT_PRODUCTS_DIR;
44+
};
45+
OBJ_5 = {
46+
isa = PBXGroup;
47+
children = (
48+
OBJ_6 /* Package.swift */,
49+
OBJ_7 /* Sources */,
50+
OBJ_10 /* Tests */,
51+
OBJ_12 /* Products */,
52+
);
53+
sourceTree = "<group>";
54+
};
55+
OBJ_7 /* Sources */ = {
56+
isa = PBXGroup;
57+
children = (
58+
OBJ_8 /* NilCoalescingAssignmentOperators */,
59+
);
60+
path = Sources;
61+
sourceTree = "<group>";
62+
};
63+
OBJ_8 /* NilCoalescingAssignmentOperators */ = {
64+
isa = PBXGroup;
65+
children = (
66+
OBJ_9 /* NilCoalescingAssignmentOperators.swift */,
67+
);
68+
name = NilCoalescingAssignmentOperators;
69+
path = Sources;
70+
sourceTree = SOURCE_ROOT;
71+
};
72+
/* End PBXGroup section */
73+
74+
/* Begin PBXNativeTarget section */
75+
OBJ_14 /* NilCoalescingAssignmentOperators */ = {
76+
isa = PBXNativeTarget;
77+
buildConfigurationList = OBJ_15 /* Build configuration list for PBXNativeTarget "NilCoalescingAssignmentOperators" */;
78+
buildPhases = (
79+
OBJ_18 /* Sources */,
80+
OBJ_20 /* Frameworks */,
81+
);
82+
buildRules = (
83+
);
84+
dependencies = (
85+
);
86+
name = NilCoalescingAssignmentOperators;
87+
productName = NilCoalescingAssignmentOperators;
88+
productReference = OBJ_13 /* NilCoalescingAssignmentOperators.framework */;
89+
productType = "com.apple.product-type.framework";
90+
};
91+
/* End PBXNativeTarget section */
92+
93+
/* Begin PBXProject section */
94+
OBJ_1 /* Project object */ = {
95+
isa = PBXProject;
96+
attributes = {
97+
LastUpgradeCheck = 9999;
98+
};
99+
buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "NilCoalescingAssignmentOperators" */;
100+
compatibilityVersion = "Xcode 3.2";
101+
developmentRegion = English;
102+
hasScannedForEncodings = 0;
103+
knownRegions = (
104+
en,
105+
);
106+
mainGroup = OBJ_5;
107+
productRefGroup = OBJ_12 /* Products */;
108+
projectDirPath = "";
109+
projectRoot = "";
110+
targets = (
111+
OBJ_14 /* NilCoalescingAssignmentOperators */,
112+
);
113+
};
114+
/* End PBXProject section */
115+
116+
/* Begin PBXSourcesBuildPhase section */
117+
OBJ_18 /* Sources */ = {
118+
isa = PBXSourcesBuildPhase;
119+
buildActionMask = 0;
120+
files = (
121+
OBJ_19 /* NilCoalescingAssignmentOperators.swift in Sources */,
122+
);
123+
runOnlyForDeploymentPostprocessing = 0;
124+
};
125+
/* End PBXSourcesBuildPhase section */
126+
127+
/* Begin XCBuildConfiguration section */
128+
OBJ_16 /* Debug */ = {
129+
isa = XCBuildConfiguration;
130+
buildSettings = {
131+
ENABLE_TESTABILITY = YES;
132+
FRAMEWORK_SEARCH_PATHS = (
133+
"$(inherited)",
134+
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
135+
);
136+
HEADER_SEARCH_PATHS = "$(inherited)";
137+
INFOPLIST_FILE = NilCoalescingAssignmentOperators.xcodeproj/NilCoalescingAssignmentOperators_Info.plist;
138+
LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
139+
OTHER_LDFLAGS = "$(inherited)";
140+
OTHER_SWIFT_FLAGS = "$(inherited)";
141+
PRODUCT_BUNDLE_IDENTIFIER = NilCoalescingAssignmentOperators;
142+
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
143+
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
144+
TARGET_NAME = NilCoalescingAssignmentOperators;
145+
};
146+
name = Debug;
147+
};
148+
OBJ_17 /* Release */ = {
149+
isa = XCBuildConfiguration;
150+
buildSettings = {
151+
ENABLE_TESTABILITY = YES;
152+
FRAMEWORK_SEARCH_PATHS = (
153+
"$(inherited)",
154+
"$(PLATFORM_DIR)/Developer/Library/Frameworks",
155+
);
156+
HEADER_SEARCH_PATHS = "$(inherited)";
157+
INFOPLIST_FILE = NilCoalescingAssignmentOperators.xcodeproj/NilCoalescingAssignmentOperators_Info.plist;
158+
LD_RUNPATH_SEARCH_PATHS = "$(TOOLCHAIN_DIR)/usr/lib/swift/macosx";
159+
OTHER_LDFLAGS = "$(inherited)";
160+
OTHER_SWIFT_FLAGS = "$(inherited)";
161+
PRODUCT_BUNDLE_IDENTIFIER = NilCoalescingAssignmentOperators;
162+
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
163+
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
164+
TARGET_NAME = NilCoalescingAssignmentOperators;
165+
};
166+
name = Release;
167+
};
168+
OBJ_3 /* Debug */ = {
169+
isa = XCBuildConfiguration;
170+
buildSettings = {
171+
COMBINE_HIDPI_IMAGES = YES;
172+
COPY_PHASE_STRIP = NO;
173+
DEBUG_INFORMATION_FORMAT = dwarf;
174+
DYLIB_INSTALL_NAME_BASE = "@rpath";
175+
ENABLE_NS_ASSERTIONS = YES;
176+
GCC_OPTIMIZATION_LEVEL = 0;
177+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
178+
MACOSX_DEPLOYMENT_TARGET = 10.9;
179+
ONLY_ACTIVE_ARCH = YES;
180+
OTHER_SWIFT_FLAGS = "-DXcode";
181+
PRODUCT_NAME = "$(TARGET_NAME)";
182+
SDKROOT = macosx;
183+
SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator";
184+
SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE;
185+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
186+
SWIFT_VERSION = 3.0;
187+
USE_HEADERMAP = NO;
188+
};
189+
name = Debug;
190+
};
191+
OBJ_4 /* Release */ = {
192+
isa = XCBuildConfiguration;
193+
buildSettings = {
194+
COMBINE_HIDPI_IMAGES = YES;
195+
COPY_PHASE_STRIP = YES;
196+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
197+
DYLIB_INSTALL_NAME_BASE = "@rpath";
198+
GCC_OPTIMIZATION_LEVEL = s;
199+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
200+
MACOSX_DEPLOYMENT_TARGET = 10.9;
201+
OTHER_SWIFT_FLAGS = "-DXcode";
202+
PRODUCT_NAME = "$(TARGET_NAME)";
203+
SDKROOT = macosx;
204+
SUPPORTED_PLATFORMS = "macosx iphoneos iphonesimulator appletvos appletvsimulator watchos watchsimulator";
205+
SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE;
206+
SWIFT_OPTIMIZATION_LEVEL = "-O";
207+
SWIFT_VERSION = 3.0;
208+
USE_HEADERMAP = NO;
209+
};
210+
name = Release;
211+
};
212+
/* End XCBuildConfiguration section */
213+
214+
/* Begin XCConfigurationList section */
215+
OBJ_15 /* Build configuration list for PBXNativeTarget "NilCoalescingAssignmentOperators" */ = {
216+
isa = XCConfigurationList;
217+
buildConfigurations = (
218+
OBJ_16 /* Debug */,
219+
OBJ_17 /* Release */,
220+
);
221+
defaultConfigurationIsVisible = 0;
222+
defaultConfigurationName = Debug;
223+
};
224+
OBJ_2 /* Build configuration list for PBXProject "NilCoalescingAssignmentOperators" */ = {
225+
isa = XCConfigurationList;
226+
buildConfigurations = (
227+
OBJ_3 /* Debug */,
228+
OBJ_4 /* Release */,
229+
);
230+
defaultConfigurationIsVisible = 0;
231+
defaultConfigurationName = Debug;
232+
};
233+
/* End XCConfigurationList section */
234+
};
235+
rootObject = OBJ_1 /* Project object */;
236+
}

NilCoalescingAssignmentOperators.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "9999"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "OBJ_14"
18+
BuildableName = "NilCoalescingAssignmentOperators.framework"
19+
BlueprintName = "NilCoalescingAssignmentOperators"
20+
ReferencedContainer = "container:NilCoalescingAssignmentOperators.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
<AdditionalOptions>
33+
</AdditionalOptions>
34+
</TestAction>
35+
<LaunchAction
36+
buildConfiguration = "Debug"
37+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
38+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
39+
launchStyle = "0"
40+
useCustomWorkingDirectory = "NO"
41+
ignoresPersistentStateOnLaunch = "NO"
42+
debugDocumentVersioning = "YES"
43+
debugServiceExtension = "internal"
44+
allowLocationSimulation = "YES">
45+
<MacroExpansion>
46+
<BuildableReference
47+
BuildableIdentifier = "primary"
48+
BlueprintIdentifier = "OBJ_14"
49+
BuildableName = "NilCoalescingAssignmentOperators.framework"
50+
BlueprintName = "NilCoalescingAssignmentOperators"
51+
ReferencedContainer = "container:NilCoalescingAssignmentOperators.xcodeproj">
52+
</BuildableReference>
53+
</MacroExpansion>
54+
<AdditionalOptions>
55+
</AdditionalOptions>
56+
</LaunchAction>
57+
<ProfileAction
58+
buildConfiguration = "Release"
59+
shouldUseLaunchSchemeArgsEnv = "YES"
60+
savedToolIdentifier = ""
61+
useCustomWorkingDirectory = "NO"
62+
debugDocumentVersioning = "YES">
63+
</ProfileAction>
64+
<AnalyzeAction
65+
buildConfiguration = "Debug">
66+
</AnalyzeAction>
67+
<ArchiveAction
68+
buildConfiguration = "Release"
69+
revealArchiveInOrganizer = "YES">
70+
</ArchiveAction>
71+
</Scheme>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<plist version="1.0">
3+
<dict>
4+
<key>SchemeUserState</key>
5+
<dict>
6+
<key>NilCoalescingAssignmentOperators.xcscheme</key>
7+
<dict></dict>
8+
</dict>
9+
<key>SuppressBuildableAutocreation</key>
10+
<dict></dict>
11+
</dict>
12+
</plist>

Package.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import PackageDescription
2+
3+
let package = Package(
4+
name: "NilCoalescingAssignmentOperators"
5+
)
File renamed without changes.

0 commit comments

Comments
 (0)