Skip to content

Commit 0061083

Browse files
authored
Merge pull request #19 from dataJAR/1.5
1.5
2 parents 50e45d0 + 29d9462 commit 0061083

File tree

6 files changed

+15
-11
lines changed

6 files changed

+15
-11
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11

22
*.xcuserstate
33
*.xcuserstate
4+
.DS_Store

Jamf Switcher.xcodeproj/project.pbxproj

+9-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 52;
6+
objectVersion = 53;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -183,8 +183,9 @@
183183
798516E61F7AB0D400EF4C1D /* Project object */ = {
184184
isa = PBXProject;
185185
attributes = {
186+
BuildIndependentTargetsInParallel = YES;
186187
LastSwiftUpdateCheck = 0900;
187-
LastUpgradeCheck = 1400;
188+
LastUpgradeCheck = 1430;
188189
ORGANIZATIONNAME = dataJAR;
189190
TargetAttributes = {
190191
798516ED1F7AB0D400EF4C1D = {
@@ -338,7 +339,7 @@
338339
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
339340
GCC_WARN_UNUSED_FUNCTION = YES;
340341
GCC_WARN_UNUSED_VARIABLE = YES;
341-
MACOSX_DEPLOYMENT_TARGET = 10.13;
342+
MACOSX_DEPLOYMENT_TARGET = 13.0;
342343
MTL_ENABLE_DEBUG_INFO = YES;
343344
ONLY_ACTIVE_ARCH = YES;
344345
SDKROOT = macosx;
@@ -394,7 +395,7 @@
394395
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
395396
GCC_WARN_UNUSED_FUNCTION = YES;
396397
GCC_WARN_UNUSED_VARIABLE = YES;
397-
MACOSX_DEPLOYMENT_TARGET = 10.13;
398+
MACOSX_DEPLOYMENT_TARGET = 13.0;
398399
MTL_ENABLE_DEBUG_INFO = NO;
399400
SDKROOT = macosx;
400401
SWIFT_COMPILATION_MODE = wholemodule;
@@ -420,7 +421,8 @@
420421
"$(inherited)",
421422
"@loader_path/../Frameworks",
422423
);
423-
MARKETING_VERSION = 1.4.1;
424+
MACOSX_DEPLOYMENT_TARGET = 13.0;
425+
MARKETING_VERSION = 1.5;
424426
PRODUCT_BUNDLE_IDENTIFIER = uk.co.dataJAR.JamfSwitcher;
425427
PRODUCT_NAME = "$(TARGET_NAME)";
426428
SWIFT_VERSION = 5.0;
@@ -445,7 +447,8 @@
445447
"$(inherited)",
446448
"@loader_path/../Frameworks",
447449
);
448-
MARKETING_VERSION = 1.4.1;
450+
MACOSX_DEPLOYMENT_TARGET = 13.0;
451+
MARKETING_VERSION = 1.5;
449452
PRODUCT_BUNDLE_IDENTIFIER = uk.co.dataJAR.JamfSwitcher;
450453
PRODUCT_NAME = "$(TARGET_NAME)";
451454
SWIFT_VERSION = 5.0;

Jamf Switcher.xcodeproj/xcshareddata/xcschemes/Jamf Switcher.xcscheme

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1400"
3+
LastUpgradeVersion = "1430"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Jamf Switcher/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<key>CFBundleShortVersionString</key>
2020
<string>$(MARKETING_VERSION)</string>
2121
<key>CFBundleVersion</key>
22-
<string>146</string>
22+
<string>147</string>
2323
<key>LSApplicationCategoryType</key>
2424
<string>public.app-category.utilities</string>
2525
<key>LSMinimumSystemVersion</key>

Jamf Switcher/ViewController.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class ViewController: NSViewController {
9393
panel.directoryURL = getDocumentsDirectory()
9494

9595
panel.beginSheetModal(for: self.view.window!) { (result) -> Void in
96-
if result.rawValue == NSFileHandlingPanelOKButton
96+
if result.rawValue == NSApplication.ModalResponse.OK.rawValue
9797
{
9898
guard let url = panel.url else { return }
9999
do {
@@ -127,7 +127,7 @@ class ViewController: NSViewController {
127127

128128
func processSelection() {
129129
let stringSelected = filteredDataToShow[itemsSelected]
130-
let url = stringSelected.url.replacingOccurrences(of: "/?failover", with: "")
130+
let url = stringSelected.url.replacing(/\/\?failover.*/, with:"")
131131
let userDefaultsValue = UserDefaults(suiteName: "com.jamfsoftware.jss")
132132
userDefaultsValue?.set(true, forKey: "allowInvalidCertificate")
133133
userDefaultsValue?.set(url, forKey: "url")
@@ -493,7 +493,7 @@ class ViewController: NSViewController {
493493
private func ParseURL(url: String) -> String {
494494
var checkedJSSURL = url
495495
if checkedJSSURL.contains("?failover") {
496-
checkedJSSURL = checkedJSSURL.replacingOccurrences(of: "?failover", with: "")
496+
checkedJSSURL = checkedJSSURL.replacing(/\/\?failover.*/, with:"")
497497
}
498498
if checkedJSSURL.suffix(1) == "/" {
499499
checkedJSSURL = String(checkedJSSURL.dropLast())

0 commit comments

Comments
 (0)