Skip to content

Commit

Permalink
Merge pull request #607 from LoopKit/remove-swift3-support
Browse files Browse the repository at this point in the history
Remove Swift 3 support
  • Loading branch information
ps2 authored Oct 8, 2017
2 parents 7b32162 + 006a8cc commit 27b9dbe
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 78 deletions.
17 changes: 0 additions & 17 deletions Common/Extensions/WCSession+Swift4.swift

This file was deleted.

6 changes: 0 additions & 6 deletions Loop.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@
436A0DA51D236A2A00104B24 /* LoopError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 436A0DA41D236A2A00104B24 /* LoopError.swift */; };
436D9BF81F6F4EA100CFA75F /* recommended_temp_start_low_end_just_above_range.json in Resources */ = {isa = PBXBuildFile; fileRef = 436D9BF71F6F4EA100CFA75F /* recommended_temp_start_low_end_just_above_range.json */; };
436FACEE1D0BA636004E2427 /* InsulinDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 436FACED1D0BA636004E2427 /* InsulinDataSource.swift */; };
437272DF1F09E41200A3DA02 /* WCSession+Swift4.swift in Sources */ = {isa = PBXBuildFile; fileRef = 437272DE1F09E41200A3DA02 /* WCSession+Swift4.swift */; };
437272E01F09E41600A3DA02 /* WCSession+Swift4.swift in Sources */ = {isa = PBXBuildFile; fileRef = 437272DE1F09E41200A3DA02 /* WCSession+Swift4.swift */; };
43776F901B8022E90074EA36 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43776F8F1B8022E90074EA36 /* AppDelegate.swift */; };
43776F971B8022E90074EA36 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 43776F951B8022E90074EA36 /* Main.storyboard */; };
43776F991B8022E90074EA36 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 43776F981B8022E90074EA36 /* Assets.xcassets */; };
Expand Down Expand Up @@ -431,7 +429,6 @@
436A0DA41D236A2A00104B24 /* LoopError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoopError.swift; sourceTree = "<group>"; };
436D9BF71F6F4EA100CFA75F /* recommended_temp_start_low_end_just_above_range.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = recommended_temp_start_low_end_just_above_range.json; sourceTree = "<group>"; };
436FACED1D0BA636004E2427 /* InsulinDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InsulinDataSource.swift; sourceTree = "<group>"; };
437272DE1F09E41200A3DA02 /* WCSession+Swift4.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "WCSession+Swift4.swift"; sourceTree = "<group>"; };
43776F8C1B8022E90074EA36 /* Loop.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Loop.app; sourceTree = BUILT_PRODUCTS_DIR; };
43776F8F1B8022E90074EA36 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = AppDelegate.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
43776F961B8022E90074EA36 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1101,7 +1098,6 @@
43BFF0B31E45C1BE00FF19A9 /* NumberFormatter.swift */,
43BFF0B11E45C18400FF19A9 /* UIColor.swift */,
43BFF0C31E4659E700FF19A9 /* UIColor+HIG.swift */,
437272DE1F09E41200A3DA02 /* WCSession+Swift4.swift */,
);
path = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -1573,7 +1569,6 @@
C178249A1E1999FA00D9D25C /* CaseCountable.swift in Sources */,
4F08DEA11E81D90F006741EA /* GlucoseRangeScheduleCalculator.swift in Sources */,
43DBF04C1C93B8D700B3C386 /* BolusViewController.swift in Sources */,
437272DF1F09E41200A3DA02 /* WCSession+Swift4.swift in Sources */,
4FB76FBB1E8C42CF00B39636 /* UIColor.swift in Sources */,
4F6663941E905FD2009E74FC /* ChartColorPalette+Loop.swift in Sources */,
4328E0351CFC0AE100E199AA /* WatchDataManager.swift in Sources */,
Expand Down Expand Up @@ -1640,7 +1635,6 @@
43A943881B926B7B0051FA24 /* ExtensionDelegate.swift in Sources */,
4328E0291CFBE2C500E199AA /* NSUserDefaults.swift in Sources */,
4328E02F1CFBF81800E199AA /* WKInterfaceImage.swift in Sources */,
437272E01F09E41600A3DA02 /* WCSession+Swift4.swift in Sources */,
4F2C15811E0495B200E160D4 /* WatchContext+WatchApp.swift in Sources */,
4328E02A1CFBE2C500E199AA /* UIColor.swift in Sources */,
4328E01B1CFBE1DA00E199AA /* BolusInterfaceController.swift in Sources */,
Expand Down
54 changes: 20 additions & 34 deletions Loop/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,29 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="SwitchTableViewCell" id="vah-ss-3Ud" customClass="SwitchTableViewCell" customModule="Loop" customModuleProvider="target">
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="SwitchTableViewCell" textLabel="B9F-K3-7RI" detailTextLabel="WHK-PZ-Ng1" style="IBUITableViewCellStyleValue1" id="vah-ss-3Ud" customClass="SwitchTableViewCell" customModule="Loop" customModuleProvider="target">
<rect key="frame" x="0.0" y="55.5" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="vah-ss-3Ud" id="D0A-EB-kmz">
<rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="251" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="moR-fS-DWR">
<rect key="frame" x="8" y="13" width="302" height="20.5"/>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="B9F-K3-7RI">
<rect key="frame" x="16" y="12" width="33.5" height="20.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" id="WHK-PZ-Ng1">
<rect key="frame" x="316" y="12" width="44" height="20.5"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<color key="textColor" red="0.5568627451" green="0.5568627451" blue="0.5568627451" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="guo-4Z-RoO">
<rect key="frame" x="318" y="8" width="51" height="27.5"/>
</switch>
</subviews>
<constraints>
<constraint firstItem="moR-fS-DWR" firstAttribute="leading" secondItem="D0A-EB-kmz" secondAttribute="leadingMargin" id="3Zc-7R-Uft"/>
<constraint firstItem="moR-fS-DWR" firstAttribute="top" relation="greaterThanOrEqual" secondItem="D0A-EB-kmz" secondAttribute="top" constant="13" id="Sa2-TB-EcZ"/>
<constraint firstItem="guo-4Z-RoO" firstAttribute="top" relation="greaterThanOrEqual" secondItem="D0A-EB-kmz" secondAttribute="topMargin" id="ffH-uw-GI2"/>
<constraint firstAttribute="trailingMargin" secondItem="guo-4Z-RoO" secondAttribute="trailing" id="gb5-W2-roe"/>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="moR-fS-DWR" secondAttribute="bottom" priority="750" constant="13" id="j5I-H8-Otk"/>
<constraint firstItem="guo-4Z-RoO" firstAttribute="leading" secondItem="moR-fS-DWR" secondAttribute="trailing" constant="8" symbolic="YES" id="tzW-RW-90H"/>
<constraint firstItem="guo-4Z-RoO" firstAttribute="centerY" secondItem="D0A-EB-kmz" secondAttribute="centerY" id="w98-m4-irJ"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="switch" destination="guo-4Z-RoO" id="X6D-aU-Zp7"/>
<outlet property="titleLabel" destination="moR-fS-DWR" id="Ngk-dW-GTa"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="ConfigTableViewCell" textLabel="5TX-kX-nBo" detailTextLabel="m9c-SQ-djE" style="IBUITableViewCellStyleValue1" id="0EG-OG-YuT">
<rect key="frame" x="0.0" y="99.5" width="375" height="44"/>
Expand All @@ -70,7 +62,7 @@
<rect key="frame" x="264.5" y="12" width="75.5" height="20.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<color key="textColor" red="0.55676333109537768" green="0.55676333109537768" blue="0.55676333109537768" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="textColor" red="0.55686274509803924" green="0.55686274509803924" blue="0.55686274509803924" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
Expand Down Expand Up @@ -218,35 +210,29 @@
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="252" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zbc-87-wxZ">
<rect key="frame" x="8" y="8" width="295" height="21"/>
<rect key="frame" x="8" y="8" width="359" height="21"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Hkb-xr-vtN">
<rect key="frame" x="311" y="17" width="51" height="31"/>
</switch>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OFA-qT-ZAg">
<rect key="frame" x="8" y="31" width="295" height="25"/>
<rect key="frame" x="8" y="31" width="359" height="25"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleFootnote"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="Hkb-xr-vtN" firstAttribute="centerY" secondItem="0f9-ja-YFt" secondAttribute="centerY" id="7c4-DR-4h5"/>
<constraint firstAttribute="trailingMargin" secondItem="Hkb-xr-vtN" secondAttribute="trailing" constant="7" id="GQ5-Vt-81Q"/>
<constraint firstItem="zbc-87-wxZ" firstAttribute="top" secondItem="0f9-ja-YFt" secondAttribute="topMargin" id="SnM-bw-kvZ"/>
<constraint firstAttribute="trailingMargin" secondItem="OFA-qT-ZAg" secondAttribute="trailing" id="a5T-5H-hP7"/>
<constraint firstItem="OFA-qT-ZAg" firstAttribute="bottom" secondItem="0f9-ja-YFt" secondAttribute="bottomMargin" priority="750" id="b3A-qB-Luz"/>
<constraint firstAttribute="trailingMargin" secondItem="zbc-87-wxZ" secondAttribute="trailing" id="bIk-HS-Jf1"/>
<constraint firstItem="OFA-qT-ZAg" firstAttribute="leading" secondItem="0f9-ja-YFt" secondAttribute="leadingMargin" id="kou-ZQ-FRa"/>
<constraint firstItem="zbc-87-wxZ" firstAttribute="leading" secondItem="0f9-ja-YFt" secondAttribute="leadingMargin" id="nCR-ur-K5r"/>
<constraint firstItem="OFA-qT-ZAg" firstAttribute="top" secondItem="zbc-87-wxZ" secondAttribute="bottom" constant="2" id="xmu-r8-Cca"/>
<constraint firstItem="Hkb-xr-vtN" firstAttribute="leading" secondItem="zbc-87-wxZ" secondAttribute="trailing" constant="8" symbolic="YES" id="y80-qL-V6U"/>
<constraint firstItem="Hkb-xr-vtN" firstAttribute="leading" secondItem="OFA-qT-ZAg" secondAttribute="trailing" constant="8" symbolic="YES" id="yiC-rM-ccM"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="subtitleLabel" destination="OFA-qT-ZAg" id="bW7-xX-HJv"/>
<outlet property="switch" destination="Hkb-xr-vtN" id="jx8-S6-4dZ"/>
<outlet property="titleLabel" destination="zbc-87-wxZ" id="Spp-Jw-V64"/>
</connections>
</tableViewCell>
Expand Down Expand Up @@ -1150,8 +1136,8 @@
<image name="workout" width="30" height="29"/>
</resources>
<inferredMetricsTieBreakers>
<segue reference="viB-eQ-p7y"/>
<segue reference="PC7-vP-CUY"/>
<segue reference="xCA-IG-jXB"/>
<segue reference="UnO-ql-F0K"/>
<segue reference="Isc-NM-GBt"/>
<segue reference="76q-VW-DX3"/>
</inferredMetricsTieBreakers>
</document>
4 changes: 2 additions & 2 deletions Loop/Managers/WatchDataManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ final class WatchDataManager: NSObject, WCSessionDelegate {

private var watchSession: WCSession? = {
if WCSession.isSupported() {
return WCSession.default()
return WCSession.default
} else {
return nil
}
Expand Down Expand Up @@ -191,7 +191,7 @@ final class WatchDataManager: NSObject, WCSessionDelegate {
}

func sessionDidDeactivate(_ session: WCSession) {
watchSession = WCSession.default()
watchSession = WCSession.default
watchSession?.delegate = self
watchSession?.activate()
}
Expand Down
Loading

0 comments on commit 27b9dbe

Please sign in to comment.