From a37ee56a956ef3a92044cd3f885d4e725b375bdc Mon Sep 17 00:00:00 2001 From: ilucijabalja <107189469+ilucijabalja@users.noreply.github.com> Date: Wed, 19 Apr 2023 10:05:40 +0200 Subject: [PATCH] Added check for already presented Sentinel view controller (#26) * Added check for already presented Sentinel view controller * Sentinel version upgraded, pod update --- Example/Podfile.lock | 18 ++++---- .../Pods/Local Podspecs/Sentinel.podspec.json | 4 +- Example/Pods/Manifest.lock | 18 ++++---- Example/Pods/Pods.xcodeproj/project.pbxproj | 44 ++++++++++--------- .../Pods-Sentinel_Example-Info.plist | 2 +- .../Pods-Sentinel_Tests-Info.plist | 2 +- ...esourceBundle-Sentinel-Sentinel-Info.plist | 4 +- .../Sentinel/Sentinel-Info.plist | 4 +- .../Sentinel/Sentinel.debug.xcconfig | 1 + .../Sentinel/Sentinel.release.xcconfig | 1 + Sentinel.podspec | 2 +- .../Classes/Core/SourceScreenProvider.swift | 9 +++- 12 files changed, 60 insertions(+), 49 deletions(-) diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 2066323..88ad5b6 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,17 +1,17 @@ PODS: - - Sentinel (1.1.1): - - Sentinel/Default (= 1.1.1) - - Sentinel/Core (1.1.1) - - Sentinel/CustomLocation (1.1.1): + - Sentinel (1.1.2): + - Sentinel/Default (= 1.1.2) + - Sentinel/Core (1.1.2) + - Sentinel/CustomLocation (1.1.2): - Sentinel/Core - - Sentinel/Default (1.1.1): + - Sentinel/Default (1.1.2): - Sentinel/Core - Sentinel/CustomLocation - Sentinel/TextEditing - Sentinel/UserDefaults - - Sentinel/TextEditing (1.1.1): + - Sentinel/TextEditing (1.1.2): - Sentinel/Core - - Sentinel/UserDefaults (1.1.1): + - Sentinel/UserDefaults (1.1.2): - Sentinel/Core DEPENDENCIES: @@ -22,8 +22,8 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - Sentinel: 620185762371cdd6615c4f5e21519dfa3a9ad3fd + Sentinel: 35a8bf4cf907cc64866f816447ff2387e09a2a6a PODFILE CHECKSUM: b1ea13fb80f56c4238650f0da0299d23734a6421 -COCOAPODS: 1.11.3 +COCOAPODS: 1.12.0 diff --git a/Example/Pods/Local Podspecs/Sentinel.podspec.json b/Example/Pods/Local Podspecs/Sentinel.podspec.json index 28c16a7..63b4aee 100644 --- a/Example/Pods/Local Podspecs/Sentinel.podspec.json +++ b/Example/Pods/Local Podspecs/Sentinel.podspec.json @@ -1,6 +1,6 @@ { "name": "Sentinel", - "version": "1.1.1", + "version": "1.1.2", "summary": "Developer's toolbox for debugging applications", "description": "Sentinel is a simple library which gives developers a possibility to configure one entry point for every debug tool.\nThe idea of Sentinel is to give ability to developers to configure screen with multiple debug tools which are available via some event (e.g. shake, notification).", "homepage": "https://github.com/infinum/ios-sentinel", @@ -15,7 +15,7 @@ }, "source": { "git": "https://github.com/infinum/ios-sentinel.git", - "tag": "1.1.1" + "tag": "1.1.2" }, "requires_arc": true, "platforms": { diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 2066323..88ad5b6 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,17 +1,17 @@ PODS: - - Sentinel (1.1.1): - - Sentinel/Default (= 1.1.1) - - Sentinel/Core (1.1.1) - - Sentinel/CustomLocation (1.1.1): + - Sentinel (1.1.2): + - Sentinel/Default (= 1.1.2) + - Sentinel/Core (1.1.2) + - Sentinel/CustomLocation (1.1.2): - Sentinel/Core - - Sentinel/Default (1.1.1): + - Sentinel/Default (1.1.2): - Sentinel/Core - Sentinel/CustomLocation - Sentinel/TextEditing - Sentinel/UserDefaults - - Sentinel/TextEditing (1.1.1): + - Sentinel/TextEditing (1.1.2): - Sentinel/Core - - Sentinel/UserDefaults (1.1.1): + - Sentinel/UserDefaults (1.1.2): - Sentinel/Core DEPENDENCIES: @@ -22,8 +22,8 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - Sentinel: 620185762371cdd6615c4f5e21519dfa3a9ad3fd + Sentinel: 35a8bf4cf907cc64866f816447ff2387e09a2a6a PODFILE CHECKSUM: b1ea13fb80f56c4238650f0da0299d23734a6421 -COCOAPODS: 1.11.3 +COCOAPODS: 1.12.0 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 96a7166..e744a14 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -883,6 +883,23 @@ }; name = Release; }; + 6B10DD345AD62C0761B79AAA77CF9535 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 506DA1B239F0027DEF29621F8BC500DC /* Sentinel.debug.xcconfig */; + buildSettings = { + CODE_SIGNING_ALLOWED = NO; + CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Sentinel"; + IBSC_MODULE = Sentinel; + INFOPLIST_FILE = "Target Support Files/Sentinel/ResourceBundle-Sentinel-Sentinel-Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + PRODUCT_NAME = Sentinel; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + WRAPPER_EXTENSION = bundle; + }; + name = Debug; + }; 6E0E0ACED00A7B13F1FEDF53FD89CEE7 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = A66CE977C2A4DD6409F650637CBD401F /* Pods-Sentinel_Example.debug.xcconfig */; @@ -1013,22 +1030,6 @@ }; name = Release; }; - A174B7348EBA8DE79ADD090466573D12 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = FACA734A3CEA1EF4CBCFAC48E0AAED93 /* Sentinel.release.xcconfig */; - buildSettings = { - CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Sentinel"; - IBSC_MODULE = Sentinel; - INFOPLIST_FILE = "Target Support Files/Sentinel/ResourceBundle-Sentinel-Sentinel-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - PRODUCT_NAME = Sentinel; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - WRAPPER_EXTENSION = bundle; - }; - name = Release; - }; B4EFE046ACF8F37157F6E322C7FCFC28 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1095,10 +1096,11 @@ }; name = Debug; }; - CD68AC03133DA7B834CA2ADD98B18BA0 /* Debug */ = { + BF711EED6CC336F8820B775E4C6FE702 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 506DA1B239F0027DEF29621F8BC500DC /* Sentinel.debug.xcconfig */; + baseConfigurationReference = FACA734A3CEA1EF4CBCFAC48E0AAED93 /* Sentinel.release.xcconfig */; buildSettings = { + CODE_SIGNING_ALLOWED = NO; CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Sentinel"; IBSC_MODULE = Sentinel; INFOPLIST_FILE = "Target Support Files/Sentinel/ResourceBundle-Sentinel-Sentinel-Info.plist"; @@ -1109,7 +1111,7 @@ TARGETED_DEVICE_FAMILY = "1,2"; WRAPPER_EXTENSION = bundle; }; - name = Debug; + name = Release; }; /* End XCBuildConfiguration section */ @@ -1135,8 +1137,8 @@ 5DEE358BEA83BEF41ABF7D95AD490513 /* Build configuration list for PBXNativeTarget "Sentinel-Sentinel" */ = { isa = XCConfigurationList; buildConfigurations = ( - CD68AC03133DA7B834CA2ADD98B18BA0 /* Debug */, - A174B7348EBA8DE79ADD090466573D12 /* Release */, + 6B10DD345AD62C0761B79AAA77CF9535 /* Debug */, + BF711EED6CC336F8820B775E4C6FE702 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/Pods/Target Support Files/Pods-Sentinel_Example/Pods-Sentinel_Example-Info.plist b/Example/Pods/Target Support Files/Pods-Sentinel_Example/Pods-Sentinel_Example-Info.plist index 2243fe6..19cf209 100644 --- a/Example/Pods/Target Support Files/Pods-Sentinel_Example/Pods-Sentinel_Example-Info.plist +++ b/Example/Pods/Target Support Files/Pods-Sentinel_Example/Pods-Sentinel_Example-Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + ${PODS_DEVELOPMENT_LANGUAGE} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier diff --git a/Example/Pods/Target Support Files/Pods-Sentinel_Tests/Pods-Sentinel_Tests-Info.plist b/Example/Pods/Target Support Files/Pods-Sentinel_Tests/Pods-Sentinel_Tests-Info.plist index 2243fe6..19cf209 100644 --- a/Example/Pods/Target Support Files/Pods-Sentinel_Tests/Pods-Sentinel_Tests-Info.plist +++ b/Example/Pods/Target Support Files/Pods-Sentinel_Tests/Pods-Sentinel_Tests-Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + ${PODS_DEVELOPMENT_LANGUAGE} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier diff --git a/Example/Pods/Target Support Files/Sentinel/ResourceBundle-Sentinel-Sentinel-Info.plist b/Example/Pods/Target Support Files/Sentinel/ResourceBundle-Sentinel-Sentinel-Info.plist index f40fb9e..c6b1c70 100644 --- a/Example/Pods/Target Support Files/Sentinel/ResourceBundle-Sentinel-Sentinel-Info.plist +++ b/Example/Pods/Target Support Files/Sentinel/ResourceBundle-Sentinel-Sentinel-Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + ${PODS_DEVELOPMENT_LANGUAGE} CFBundleIdentifier ${PRODUCT_BUNDLE_IDENTIFIER} CFBundleInfoDictionaryVersion @@ -13,7 +13,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.1.1 + 1.1.2 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/Sentinel/Sentinel-Info.plist b/Example/Pods/Target Support Files/Sentinel/Sentinel-Info.plist index d60f138..16e9d43 100644 --- a/Example/Pods/Target Support Files/Sentinel/Sentinel-Info.plist +++ b/Example/Pods/Target Support Files/Sentinel/Sentinel-Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + ${PODS_DEVELOPMENT_LANGUAGE} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.1.1 + 1.1.2 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/Sentinel/Sentinel.debug.xcconfig b/Example/Pods/Target Support Files/Sentinel/Sentinel.debug.xcconfig index ab051fb..c37bf37 100644 --- a/Example/Pods/Target Support Files/Sentinel/Sentinel.debug.xcconfig +++ b/Example/Pods/Target Support Files/Sentinel/Sentinel.debug.xcconfig @@ -6,6 +6,7 @@ OTHER_LDFLAGS = $(inherited) -framework "UIKit" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates diff --git a/Example/Pods/Target Support Files/Sentinel/Sentinel.release.xcconfig b/Example/Pods/Target Support Files/Sentinel/Sentinel.release.xcconfig index ab051fb..c37bf37 100644 --- a/Example/Pods/Target Support Files/Sentinel/Sentinel.release.xcconfig +++ b/Example/Pods/Target Support Files/Sentinel/Sentinel.release.xcconfig @@ -6,6 +6,7 @@ OTHER_LDFLAGS = $(inherited) -framework "UIKit" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates diff --git a/Sentinel.podspec b/Sentinel.podspec index c659e04..b1f3436 100644 --- a/Sentinel.podspec +++ b/Sentinel.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'Sentinel' - s.version = '1.1.1' + s.version = '1.1.2' s.summary = 'Developer\'s toolbox for debugging applications' s.description = <<-DESC diff --git a/Sentinel/Classes/Core/SourceScreenProvider.swift b/Sentinel/Classes/Core/SourceScreenProvider.swift index 90562d3..5174b8c 100644 --- a/Sentinel/Classes/Core/SourceScreenProvider.swift +++ b/Sentinel/Classes/Core/SourceScreenProvider.swift @@ -32,7 +32,7 @@ public class SourceScreenProviders: NSObject { } } -/// Defines detauls source screen provider used for presenting the Sentinel. +/// Defines default source screen provider used for presenting the Sentinel. @objcMembers public class DefaultSourceScreenProvider: NSObject, SourceScreenProvider { @@ -53,6 +53,13 @@ public class DefaultSourceScreenProvider: NSObject, SourceScreenProvider { topController = newTopController } + if + let navController = topController as? UINavigationController, + navController.visibleViewController is SentinelTabBarController + { + return nil + } + return topController } }