Skip to content

Commit

Permalink
Next changes 3
Browse files Browse the repository at this point in the history
  • Loading branch information
jguz-pubnub committed Mar 28, 2024
1 parent 21b8cd3 commit 77e9b6e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 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
10 changes: 5 additions & 5 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 @@ -242,9 +242,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
Original file line number Diff line number Diff line change
Expand Up @@ -17,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 @@ -386,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
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ class SubscribeTransition: TransitionProtocol {
}

fileprivate extension SubscribeTransition {
// swiftlint:disable:next cyclomatic_complexity
func onSubscriptionAltered(
from state: State,
channels: [String],
Expand Down
6 changes: 3 additions & 3 deletions Sources/PubNub/Events/New/Subscribable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ public class SubscriptionOptions {
func filterCriteriaSatisfied(event: PubNubEvent) -> Bool {
allOptions.compactMap {
$0 as? FilterOption
}.reduce(into: true, { filteringResult, filter in
filteringResult = filteringResult && filter.predicate(event)
})
}.allSatisfy { filter in
filter.predicate(event)
}
}

func hasPresenceOption() -> Bool {
Expand Down

0 comments on commit 77e9b6e

Please sign in to comment.