Skip to content

Commit

Permalink
Fixed warnings reported by SwiftLint (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
jguz-pubnub authored Apr 8, 2024
1 parent 34bcc9f commit f744f43
Show file tree
Hide file tree
Showing 88 changed files with 580 additions and 586 deletions.
13 changes: 6 additions & 7 deletions Examples/Example-iOS/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="cii-ds-lbi">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="cii-ds-lbi">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17125"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -25,17 +24,17 @@
</objects>
<point key="canvasLocation" x="134.78260869565219" y="-572.54464285714278"/>
</scene>
<!--Master Detail Table View Controller-->
<!--Detail Table View Controller-->
<scene sceneID="dso-GN-jd6">
<objects>
<tableViewController id="Tlh-aH-7K0" customClass="MasterDetailTableViewController" customModule="iOS_Example" customModuleProvider="target" sceneMemberID="viewController">
<tableViewController id="Tlh-aH-7K0" customClass="DetailTableViewController" customModule="iOS_Example" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" showsHorizontalScrollIndicator="NO" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="qDt-Hn-hqG">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="MasterDetailCell" textLabel="51d-x3-peJ" style="IBUITableViewCellStyleDefault" id="nhH-N4-a7e">
<rect key="frame" x="0.0" y="28" width="414" height="43.5"/>
<rect key="frame" x="0.0" y="50" width="414" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="nhH-N4-a7e" id="dqu-u1-aH8">
<rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
Expand Down Expand Up @@ -88,7 +87,7 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="PubNubConfigDetailCell" textLabel="Vf9-dc-dU5" detailTextLabel="FkR-kH-9EO" style="IBUITableViewCellStyleSubtitle" id="rKX-aZ-Oyd">
<rect key="frame" x="0.0" y="28" width="414" height="55.5"/>
<rect key="frame" x="0.0" y="50" width="414" height="55.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="rKX-aZ-Oyd" id="4in-j4-q0M">
<rect key="frame" x="0.0" y="0.0" width="414" height="55.5"/>
Expand Down
23 changes: 13 additions & 10 deletions Examples/Examples.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
archiveVersion = 1;
classes = {
};
objectVersion = 52;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
3567432822DF974600BF2639 /* MasterDetailTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 359F779922B7FEF600B6B46F /* MasterDetailTableViewController.swift */; };
357AD4EC252D067800099EB7 /* FileAPIViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 357AD4EB252D067800099EB7 /* FileAPIViewController.swift */; };
357AD4EE252D087800099EB7 /* FileAPI.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 357AD4ED252D087800099EB7 /* FileAPI.storyboard */; };
357AD4F2252E2FFF00099EB7 /* FileTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 357AD4F1252E2FFF00099EB7 /* FileTableViewCell.swift */; };
Expand All @@ -17,6 +16,7 @@
359F779F22B7FEF700B6B46F /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 359F779E22B7FEF700B6B46F /* Assets.xcassets */; };
359F77A222B7FEF700B6B46F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 359F77A022B7FEF700B6B46F /* LaunchScreen.storyboard */; };
35F0258F22BAC6C9007BD7D3 /* ConfigDetailTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35F0258E22BAC6C9007BD7D3 /* ConfigDetailTableViewController.swift */; };
3D34160D2BB5CE20008558A0 /* DetailTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D34160C2BB5CE20008558A0 /* DetailTableViewController.swift */; };
792CF27228C4FBB300C83408 /* PubNub in Frameworks */ = {isa = PBXBuildFile; productRef = 792CF27128C4FBB300C83408 /* PubNub */; };
792CF27428C4FBB300C83408 /* PubNubMembership in Frameworks */ = {isa = PBXBuildFile; productRef = 792CF27328C4FBB300C83408 /* PubNubMembership */; };
792CF27628C4FBB300C83408 /* PubNubSpace in Frameworks */ = {isa = PBXBuildFile; productRef = 792CF27528C4FBB300C83408 /* PubNubSpace */; };
Expand Down Expand Up @@ -54,13 +54,13 @@
357AD4F3252E302900099EB7 /* LocalFileExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalFileExample.swift; sourceTree = "<group>"; };
359F779422B7FEF600B6B46F /* iOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
359F779722B7FEF600B6B46F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
359F779922B7FEF600B6B46F /* MasterDetailTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MasterDetailTableViewController.swift; sourceTree = "<group>"; };
359F779C22B7FEF700B6B46F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
359F779E22B7FEF700B6B46F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
359F77A122B7FEF700B6B46F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
359F77A322B7FEF700B6B46F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
359F77AA22B7FF5700B6B46F /* PubNub.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = PubNub.framework; sourceTree = BUILT_PRODUCTS_DIR; };
35F0258E22BAC6C9007BD7D3 /* ConfigDetailTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfigDetailTableViewController.swift; sourceTree = "<group>"; };
3D34160C2BB5CE20008558A0 /* DetailTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DetailTableViewController.swift; sourceTree = "<group>"; };
792CF27A28C4FCB800C83408 /* PubNub SDK */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "PubNub SDK"; path = ..; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -142,7 +142,7 @@
isa = PBXGroup;
children = (
359F779722B7FEF600B6B46F /* AppDelegate.swift */,
359F779922B7FEF600B6B46F /* MasterDetailTableViewController.swift */,
3D34160C2BB5CE20008558A0 /* DetailTableViewController.swift */,
35F0258E22BAC6C9007BD7D3 /* ConfigDetailTableViewController.swift */,
357AD4F0252E2FD600099EB7 /* File */,
);
Expand Down Expand Up @@ -191,8 +191,9 @@
359F778C22B7FEF600B6B46F /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1020;
LastUpgradeCheck = 1240;
LastUpgradeCheck = 1520;
ORGANIZATIONNAME = PubNub;
TargetAttributes = {
359F779322B7FEF600B6B46F = {
Expand Down Expand Up @@ -242,9 +243,9 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3D34160D2BB5CE20008558A0 /* DetailTableViewController.swift in Sources */,
357AD4F4252E302900099EB7 /* LocalFileExample.swift in Sources */,
35F0258F22BAC6C9007BD7D3 /* ConfigDetailTableViewController.swift in Sources */,
3567432822DF974600BF2639 /* MasterDetailTableViewController.swift in Sources */,
357AD4F2252E2FFF00099EB7 /* FileTableViewCell.swift in Sources */,
359F779822B7FEF600B6B46F /* AppDelegate.swift in Sources */,
357AD4EC252D067800099EB7 /* FileAPIViewController.swift in Sources */,
Expand Down Expand Up @@ -311,6 +312,7 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand All @@ -326,15 +328,15 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
TVOS_DEPLOYMENT_TARGET = 12.0;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
WATCHOS_DEPLOYMENT_TARGET = 4.0;
};
name = Debug;
};
Expand Down Expand Up @@ -376,6 +378,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand All @@ -385,15 +388,15 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MACOSX_DEPLOYMENT_TARGET = 10.10;
MACOSX_DEPLOYMENT_TARGET = 10.15;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
TVOS_DEPLOYMENT_TARGET = 12.0;
VALIDATE_PRODUCT = YES;
WATCHOS_DEPLOYMENT_TARGET = 2.0;
WATCHOS_DEPLOYMENT_TARGET = 4.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1240"
version = "1.3">
LastUpgradeVersion = "1520"
version = "1.8">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand Down
3 changes: 0 additions & 3 deletions Examples/Sources/ConfigDetailTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ import UIKit
import PubNub

