Skip to content

Commit ed28faa

Browse files
committed
fix warnings
1 parent b18b148 commit ed28faa

6 files changed

Lines changed: 25 additions & 19 deletions

File tree

Examples/Examples.xcodeproj/project.pbxproj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
isa = PBXProject;
134134
attributes = {
135135
LastSwiftUpdateCheck = 1020;
136-
LastUpgradeCheck = 1020;
136+
LastUpgradeCheck = 1250;
137137
ORGANIZATIONNAME = IFTTT;
138138
TargetAttributes = {
139139
DE7B730A22CAACD8000F4023 = {
@@ -231,6 +231,7 @@
231231
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
232232
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
233233
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
234+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
234235
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
235236
CLANG_WARN_STRICT_PROTOTYPES = YES;
236237
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -294,6 +295,7 @@
294295
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
295296
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
296297
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
298+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
297299
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
298300
CLANG_WARN_STRICT_PROTOTYPES = YES;
299301
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -331,7 +333,7 @@
331333
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
332334
CURRENT_PROJECT_VERSION = 35;
333335
INFOPLIST_FILE = GroceryExpress/Info.plist;
334-
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
336+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
335337
LD_RUNPATH_SEARCH_PATHS = (
336338
"$(inherited)",
337339
"@executable_path/Frameworks",
@@ -351,7 +353,7 @@
351353
CURRENT_PROJECT_VERSION = 35;
352354
DEVELOPMENT_TEAM = "";
353355
INFOPLIST_FILE = GroceryExpress/Info.plist;
354-
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
356+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
355357
LD_RUNPATH_SEARCH_PATHS = (
356358
"$(inherited)",
357359
"@executable_path/Frameworks",

Examples/Examples.xcodeproj/xcshareddata/xcschemes/GroceryExpress.xcscheme

Lines changed: 1 addition & 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 = "1020"
3+
LastUpgradeVersion = "1250"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Examples/GroceryExpress/AddressSelectionViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ final class AddressSelectionViewController: UIViewController {
5757
}
5858

5959
resultSearchController?.hidesNavigationBarDuringPresentation = false
60-
resultSearchController?.dimsBackgroundDuringPresentation = true
60+
resultSearchController?.obscuresBackgroundDuringPresentation = true
6161
definesPresentationContext = true
6262

6363
let continueButton = UIBarButtonItem(barButtonSystemItem: .done, target: self, action: #selector(doneTapped))
@@ -94,7 +94,7 @@ extension AddressSelectionViewController: LocationSearchSelectable {
9494
}
9595
}
9696

97-
protocol LocationSearchSelectable: class {
97+
protocol LocationSearchSelectable: AnyObject {
9898
func didSelect(_ placemark: MKPlacemark, formattedAddress: String)
9999
}
100100

Examples/GroceryExpress/Main.storyboard

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="9mT-JA-FYJ" userLabel="Skip Config">
116116
<rect key="frame" x="0.0" y="0.0" width="177" height="60.333333333333336"/>
117117
<subviews>
118-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" text="Skip Config" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="In3-ko-ki1">
118+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" text="Skip Config" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="In3-ko-ki1">
119119
<rect key="frame" x="0.0" y="0.0" width="177" height="19.333333333333332"/>
120120
<fontDescription key="fontDescription" type="system" pointSize="16"/>
121121
<nil key="textColor"/>
@@ -132,7 +132,7 @@
132132
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="6xI-Gg-gLe" userLabel="New user flow">
133133
<rect key="frame" x="177" y="0.0" width="177" height="60.333333333333336"/>
134134
<subviews>
135-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="New user flow" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="BZX-rF-pRg">
135+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="749" text="New user flow" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="BZX-rF-pRg">
136136
<rect key="frame" x="0.0" y="0.0" width="177" height="19.333333333333332"/>
137137
<fontDescription key="fontDescription" type="system" pointSize="16"/>
138138
<nil key="textColor"/>
@@ -154,7 +154,7 @@
154154
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="atH-Q8-9fu" userLabel="Fetch Connection">
155155
<rect key="frame" x="0.0" y="0.0" width="177" height="60.333333333333336"/>
156156
<subviews>
157-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" text="Fetch connection" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Hf3-1N-7mu" userLabel="Fetch Connection">
157+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" text="Fetch connection" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="Hf3-1N-7mu" userLabel="Fetch Connection">
158158
<rect key="frame" x="0.0" y="0.0" width="177" height="19.333333333333332"/>
159159
<fontDescription key="fontDescription" type="system" pointSize="16"/>
160160
<nil key="textColor"/>
@@ -171,7 +171,7 @@
171171
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="b1g-dA-V04" userLabel="Geofences enabled">
172172
<rect key="frame" x="177" y="0.0" width="177" height="60.333333333333336"/>
173173
<subviews>
174-
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" text="Geofences enabled" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" adjustsFontForContentSizeCategory="YES" translatesAutoresizingMaskIntoConstraints="NO" id="axg-GF-vsn">
174+
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="751" text="Geofences enabled" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="axg-GF-vsn">
175175
<rect key="frame" x="0.0" y="0.0" width="177" height="19.333333333333332"/>
176176
<fontDescription key="fontDescription" type="system" pointSize="16"/>
177177
<nil key="textColor"/>
@@ -424,7 +424,7 @@
424424
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
425425
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
426426
<subviews>
427-
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" ambiguous="YES" alwaysBounceVertical="YES" translatesAutoresizingMaskIntoConstraints="NO" id="CS4-C0-5nt">
427+
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" translatesAutoresizingMaskIntoConstraints="NO" id="CS4-C0-5nt">
428428
<rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
429429
<subviews>
430430
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="calendar_connection_image" translatesAutoresizingMaskIntoConstraints="NO" id="8Tc-IV-1W8">
@@ -449,8 +449,11 @@
449449
<rect key="frame" x="188.66666666666666" y="322" width="37" height="37"/>
450450
<color key="color" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
451451
</activityIndicatorView>
452-
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="bag-Y6-owB">
453-
<rect key="frame" x="0.0" y="423" width="414" height="200"/>
452+
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="bag-Y6-owB">
453+
<rect key="frame" x="0.0" y="445" width="414" height="200"/>
454+
<constraints>
455+
<constraint firstAttribute="height" priority="250" constant="200" placeholder="YES" id="NSR-Qt-wO0"/>
456+
</constraints>
454457
<edgeInsets key="layoutMargins" top="0.0" left="20" bottom="0.0" right="20"/>
455458
</stackView>
456459
</subviews>
@@ -657,7 +660,7 @@
657660
<action selector="updateButtonTapped:" destination="4l4-mG-TU8" eventType="touchUpInside" id="woB-lm-dv2"/>
658661
</connections>
659662
</button>
660-
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" style="medium" translatesAutoresizingMaskIntoConstraints="NO" id="XG7-f7-Nd7">
663+
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="XG7-f7-Nd7">
661664
<rect key="frame" x="197" y="335" width="20" height="20"/>
662665
</activityIndicatorView>
663666
</subviews>

IFTTT SDK/ConnectButton.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import UIKit
99

1010
/// Delegate methods for performing any tracking of events from the ConnectButton.
11-
protocol ConnectButtonAnalyticsDelegate: class {
11+
protocol ConnectButtonAnalyticsDelegate: AnyObject {
1212
/// Called when the user is shown the suggested email address.
1313
func trackSuggestedEmailImpression()
1414
}

IFTTT SDK/ConnectButtonController.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public enum ConnectButtonControllerError: Error {
4747
}
4848

4949
/// Defines the communication between ConnectButtonController and your app. It is required to implement this protocol.
50-
public protocol ConnectButtonControllerDelegate: class {
50+
public protocol ConnectButtonControllerDelegate: AnyObject {
5151

5252
/// The `ConnectButtonController` needs to present a view controller. This includes the About IFTTT page and Safari VC during Connection activation.
5353
///
@@ -612,9 +612,10 @@ public class ConnectButtonController {
612612
/// - redirectImmediately: When true, do redirect immediately. Or delay to show progress bar.
613613
private func transitionToAppHandoff(url: URL, redirectImmediately: Bool) {
614614
let redirect = {
615-
let success = UIApplication.shared.openURL(url)
616-
if !success {
617-
self.transition(to: .failed(.iftttAppRedirectFailed))
615+
UIApplication.shared.open(url, options: [:]) { success in
616+
if !success {
617+
self.transition(to: .failed(.iftttAppRedirectFailed))
618+
}
618619
}
619620
}
620621

0 commit comments

Comments
 (0)