├── .gitignore ├── Jamf Framework Redeploy ├── Assets.xcassets │ ├── Contents.json │ ├── AppIcon.appiconset │ │ ├── appicon-128.png │ │ ├── appicon-16.png │ │ ├── appicon-256.png │ │ ├── appicon-32.png │ │ ├── appicon-512.png │ │ ├── appicon-64.png │ │ ├── appicon-1024.png │ │ ├── appicon-256 1.png │ │ ├── appicon-32 1.png │ │ ├── appicon-512 1.png │ │ └── Contents.json │ └── AccentColor.colorset │ │ └── Contents.json ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json ├── Logger.swift ├── Jamf_Framework_Redeploy.entitlements ├── Jamf_Framework_RedeployApp.swift ├── Keychain.swift ├── JamfProApi.swift └── ContentView.swift ├── Jamf Framework Redeploy.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcuserdata │ │ └── richard.mallion.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── xcuserdata │ └── richard.mallion.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── project.pbxproj ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | .DS_Store 3 | -------------------------------------------------------------------------------- /Jamf Framework Redeploy/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Jamf Framework Redeploy/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red5coder/Jamf-Framework-Redeploy/HEAD/Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-128.png -------------------------------------------------------------------------------- /Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red5coder/Jamf-Framework-Redeploy/HEAD/Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-16.png -------------------------------------------------------------------------------- /Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red5coder/Jamf-Framework-Redeploy/HEAD/Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-256.png -------------------------------------------------------------------------------- /Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red5coder/Jamf-Framework-Redeploy/HEAD/Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-32.png -------------------------------------------------------------------------------- /Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red5coder/Jamf-Framework-Redeploy/HEAD/Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-512.png -------------------------------------------------------------------------------- /Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red5coder/Jamf-Framework-Redeploy/HEAD/Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-64.png -------------------------------------------------------------------------------- /Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red5coder/Jamf-Framework-Redeploy/HEAD/Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-1024.png -------------------------------------------------------------------------------- /Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-256 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red5coder/Jamf-Framework-Redeploy/HEAD/Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-256 1.png -------------------------------------------------------------------------------- /Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-32 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red5coder/Jamf-Framework-Redeploy/HEAD/Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-32 1.png -------------------------------------------------------------------------------- /Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-512 1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red5coder/Jamf-Framework-Redeploy/HEAD/Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/appicon-512 1.png -------------------------------------------------------------------------------- /Jamf Framework Redeploy.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Jamf Framework Redeploy/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Jamf Framework Redeploy.xcodeproj/project.xcworkspace/xcuserdata/richard.mallion.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/red5coder/Jamf-Framework-Redeploy/HEAD/Jamf Framework Redeploy.xcodeproj/project.xcworkspace/xcuserdata/richard.mallion.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Jamf Framework Redeploy.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Jamf Framework Redeploy/Logger.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Logger.swift 3 | // Jamf Framework Redeploy 4 | // 5 | // Created by Richard Mallion on 16/08/2024. 6 | // 7 | 8 | import Foundation 9 | import os.log 10 | 11 | extension Logger { 12 | private static var subsystem = Bundle.main.bundleIdentifier! 13 | 14 | //Categories 15 | static let loggerapi = Logger(subsystem: subsystem, category: "api") // added lnh 16 | } 17 | -------------------------------------------------------------------------------- /Jamf Framework Redeploy/Jamf_Framework_Redeploy.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.files.user-selected.read-only 8 | 9 | com.apple.security.network.client 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /Jamf Framework Redeploy.xcodeproj/xcuserdata/richard.mallion.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Jamf Framework Redeploy.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Jamf Framework Redeploy/Jamf_Framework_RedeployApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Jamf_Framework_RedeployApp.swift 3 | // Jamf Framework Redeploy 4 | // 5 | // Created by Richard Mallion on 09/01/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct Jamf_Framework_RedeployApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | .frame( 16 | minWidth: 500, maxWidth: 500, 17 | minHeight: 300, maxHeight: 300) 18 | 19 | } 20 | .windowResizability(.contentSize) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 red5coder 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Jamf-Framework-Redeploy 2 | With the release of Jamf Pro 10.36, a new API endpoint was added, which allows you to distribute a QuickAdd.pkg to the macOS client to re-deploy the Jamf Framework. Under the hood, its using the InstallEnterpriseApplication MDM command. 3 | 4 | The Jamf Framework Redeploy utility will allow you to easily call this API, and re-deploy the Jamf Framework for a selected computer. 5 | redeploy 6 | 7 | ### Requirements 8 | 9 | - A Mac running macOS Venture (13.0) 10 | - Jamf Pro API Role / Client that has the following minimum persmissions 11 | - Send Computer Remote Command to Install Package 12 | - Read - Computers 13 | - Jamf Pro Server Settings 14 | - Read - Checkin 15 | - The Apple MDM Framework has to be still present on the Mac 16 | - The serial number of the effect Mac 17 | 18 | If successful, within the management history of that device you should see a InstallEnterpriseApplication MDM command. 19 | 20 | history 21 | 22 | ### History Update 23 | - v1.1 - Authentication now uses API Roles and Clients. Support for basic authentication has been removed. 24 | -------------------------------------------------------------------------------- /Jamf Framework Redeploy/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "appicon-16.png", 5 | "idiom" : "mac", 6 | "scale" : "1x", 7 | "size" : "16x16" 8 | }, 9 | { 10 | "filename" : "appicon-32.png", 11 | "idiom" : "mac", 12 | "scale" : "2x", 13 | "size" : "16x16" 14 | }, 15 | { 16 | "filename" : "appicon-32 1.png", 17 | "idiom" : "mac", 18 | "scale" : "1x", 19 | "size" : "32x32" 20 | }, 21 | { 22 | "filename" : "appicon-64.png", 23 | "idiom" : "mac", 24 | "scale" : "2x", 25 | "size" : "32x32" 26 | }, 27 | { 28 | "filename" : "appicon-128.png", 29 | "idiom" : "mac", 30 | "scale" : "1x", 31 | "size" : "128x128" 32 | }, 33 | { 34 | "filename" : "appicon-256.png", 35 | "idiom" : "mac", 36 | "scale" : "2x", 37 | "size" : "128x128" 38 | }, 39 | { 40 | "filename" : "appicon-256 1.png", 41 | "idiom" : "mac", 42 | "scale" : "1x", 43 | "size" : "256x256" 44 | }, 45 | { 46 | "filename" : "appicon-512.png", 47 | "idiom" : "mac", 48 | "scale" : "2x", 49 | "size" : "256x256" 50 | }, 51 | { 52 | "filename" : "appicon-512 1.png", 53 | "idiom" : "mac", 54 | "scale" : "1x", 55 | "size" : "512x512" 56 | }, 57 | { 58 | "filename" : "appicon-1024.png", 59 | "idiom" : "mac", 60 | "scale" : "2x", 61 | "size" : "512x512" 62 | } 63 | ], 64 | "info" : { 65 | "author" : "xcode", 66 | "version" : 1 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Jamf Framework Redeploy/Keychain.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Keychain.swift 3 | // Jamf Framework Redeploy 4 | // 5 | // Created by Richard Mallion on 10/01/2023. 6 | // 7 | 8 | import Foundation 9 | import Security 10 | 11 | let kSecAttrAccountString = NSString(format: kSecAttrAccount) 12 | let kSecValueDataString = NSString(format: kSecValueData) 13 | let kSecClassGenericPasswordString = NSString(format: kSecClassGenericPassword) 14 | 15 | class Keychain { 16 | 17 | func save(service: String, account: String, data: String) { 18 | 19 | if let password = data.data(using: String.Encoding.utf8) { 20 | var keychainQuery: [String: Any] = [kSecClass as String: kSecClassGenericPassword, 21 | kSecAttrService as String: service, 22 | kSecAttrAccount as String: account, 23 | kSecValueData as String: password] 24 | 25 | // see if credentials already exist for server 26 | let accountCheck = retrieve(service: service) 27 | if accountCheck.count == 0 { 28 | // try to add new credentials, if account exists we'll try updating it 29 | let addStatus = SecItemAdd(keychainQuery as CFDictionary, nil) 30 | if (addStatus != errSecSuccess) { 31 | if let addErr = SecCopyErrorMessageString(addStatus, nil) { 32 | print("[addStatus] Write failed for new credentials: \(addErr)") 33 | } 34 | } 35 | } else { 36 | // credentials already exist, try to update 37 | keychainQuery = [kSecClass as String: kSecClassGenericPasswordString, 38 | kSecAttrService as String: service, 39 | kSecMatchLimit as String: kSecMatchLimitOne, 40 | kSecReturnAttributes as String: true] 41 | let updateStatus = SecItemUpdate(keychainQuery as CFDictionary, [kSecAttrAccountString:account,kSecValueDataString:password] as CFDictionary) 42 | if (updateStatus != errSecSuccess) { 43 | if let updateErr = SecCopyErrorMessageString(updateStatus, nil) { 44 | print("[updateStatus] Update failed for existing credentials: \(updateErr)") 45 | } 46 | } 47 | } 48 | } 49 | } 50 | 51 | func retrieve(service: String) -> [String] { 52 | 53 | var storedCreds = [String]() 54 | 55 | let keychainQuery: [String: Any] = [kSecClass as String: kSecClassGenericPasswordString, 56 | kSecAttrService as String: service, 57 | kSecMatchLimit as String: kSecMatchLimitOne, 58 | kSecReturnAttributes as String: true, 59 | kSecReturnData as String: true] 60 | var item: CFTypeRef? 61 | let status = SecItemCopyMatching(keychainQuery as CFDictionary, &item) 62 | guard status != errSecItemNotFound else { return [] } 63 | guard status == errSecSuccess else { return [] } 64 | 65 | guard let existingItem = item as? [String : Any], 66 | let passwordData = existingItem[kSecValueData as String] as? Data, 67 | let account = existingItem[kSecAttrAccount as String] as? String, 68 | let password = String(data: passwordData, encoding: String.Encoding.utf8) 69 | else { 70 | return [] 71 | } 72 | storedCreds.append(account) 73 | storedCreds.append(password) 74 | return storedCreds 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /Jamf Framework Redeploy/JamfProApi.swift: -------------------------------------------------------------------------------- 1 | // 2 | // JamfProApi.swift 3 | // Jamf Framework Redeploy 4 | // 5 | // Created by Richard Mallion on 10/01/2023. 6 | // 7 | 8 | import Foundation 9 | import os.log 10 | 11 | struct JamfProAPI { 12 | 13 | // var username: String 14 | // var password: String 15 | // 16 | // var base64Credentials: String { 17 | // return "\(username):\(password)" 18 | // .data(using: String.Encoding.utf8)! 19 | // .base64EncodedString() 20 | // } 21 | 22 | func getToken(jssURL: String, clientID: String, secret: String ) async -> (JamfOAuth?,Int?) { 23 | Logger.loggerapi.info("About to fetch an authentication token") 24 | guard var jamfAuthEndpoint = URL(string: jssURL) else { 25 | return (nil, nil) 26 | } 27 | 28 | jamfAuthEndpoint.append(path: "/api/oauth/token") 29 | 30 | let parameters = [ 31 | "client_id": clientID, 32 | "grant_type": "client_credentials", 33 | "client_secret": secret 34 | ] 35 | 36 | 37 | // guard let url = jamfAuthEndpoint.url else { 38 | // return (nil, nil) 39 | // } 40 | 41 | var authRequest = URLRequest(url: jamfAuthEndpoint) 42 | authRequest.httpMethod = "POST" 43 | authRequest.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type") 44 | let postData = parameters.map { key, value in 45 | return "\(key)=\(value)" 46 | }.joined(separator: "&") 47 | authRequest.httpBody = postData.data(using: .utf8) 48 | 49 | guard let (data, response) = try? await URLSession.shared.data(for: authRequest) 50 | else { 51 | return (nil, nil) 52 | } 53 | 54 | let httpResponse = response as? HTTPURLResponse 55 | if let httpResponse { 56 | Logger.loggerapi.info("Response from authenticating: \(httpResponse.statusCode, privacy: .public)") 57 | } 58 | 59 | do { 60 | let jssToken = try JSONDecoder().decode(JamfOAuth.self, from: data) 61 | return (jssToken, httpResponse?.statusCode) 62 | } catch _ { 63 | return (nil, httpResponse?.statusCode) 64 | } 65 | } 66 | 67 | 68 | //1.0.2 Change 69 | func getComputerID(jssURL: String, authToken: String, serialNumber: String) async -> (Int?,Int?) { 70 | Logger.loggerapi.info("About to fetch Computer ID for \(serialNumber, privacy: .public)") 71 | guard var jamfcomputerEndpoint = URLComponents(string: jssURL) else { 72 | return (nil, nil) 73 | } 74 | 75 | jamfcomputerEndpoint.path="/JSSResource/computers/serialnumber/\(serialNumber)" 76 | 77 | guard let url = jamfcomputerEndpoint.url else { 78 | return (nil, nil) 79 | } 80 | 81 | 82 | var computerRequest = URLRequest(url: url) 83 | computerRequest.httpMethod = "GET" 84 | computerRequest.setValue("Bearer \(authToken)", forHTTPHeaderField: "Authorization") 85 | computerRequest.setValue("application/json", forHTTPHeaderField: "Accept") 86 | 87 | guard let (data, response) = try? await URLSession.shared.data(for: computerRequest) 88 | else { 89 | return (nil, nil) 90 | } 91 | let httpResponse = response as? HTTPURLResponse 92 | if let httpResponse { 93 | Logger.loggerapi.info("Response from fetching computer id: \(httpResponse.statusCode, privacy: .public)") 94 | } 95 | do { 96 | let computer = try JSONDecoder().decode(Computer.self, from: data) 97 | Logger.loggerapi.info("Computer ID found \(computer.computer.general.id, privacy: .public)") 98 | return (computer.computer.general.id, httpResponse?.statusCode) 99 | } catch _ { 100 | return (nil, httpResponse?.statusCode) 101 | } 102 | } 103 | 104 | 105 | func redeployJamfFramework(jssURL: String, authToken: String, computerID: Int) async -> Int? { 106 | Logger.loggerapi.info("About to redeploy the framework for computer id: \(computerID, privacy: .public)") 107 | guard var jamfRedeployEndpoint = URLComponents(string: jssURL) else { 108 | return nil 109 | } 110 | 111 | jamfRedeployEndpoint.path="/api/v1/jamf-management-framework/redeploy/\(computerID)" 112 | 113 | guard let url = jamfRedeployEndpoint.url else { 114 | return nil 115 | } 116 | 117 | var redeployRequest = URLRequest(url: url) 118 | redeployRequest.httpMethod = "POST" 119 | redeployRequest.setValue("Bearer \(authToken)", forHTTPHeaderField: "Authorization") 120 | redeployRequest.setValue("application/json", forHTTPHeaderField: "Accept") 121 | 122 | guard let (_, response) = try? await URLSession.shared.data(for: redeployRequest) 123 | else { 124 | return nil 125 | } 126 | 127 | let httpResponse = response as? HTTPURLResponse 128 | if let httpResponse { 129 | Logger.loggerapi.info("Response from redeploying framework: \(httpResponse.statusCode, privacy: .public)") 130 | } 131 | return httpResponse?.statusCode 132 | } 133 | } 134 | 135 | // MARK: - Jamf Pro Auth Model 136 | struct JamfOAuth: Decodable { 137 | let access_token: String 138 | let expires_in: Int 139 | enum CodingKeys: String, CodingKey { 140 | case access_token 141 | case expires_in 142 | } 143 | } 144 | 145 | struct Computer: Codable { 146 | let computer: ComputerDetail 147 | } 148 | 149 | // MARK: - Computer Model 150 | struct ComputerDetail: Codable { 151 | let general: General 152 | 153 | enum CodingKeys: String, CodingKey { 154 | case general 155 | } 156 | } 157 | 158 | struct General: Codable { 159 | let id: Int 160 | enum CodingKeys: String, CodingKey { 161 | case id 162 | } 163 | } 164 | 165 | -------------------------------------------------------------------------------- /Jamf Framework Redeploy/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Jamf Framework Redeploy 4 | // 5 | // Created by Richard Mallion on 09/01/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | 12 | @State private var jamfURL = "" 13 | @State private var userName = "" 14 | @State private var password = "" 15 | @State private var savePassword = false 16 | @State private var serialNumber = "" 17 | 18 | @State private var buttonDisabled = false 19 | 20 | @State private var showAlert = false 21 | 22 | @State private var alertMessage = "" 23 | @State private var alertTitle = "" 24 | 25 | var body: some View { 26 | 27 | VStack(alignment: .trailing){ 28 | 29 | HStack(alignment: .center) { 30 | 31 | VStack(alignment: .trailing, spacing: 12.0) { 32 | Text("Jamf Server URL:") 33 | Text("Client ID:") 34 | Text("Secret:") 35 | } 36 | 37 | 38 | VStack(alignment: .leading, spacing: 7.0) { 39 | TextField("https://your-jamf-server.com" , text: $jamfURL) 40 | .textFieldStyle(.roundedBorder) 41 | .onChange(of: jamfURL) { newValue in 42 | let defaults = UserDefaults.standard 43 | defaults.set(jamfURL , forKey: "jamfURL") 44 | updateAction() 45 | } 46 | TextField("Your Jamf Pro admin user name" , text: $userName) 47 | .textFieldStyle(.roundedBorder) 48 | .onChange(of: userName) { newValue in 49 | let defaults = UserDefaults.standard 50 | defaults.set(userName , forKey: "userName") 51 | updateAction() 52 | } 53 | 54 | SecureField("Your password" , text: $password) 55 | .textFieldStyle(.roundedBorder) 56 | .onChange(of: password) { newValue in 57 | if savePassword { 58 | DispatchQueue.global(qos: .background).async { 59 | Keychain().save(service: "co.uk.mallion.Jamf-Framework-Redeploy", account: userName, data: password) 60 | } 61 | } else { 62 | DispatchQueue.global(qos: .background).async { 63 | Keychain().save(service: "co.uk.mallion.Jamf-Framework-Redeploy", account: userName, data: "") 64 | } 65 | } 66 | updateAction() 67 | } 68 | } 69 | } 70 | .padding() 71 | .alert(isPresented: self.$showAlert, 72 | content: { 73 | self.showCustomAlert() 74 | }) 75 | 76 | Toggle(isOn: $savePassword) { 77 | Text("Save Password") 78 | } 79 | .toggleStyle(CheckboxToggleStyle()) 80 | .offset(x: -260 , y: -10) 81 | .onChange(of: savePassword) { newValue in 82 | let defaults = UserDefaults.standard 83 | defaults.set(savePassword, forKey: "savePassword") 84 | if savePassword { 85 | DispatchQueue.global(qos: .background).async { 86 | Keychain().save(service: "co.uk.mallion.Jamf-Framework-Redeploy", account: userName, data: password) 87 | } 88 | } else { 89 | DispatchQueue.global(qos: .background).async { 90 | Keychain().save(service: "co.uk.mallion.Jamf-Framework-Redeploy", account: userName, data: "") 91 | } 92 | } 93 | 94 | } 95 | 96 | HStack { 97 | Text("Serial Number:") 98 | .padding(.leading, 15) 99 | 100 | TextField("Mac Serial Number" , text: $serialNumber) 101 | .textFieldStyle(.roundedBorder) 102 | .onChange(of: serialNumber) { newValue in 103 | updateAction() 104 | } 105 | } 106 | .padding() 107 | 108 | Button(/*@START_MENU_TOKEN@*/"Redeploy"/*@END_MENU_TOKEN@*/) { 109 | Task { 110 | await redploy() 111 | } 112 | } 113 | .padding() 114 | .disabled(buttonDisabled) 115 | } 116 | .onAppear { 117 | let defaults = UserDefaults.standard 118 | userName = defaults.string(forKey: "userName") ?? "" 119 | jamfURL = defaults.string(forKey: "jamfURL") ?? "" 120 | savePassword = defaults.bool(forKey: "savePassword" ) 121 | if savePassword { 122 | let credentialsArray = Keychain().retrieve(service: "co.uk.mallion.Jamf-Framework-Redeploy") 123 | if credentialsArray.count == 2 { 124 | userName = credentialsArray[0] 125 | password = credentialsArray[1] 126 | } 127 | } 128 | 129 | } 130 | 131 | } 132 | 133 | func updateAction() { 134 | if jamfURL.validURL && !userName.isEmpty && !password.isEmpty && !serialNumber.isEmpty { 135 | buttonDisabled = false 136 | } else { 137 | buttonDisabled = true 138 | } 139 | } 140 | 141 | 142 | func showCustomAlert() -> Alert { 143 | return Alert( 144 | title: Text(alertTitle), 145 | message: Text(alertMessage), 146 | dismissButton: .default(Text("OK")) 147 | ) 148 | } 149 | 150 | 151 | func redploy() async { 152 | let jamfPro = JamfProAPI() 153 | 154 | let (authToken, _) = await jamfPro.getToken(jssURL: jamfURL, clientID: userName, secret: password) 155 | print(authToken) 156 | guard let authToken else { 157 | alertMessage = "Could not authenticate. Please check the url and authentication details" 158 | alertTitle = "Authentication Error" 159 | showAlert = true 160 | return 161 | } 162 | 163 | 164 | //1.0.2 Change 165 | let (computerID, computerResponse) = await jamfPro.getComputerID(jssURL: jamfURL, authToken: authToken.access_token, serialNumber: serialNumber) 166 | 167 | guard let computerID else { 168 | alertMessage = "Could not find this computer, please check the serial number." 169 | alertTitle = "Computer Record" 170 | showAlert = true 171 | return 172 | } 173 | 174 | guard let computerResponse, computerResponse == 200 else { 175 | alertMessage = "Could not find this computer, please check the serial number." 176 | alertTitle = "Computer Record" 177 | showAlert = true 178 | return 179 | } 180 | 181 | let redeployResponse = await jamfPro.redeployJamfFramework(jssURL: jamfURL, authToken: authToken.access_token, computerID: computerID) 182 | 183 | guard let redeployResponse, redeployResponse == 202 else { 184 | alertMessage = "Could not queue the redeploy the Jamf Managment Framework." 185 | alertTitle = "Redeployment" 186 | showAlert = true 187 | return 188 | } 189 | 190 | alertMessage = "Command successfully queued to redeploy the Jamf Managment Framework." 191 | alertTitle = "Redeployment" 192 | showAlert = true 193 | } 194 | } 195 | 196 | struct ContentView_Previews: PreviewProvider { 197 | static var previews: some View { 198 | ContentView() 199 | } 200 | } 201 | 202 | 203 | extension String { 204 | var validURL: Bool { 205 | get { 206 | // let regEx = "((?:http|https)://)?(?:www\\.)?[\\w\\d\\-_]+\\.\\w{2,3}(\\.\\w{2})?(/(?<=/)(?:[\\w\\d\\-./_]+)?)?" 207 | let regEx = "^((http|https)://)[-a-zA-Z0-9@:%._\\+~#?&//=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%._\\+~#?&//=]*)$" 208 | let predicate = NSPredicate(format: "SELF MATCHES %@", argumentArray: [regEx]) 209 | return predicate.evaluate(with: self) 210 | } 211 | } 212 | } 213 | 214 | -------------------------------------------------------------------------------- /Jamf Framework Redeploy.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | FB7EA00C2C6F6BEF00C990E4 /* Logger.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB7EA00B2C6F6BEF00C990E4 /* Logger.swift */; }; 11 | FBFE2ED1296C6A7000351FF3 /* Jamf_Framework_RedeployApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBFE2ED0296C6A7000351FF3 /* Jamf_Framework_RedeployApp.swift */; }; 12 | FBFE2ED3296C6A7000351FF3 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBFE2ED2296C6A7000351FF3 /* ContentView.swift */; }; 13 | FBFE2ED5296C6A7100351FF3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FBFE2ED4296C6A7100351FF3 /* Assets.xcassets */; }; 14 | FBFE2ED8296C6A7100351FF3 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FBFE2ED7296C6A7100351FF3 /* Preview Assets.xcassets */; }; 15 | FBFE2EE0296D62E200351FF3 /* JamfProApi.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBFE2EDF296D62E200351FF3 /* JamfProApi.swift */; }; 16 | FBFE2EE2296DAEBB00351FF3 /* Keychain.swift in Sources */ = {isa = PBXBuildFile; fileRef = FBFE2EE1296DAEBB00351FF3 /* Keychain.swift */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | FB7EA00B2C6F6BEF00C990E4 /* Logger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Logger.swift; sourceTree = ""; }; 21 | FBFE2ECD296C6A7000351FF3 /* Jamf Framework Redeploy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Jamf Framework Redeploy.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | FBFE2ED0296C6A7000351FF3 /* Jamf_Framework_RedeployApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Jamf_Framework_RedeployApp.swift; sourceTree = ""; }; 23 | FBFE2ED2296C6A7000351FF3 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 24 | FBFE2ED4296C6A7100351FF3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 25 | FBFE2ED7296C6A7100351FF3 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 26 | FBFE2ED9296C6A7100351FF3 /* Jamf_Framework_Redeploy.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Jamf_Framework_Redeploy.entitlements; sourceTree = ""; }; 27 | FBFE2EDF296D62E200351FF3 /* JamfProApi.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JamfProApi.swift; sourceTree = ""; }; 28 | FBFE2EE1296DAEBB00351FF3 /* Keychain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Keychain.swift; sourceTree = ""; }; 29 | /* End PBXFileReference section */ 30 | 31 | /* Begin PBXFrameworksBuildPhase section */ 32 | FBFE2ECA296C6A7000351FF3 /* Frameworks */ = { 33 | isa = PBXFrameworksBuildPhase; 34 | buildActionMask = 2147483647; 35 | files = ( 36 | ); 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXFrameworksBuildPhase section */ 40 | 41 | /* Begin PBXGroup section */ 42 | FBFE2EC4296C6A7000351FF3 = { 43 | isa = PBXGroup; 44 | children = ( 45 | FBFE2ECF296C6A7000351FF3 /* Jamf Framework Redeploy */, 46 | FBFE2ECE296C6A7000351FF3 /* Products */, 47 | ); 48 | sourceTree = ""; 49 | }; 50 | FBFE2ECE296C6A7000351FF3 /* Products */ = { 51 | isa = PBXGroup; 52 | children = ( 53 | FBFE2ECD296C6A7000351FF3 /* Jamf Framework Redeploy.app */, 54 | ); 55 | name = Products; 56 | sourceTree = ""; 57 | }; 58 | FBFE2ECF296C6A7000351FF3 /* Jamf Framework Redeploy */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | FBFE2ED0296C6A7000351FF3 /* Jamf_Framework_RedeployApp.swift */, 62 | FBFE2ED2296C6A7000351FF3 /* ContentView.swift */, 63 | FBFE2EE1296DAEBB00351FF3 /* Keychain.swift */, 64 | FBFE2EDF296D62E200351FF3 /* JamfProApi.swift */, 65 | FBFE2ED4296C6A7100351FF3 /* Assets.xcassets */, 66 | FBFE2ED9296C6A7100351FF3 /* Jamf_Framework_Redeploy.entitlements */, 67 | FBFE2ED6296C6A7100351FF3 /* Preview Content */, 68 | FB7EA00B2C6F6BEF00C990E4 /* Logger.swift */, 69 | ); 70 | path = "Jamf Framework Redeploy"; 71 | sourceTree = ""; 72 | }; 73 | FBFE2ED6296C6A7100351FF3 /* Preview Content */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | FBFE2ED7296C6A7100351FF3 /* Preview Assets.xcassets */, 77 | ); 78 | path = "Preview Content"; 79 | sourceTree = ""; 80 | }; 81 | /* End PBXGroup section */ 82 | 83 | /* Begin PBXNativeTarget section */ 84 | FBFE2ECC296C6A7000351FF3 /* Jamf Framework Redeploy */ = { 85 | isa = PBXNativeTarget; 86 | buildConfigurationList = FBFE2EDC296C6A7100351FF3 /* Build configuration list for PBXNativeTarget "Jamf Framework Redeploy" */; 87 | buildPhases = ( 88 | FBFE2EC9296C6A7000351FF3 /* Sources */, 89 | FBFE2ECA296C6A7000351FF3 /* Frameworks */, 90 | FBFE2ECB296C6A7000351FF3 /* Resources */, 91 | ); 92 | buildRules = ( 93 | ); 94 | dependencies = ( 95 | ); 96 | name = "Jamf Framework Redeploy"; 97 | productName = "Jamf Framework Redeploy"; 98 | productReference = FBFE2ECD296C6A7000351FF3 /* Jamf Framework Redeploy.app */; 99 | productType = "com.apple.product-type.application"; 100 | }; 101 | /* End PBXNativeTarget section */ 102 | 103 | /* Begin PBXProject section */ 104 | FBFE2EC5296C6A7000351FF3 /* Project object */ = { 105 | isa = PBXProject; 106 | attributes = { 107 | BuildIndependentTargetsInParallel = 1; 108 | LastSwiftUpdateCheck = 1420; 109 | LastUpgradeCheck = 1420; 110 | TargetAttributes = { 111 | FBFE2ECC296C6A7000351FF3 = { 112 | CreatedOnToolsVersion = 14.2; 113 | }; 114 | }; 115 | }; 116 | buildConfigurationList = FBFE2EC8296C6A7000351FF3 /* Build configuration list for PBXProject "Jamf Framework Redeploy" */; 117 | compatibilityVersion = "Xcode 14.0"; 118 | developmentRegion = en; 119 | hasScannedForEncodings = 0; 120 | knownRegions = ( 121 | en, 122 | Base, 123 | ); 124 | mainGroup = FBFE2EC4296C6A7000351FF3; 125 | productRefGroup = FBFE2ECE296C6A7000351FF3 /* Products */; 126 | projectDirPath = ""; 127 | projectRoot = ""; 128 | targets = ( 129 | FBFE2ECC296C6A7000351FF3 /* Jamf Framework Redeploy */, 130 | ); 131 | }; 132 | /* End PBXProject section */ 133 | 134 | /* Begin PBXResourcesBuildPhase section */ 135 | FBFE2ECB296C6A7000351FF3 /* Resources */ = { 136 | isa = PBXResourcesBuildPhase; 137 | buildActionMask = 2147483647; 138 | files = ( 139 | FBFE2ED8296C6A7100351FF3 /* Preview Assets.xcassets in Resources */, 140 | FBFE2ED5296C6A7100351FF3 /* Assets.xcassets in Resources */, 141 | ); 142 | runOnlyForDeploymentPostprocessing = 0; 143 | }; 144 | /* End PBXResourcesBuildPhase section */ 145 | 146 | /* Begin PBXSourcesBuildPhase section */ 147 | FBFE2EC9296C6A7000351FF3 /* Sources */ = { 148 | isa = PBXSourcesBuildPhase; 149 | buildActionMask = 2147483647; 150 | files = ( 151 | FB7EA00C2C6F6BEF00C990E4 /* Logger.swift in Sources */, 152 | FBFE2ED3296C6A7000351FF3 /* ContentView.swift in Sources */, 153 | FBFE2EE2296DAEBB00351FF3 /* Keychain.swift in Sources */, 154 | FBFE2EE0296D62E200351FF3 /* JamfProApi.swift in Sources */, 155 | FBFE2ED1296C6A7000351FF3 /* Jamf_Framework_RedeployApp.swift in Sources */, 156 | ); 157 | runOnlyForDeploymentPostprocessing = 0; 158 | }; 159 | /* End PBXSourcesBuildPhase section */ 160 | 161 | /* Begin XCBuildConfiguration section */ 162 | FBFE2EDA296C6A7100351FF3 /* Debug */ = { 163 | isa = XCBuildConfiguration; 164 | buildSettings = { 165 | ALWAYS_SEARCH_USER_PATHS = NO; 166 | CLANG_ANALYZER_NONNULL = YES; 167 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 168 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 169 | CLANG_ENABLE_MODULES = YES; 170 | CLANG_ENABLE_OBJC_ARC = YES; 171 | CLANG_ENABLE_OBJC_WEAK = YES; 172 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 173 | CLANG_WARN_BOOL_CONVERSION = YES; 174 | CLANG_WARN_COMMA = YES; 175 | CLANG_WARN_CONSTANT_CONVERSION = YES; 176 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 177 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 178 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 179 | CLANG_WARN_EMPTY_BODY = YES; 180 | CLANG_WARN_ENUM_CONVERSION = YES; 181 | CLANG_WARN_INFINITE_RECURSION = YES; 182 | CLANG_WARN_INT_CONVERSION = YES; 183 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 184 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 185 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 186 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 187 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 188 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 189 | CLANG_WARN_STRICT_PROTOTYPES = YES; 190 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 191 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 192 | CLANG_WARN_UNREACHABLE_CODE = YES; 193 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 194 | COPY_PHASE_STRIP = NO; 195 | DEBUG_INFORMATION_FORMAT = dwarf; 196 | ENABLE_STRICT_OBJC_MSGSEND = YES; 197 | ENABLE_TESTABILITY = YES; 198 | GCC_C_LANGUAGE_STANDARD = gnu11; 199 | GCC_DYNAMIC_NO_PIC = NO; 200 | GCC_NO_COMMON_BLOCKS = YES; 201 | GCC_OPTIMIZATION_LEVEL = 0; 202 | GCC_PREPROCESSOR_DEFINITIONS = ( 203 | "DEBUG=1", 204 | "$(inherited)", 205 | ); 206 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 207 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 208 | GCC_WARN_UNDECLARED_SELECTOR = YES; 209 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 210 | GCC_WARN_UNUSED_FUNCTION = YES; 211 | GCC_WARN_UNUSED_VARIABLE = YES; 212 | MACOSX_DEPLOYMENT_TARGET = 13.1; 213 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 214 | MTL_FAST_MATH = YES; 215 | ONLY_ACTIVE_ARCH = YES; 216 | SDKROOT = macosx; 217 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 218 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 219 | }; 220 | name = Debug; 221 | }; 222 | FBFE2EDB296C6A7100351FF3 /* Release */ = { 223 | isa = XCBuildConfiguration; 224 | buildSettings = { 225 | ALWAYS_SEARCH_USER_PATHS = NO; 226 | CLANG_ANALYZER_NONNULL = YES; 227 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 228 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 229 | CLANG_ENABLE_MODULES = YES; 230 | CLANG_ENABLE_OBJC_ARC = YES; 231 | CLANG_ENABLE_OBJC_WEAK = YES; 232 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 233 | CLANG_WARN_BOOL_CONVERSION = YES; 234 | CLANG_WARN_COMMA = YES; 235 | CLANG_WARN_CONSTANT_CONVERSION = YES; 236 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 237 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 238 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 239 | CLANG_WARN_EMPTY_BODY = YES; 240 | CLANG_WARN_ENUM_CONVERSION = YES; 241 | CLANG_WARN_INFINITE_RECURSION = YES; 242 | CLANG_WARN_INT_CONVERSION = YES; 243 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 244 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 245 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 246 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 247 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 248 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 249 | CLANG_WARN_STRICT_PROTOTYPES = YES; 250 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 251 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 252 | CLANG_WARN_UNREACHABLE_CODE = YES; 253 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 254 | COPY_PHASE_STRIP = NO; 255 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 256 | ENABLE_NS_ASSERTIONS = NO; 257 | ENABLE_STRICT_OBJC_MSGSEND = YES; 258 | GCC_C_LANGUAGE_STANDARD = gnu11; 259 | GCC_NO_COMMON_BLOCKS = YES; 260 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 261 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 262 | GCC_WARN_UNDECLARED_SELECTOR = YES; 263 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 264 | GCC_WARN_UNUSED_FUNCTION = YES; 265 | GCC_WARN_UNUSED_VARIABLE = YES; 266 | MACOSX_DEPLOYMENT_TARGET = 13.1; 267 | MTL_ENABLE_DEBUG_INFO = NO; 268 | MTL_FAST_MATH = YES; 269 | SDKROOT = macosx; 270 | SWIFT_COMPILATION_MODE = wholemodule; 271 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 272 | }; 273 | name = Release; 274 | }; 275 | FBFE2EDD296C6A7100351FF3 /* Debug */ = { 276 | isa = XCBuildConfiguration; 277 | buildSettings = { 278 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 279 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 280 | CODE_SIGN_ENTITLEMENTS = "Jamf Framework Redeploy/Jamf_Framework_Redeploy.entitlements"; 281 | CODE_SIGN_STYLE = Automatic; 282 | COMBINE_HIDPI_IMAGES = YES; 283 | CURRENT_PROJECT_VERSION = 36; 284 | DEVELOPMENT_ASSET_PATHS = "\"Jamf Framework Redeploy/Preview Content\""; 285 | DEVELOPMENT_TEAM = VR4GB7TBDP; 286 | ENABLE_HARDENED_RUNTIME = YES; 287 | ENABLE_PREVIEWS = YES; 288 | GENERATE_INFOPLIST_FILE = YES; 289 | INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; 290 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 291 | LD_RUNPATH_SEARCH_PATHS = ( 292 | "$(inherited)", 293 | "@executable_path/../Frameworks", 294 | ); 295 | MACOSX_DEPLOYMENT_TARGET = 13.0; 296 | MARKETING_VERSION = 1.1.1; 297 | PRODUCT_BUNDLE_IDENTIFIER = "co.uk.mallion.Jamf-Framework-Redeploy"; 298 | PRODUCT_NAME = "$(TARGET_NAME)"; 299 | SWIFT_EMIT_LOC_STRINGS = YES; 300 | SWIFT_VERSION = 5.0; 301 | }; 302 | name = Debug; 303 | }; 304 | FBFE2EDE296C6A7100351FF3 /* Release */ = { 305 | isa = XCBuildConfiguration; 306 | buildSettings = { 307 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 308 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 309 | CODE_SIGN_ENTITLEMENTS = "Jamf Framework Redeploy/Jamf_Framework_Redeploy.entitlements"; 310 | CODE_SIGN_STYLE = Automatic; 311 | COMBINE_HIDPI_IMAGES = YES; 312 | CURRENT_PROJECT_VERSION = 36; 313 | DEVELOPMENT_ASSET_PATHS = "\"Jamf Framework Redeploy/Preview Content\""; 314 | DEVELOPMENT_TEAM = VR4GB7TBDP; 315 | ENABLE_HARDENED_RUNTIME = YES; 316 | ENABLE_PREVIEWS = YES; 317 | GENERATE_INFOPLIST_FILE = YES; 318 | INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities"; 319 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 320 | LD_RUNPATH_SEARCH_PATHS = ( 321 | "$(inherited)", 322 | "@executable_path/../Frameworks", 323 | ); 324 | MACOSX_DEPLOYMENT_TARGET = 13.0; 325 | MARKETING_VERSION = 1.1.1; 326 | PRODUCT_BUNDLE_IDENTIFIER = "co.uk.mallion.Jamf-Framework-Redeploy"; 327 | PRODUCT_NAME = "$(TARGET_NAME)"; 328 | SWIFT_EMIT_LOC_STRINGS = YES; 329 | SWIFT_VERSION = 5.0; 330 | }; 331 | name = Release; 332 | }; 333 | /* End XCBuildConfiguration section */ 334 | 335 | /* Begin XCConfigurationList section */ 336 | FBFE2EC8296C6A7000351FF3 /* Build configuration list for PBXProject "Jamf Framework Redeploy" */ = { 337 | isa = XCConfigurationList; 338 | buildConfigurations = ( 339 | FBFE2EDA296C6A7100351FF3 /* Debug */, 340 | FBFE2EDB296C6A7100351FF3 /* Release */, 341 | ); 342 | defaultConfigurationIsVisible = 0; 343 | defaultConfigurationName = Release; 344 | }; 345 | FBFE2EDC296C6A7100351FF3 /* Build configuration list for PBXNativeTarget "Jamf Framework Redeploy" */ = { 346 | isa = XCConfigurationList; 347 | buildConfigurations = ( 348 | FBFE2EDD296C6A7100351FF3 /* Debug */, 349 | FBFE2EDE296C6A7100351FF3 /* Release */, 350 | ); 351 | defaultConfigurationIsVisible = 0; 352 | defaultConfigurationName = Release; 353 | }; 354 | /* End XCConfigurationList section */ 355 | }; 356 | rootObject = FBFE2EC5296C6A7000351FF3 /* Project object */; 357 | } 358 | --------------------------------------------------------------------------------