class ConfigDetailTableViewController: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()
}

let configCellID = "PubNubConfigDetailCell"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
// This source code is licensed under the license found in the
// LICENSE file in the root directory of this source tree.
//
// swiftlint:disable file_length

import Foundation
import UIKit
Expand All @@ -18,15 +17,15 @@ import PubNubSpace
import PubNubUser

// swiftlint:disable:next type_body_length
class MasterDetailTableViewController: UITableViewController {
class DetailTableViewController: UITableViewController {
var pubnub: PubNub!

var listener: SubscriptionListener?
var userListener: PubNubUserListener?
var spaceListener: PubNubSpaceListener?
var membershipListener: PubNubMembershipListener?

let masterDetailCellID = "MasterDetailCell"
let detailCellID = "MasterDetailCell"

enum SegueId: String {
case config = "MasterDetailToConfigDetail"
Expand Down Expand Up @@ -366,10 +365,6 @@ class MasterDetailTableViewController: UITableViewController {
}
}

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
}

override func numberOfSections(in tableView: UITableView) -> Int {
super.numberOfSections(in: tableView)

Expand All @@ -391,7 +386,7 @@ class MasterDetailTableViewController: UITableViewController {
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
super.tableView(tableView, cellForRowAt: indexPath)

let cell = tableView.dequeueReusableCell(withIdentifier: masterDetailCellID, for: indexPath)
let cell = tableView.dequeueReusableCell(withIdentifier: detailCellID, for: indexPath)

switch Section(rawValue: indexPath.section) {
case .some(.pubnub):
Expand Down Expand Up @@ -753,5 +748,5 @@ class MasterDetailTableViewController: UITableViewController {
}
}

// swiftlint:endable file_length
// swiftlint:disable:next file_length
}
2 changes: 0 additions & 2 deletions Examples/Sources/File/FileAPIViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,4 @@ extension FileAPIViewController: UIDocumentPickerDelegate {
}
}
}

// swiftlint:disable:next file_length
}
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.0
// swift-tools-version:5.3
//
// Package.swift
//
Expand All @@ -15,7 +15,7 @@ let package = Package(
name: "PubNub",
platforms: [
.iOS(.v12),
.macOS(.v10_13),
.macOS(.v10_15),
.tvOS(.v12),
.watchOS(.v4)
],
Expand Down
Loading

0 comments on commit f744f43

Please sign in to comment.