Skip to content

Commit 8f53d61

Browse files
author
Rob Rix
committed
Merge pull request #27 from robrix/swift-2
Swift 2
2 parents bbe4e61 + 7120357 commit 8f53d61

6 files changed

Lines changed: 23 additions & 8 deletions

File tree

Box.xcodeproj/project.pbxproj

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
D4523D971B27B6600071A162 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4523D961B27B6600071A162 /* CoreFoundation.framework */; };
1011
D470AC3D19E86128003DA6C6 /* Box.h in Headers */ = {isa = PBXBuildFile; fileRef = D470AC3C19E86128003DA6C6 /* Box.h */; settings = {ATTRIBUTES = (Public, ); }; };
1112
D470AC4319E86128003DA6C6 /* Box.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D470AC3719E86128003DA6C6 /* Box.framework */; };
1213
D470AC4A19E86128003DA6C6 /* BoxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D470AC4919E86128003DA6C6 /* BoxTests.swift */; };
@@ -43,6 +44,7 @@
4344
/* End PBXContainerItemProxy section */
4445

4546
/* Begin PBXFileReference section */
47+
D4523D961B27B6600071A162 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
4648
D470AC3719E86128003DA6C6 /* Box.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Box.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4749
D470AC3B19E86128003DA6C6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4850
D470AC3C19E86128003DA6C6 /* Box.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Box.h; sourceTree = "<group>"; };
@@ -63,6 +65,7 @@
6365
isa = PBXFrameworksBuildPhase;
6466
buildActionMask = 2147483647;
6567
files = (
68+
D4523D971B27B6600071A162 /* CoreFoundation.framework in Frameworks */,
6669
);
6770
runOnlyForDeploymentPostprocessing = 0;
6871
};
@@ -127,6 +130,7 @@
127130
D470AC3A19E86128003DA6C6 /* Supporting Files */ = {
128131
isa = PBXGroup;
129132
children = (
133+
D4523D961B27B6600071A162 /* CoreFoundation.framework */,
130134
D470AC3B19E86128003DA6C6 /* Info.plist */,
131135
);
132136
name = "Supporting Files";
@@ -251,7 +255,8 @@
251255
D470AC2E19E86128003DA6C6 /* Project object */ = {
252256
isa = PBXProject;
253257
attributes = {
254-
LastUpgradeCheck = 0610;
258+
LastSwiftUpdateCheck = 0700;
259+
LastUpgradeCheck = 0700;
255260
ORGANIZATIONNAME = "Rob Rix";
256261
TargetAttributes = {
257262
D470AC3619E86128003DA6C6 = {
@@ -395,6 +400,7 @@
395400
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
396401
COPY_PHASE_STRIP = NO;
397402
CURRENT_PROJECT_VERSION = 1;
403+
ENABLE_BITCODE = YES;
398404
ENABLE_STRICT_OBJC_MSGSEND = YES;
399405
GCC_C_LANGUAGE_STANDARD = gnu99;
400406
GCC_DYNAMIC_NO_PIC = NO;
@@ -414,6 +420,7 @@
414420
MACOSX_DEPLOYMENT_TARGET = 10.9;
415421
MTL_ENABLE_DEBUG_INFO = YES;
416422
ONLY_ACTIVE_ARCH = YES;
423+
PRODUCT_BUNDLE_IDENTIFIER = "com.antitypical.$(PRODUCT_NAME:rfc1034identifier)";
417424
SDKROOT = macosx;
418425
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
419426
VERSIONING_SYSTEM = "apple-generic";
@@ -441,6 +448,7 @@
441448
COPY_PHASE_STRIP = YES;
442449
CURRENT_PROJECT_VERSION = 1;
443450
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
451+
ENABLE_BITCODE = YES;
444452
ENABLE_NS_ASSERTIONS = NO;
445453
ENABLE_STRICT_OBJC_MSGSEND = YES;
446454
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -453,6 +461,7 @@
453461
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
454462
MACOSX_DEPLOYMENT_TARGET = 10.9;
455463
MTL_ENABLE_DEBUG_INFO = NO;
464+
PRODUCT_BUNDLE_IDENTIFIER = "com.antitypical.$(PRODUCT_NAME:rfc1034identifier)";
456465
SDKROOT = macosx;
457466
VERSIONING_SYSTEM = "apple-generic";
458467
VERSION_INFO_PREFIX = "";

Box.xcodeproj/xcshareddata/xcschemes/Box-Mac.xcscheme

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0630"
3+
LastUpgradeVersion = "0700"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -62,6 +62,8 @@
6262
ReferencedContainer = "container:Box.xcodeproj">
6363
</BuildableReference>
6464
</MacroExpansion>
65+
<AdditionalOptions>
66+
</AdditionalOptions>
6567
</TestAction>
6668
<LaunchAction
6769
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
@@ -71,6 +73,7 @@
7173
buildConfiguration = "Debug"
7274
ignoresPersistentStateOnLaunch = "NO"
7375
debugDocumentVersioning = "YES"
76+
debugServiceExtension = "internal"
7477
allowLocationSimulation = "YES">
7578
<MacroExpansion>
7679
<BuildableReference

Box.xcodeproj/xcshareddata/xcschemes/Box-iOS.xcscheme

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0630"
3+
LastUpgradeVersion = "0700"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -62,6 +62,8 @@
6262
ReferencedContainer = "container:Box.xcodeproj">
6363
</BuildableReference>
6464
</MacroExpansion>
65+
<AdditionalOptions>
66+
</AdditionalOptions>
6567
</TestAction>
6668
<LaunchAction
6769
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
@@ -71,6 +73,7 @@
7173
buildConfiguration = "Debug"
7274
ignoresPersistentStateOnLaunch = "NO"
7375
debugDocumentVersioning = "YES"
76+
debugServiceExtension = "internal"
7477
allowLocationSimulation = "YES">
7578
<MacroExpansion>
7679
<BuildableReference

Box/Box.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/// Wraps a type `T` in a reference type.
44
///
55
/// Typically this is used to work around limitations of value types (for example, the lack of codegen for recursive value types and type-parameterized enums with >1 case). It is also useful for sharing a single (presumably large) value without copying it.
6-
public final class Box<T>: BoxType, Printable {
6+
public final class Box<T>: BoxType, CustomStringConvertible {
77
/// Initializes a `Box` with the given value.
88
public init(_ value: T) {
99
self.value = value
@@ -28,6 +28,6 @@ public final class Box<T>: BoxType, Printable {
2828
// MARK: Printable
2929

3030
public var description: String {
31-
return toString(value)
31+
return String(value)
3232
}
3333
}

Box/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<key>CFBundleExecutable</key>
88
<string>$(EXECUTABLE_NAME)</string>
99
<key>CFBundleIdentifier</key>
10-
<string>com.antitypical.$(PRODUCT_NAME:rfc1034identifier)</string>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
1111
<key>CFBundleInfoDictionaryVersion</key>
1212
<string>6.0</string>
1313
<key>CFBundleName</key>

Box/MutableBox.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/// While this, like `Box<T>` could be used to work around limitations of value types, it is much more useful for sharing a single mutable value such that mutations are shared.
66
///
77
/// As with all mutable state, this should be used carefully, for example as an optimization, rather than a default design choice. Most of the time, `Box<T>` will suffice where any `BoxType` is needed.
8-
public final class MutableBox<T>: MutableBoxType, Printable {
8+
public final class MutableBox<T>: MutableBoxType, CustomStringConvertible {
99
/// Initializes a `MutableBox` with the given value.
1010
public init(_ value: T) {
1111
self.value = value
@@ -22,6 +22,6 @@ public final class MutableBox<T>: MutableBoxType, Printable {
2222
// MARK: Printable
2323

2424
public var description: String {
25-
return toString(value)
25+
return String(value)
2626
}
2727
}

0 commit comments

Comments
 (0)