What version of macOS are you using and what version of Xcode are you trying to install ?From the error message it seems like the version of Xcode (may be an older Xcode) you are trying to install is trying to write something on to the system volume. In macOS Catalina, system volume is read only.Refer: Installer fails on installing into /Application... |Apple ...When you try to install it from the Mac App Store at the bottom under Information section there is a subheading called Compatibility which will state if that version of Xcode will work on the current mac.
Post
Replies
Boosts
Views
Activity
Binding has an initializer which accepts getter and setter closures.We can use the getter and setter to access and update the model.let button = SaleButton(isOn: Binding(get: {car.isReadyForSale}, set: { car.isReadyForSale = $0 }))Refer: https://developer.apple.com/documentation/swiftui/binding/3363053-init
Wow !!! Thanks a ton !!! Amazing explanation.I was breaking my head over it for 2 days, and had almost given up .... thank you so much !!Doubts:1. While compiling dumpasn1.c I encountered a compilation error in the 14th line shown below:if( i >= 4 && \
item->header[ 0 ] == 0x30 || item->header[ 0 ] == 0x31 )Error:dumpasn1.c:3020:14: note: place parentheses around the '&&' expression to silence this warning
if( i >= 4 && \
^
(I wasn't sure what the logic needed to be, but I changed it as follows:if( i >= 4 && \
(item->header[ 0 ] == 0x30 || item->header[ 0 ] == 0x31) )Is this correct or should the parantheses be else where ?2. You had mentioned the following:Thex963Representation for the public key is 04 || X || Y || K.
Just wondering if the above corresponded to the private key instead of the public key ? (Since public key was mentioned 3 times and private key was mentioned once)
Thank you so much for such a detailed explanation.I managed to generate JWT and it works with Apple's Web Service, however the JWT that I generated was different from the one that was generated by another library.My JWT: AAA.BBB.CCCOther JWT: AAA.BBB.DDDThe JSON header and payload were the same and both JWT works but they are both different.AAA is the headerBBB is the payloadCCC and DDD are the signatures.I get the feeling I am signing differently from the library. Just wondering if there are multiple P256 versions or some attributes of the signing that are different.Is this possible or am I missing something ?
That explains it, thank you so much, I have learned so much !!
Thanks a lot Quinn, I have raised a DTS incident for the same.
Quinn, Thanks a ton!!! was breaking my head over this.I have a few doubts:1. Even when kSecUseDataProtectionKeychain is removed command line tool throws the same missing entitlement error: let query = [kSecClass: kSecClassKey,
kSecAttrApplicationLabel: label,
kSecValueRef: secKey] as [String: Any]2. Based on the https://forums.developer.apple.com/message/408009#408009 are we are creating a mac cocoa app / target, striping out the cocoa bits of the mac app, then using the command line executable that is built part of the mac app ?3. Are we doing the above to enable us to use the provisioning profile ?4. Based on the link, where is the launchd property list file (quoted below from the link)?Now modify your launchd property list file so that the Program property (or the first item of the ProgramArguments array) points to the executable within Contents/MacOS/.
Thanks a lot !!!Very well documented, thank you so much, works really well.I just wanted to validate my approach:Archive and Exported a copy:I have exported a copy of the archived app (archive, then chose copy app)Execute from command line:Then I run from the command line as follows:./Example4.app/Contents/MacOS/Example4Question:So if I wanted both a macOS app with some UI and Command line interface would I have to the following?- Create another target in the same project and add the common source files to both the targets ? (both targets would be macOS app targets, but one is a stripped down version as in the documentation link, the other would be a normal app target with the app delegate, and other UI elements).- Different schemes would point to different targets, so could export them when needed.
Wow this sounds like a pretty cool idea !!I don't know much about deamons, I should probably read about them and come back.Learnt so much, thanks a ton !!
Xcode Version 11.3.1 (11C504)Problem:Tap on Add server to team, but after the bot runs (integrates), Edit Bot > Signing shows the error Your server has been removed from this team and needs to be added againI am no expert, but based on my experience you can ignore this error. If there is any other error in the integration then look into that instead.Do 2 things to ensure that the Xcode Server Certificate is created and used by the Xcode Server- Check if the Xcode Server is certificate is created in developer.apple.com > Account > Certificates.- Switch to the Xcode Server user on the mac and check the Keychain to check if the Xcode Server certificate is present
Thanks a lot Quinn, sorry for the delayed response.I really like your solution of determining what code to run based on the first command line argument. Really neat !!I read a little about user agents (background process) and now I understand your posts better, as you had pointed out in my case we don't need a launchd property list because it is not going to be a deamon / user agent.Thanks a lot, your solution was so helpful and I learned a lot !!
Update:
This is a old post, now you can use Keypath in Operations in willChangeValue and didChangeValue and works exactly like String
My bad, newer simulators now have a rectangular bar on top of them, this had nothing to do with execution of the command with the terminal. The bar existed even before I executed the command.
I wanted to do this because I wanted to publish errors one after the other.
Given below is my solution:
Code:
Model
import Foundation
class Model : ObservableObject {
@Published var error : Error?
private lazy var timer : Timer = Timer.scheduledTimer(withTimeInterval: 3, repeats: true) { timer in
self.error = self.makeNextError()
}
init() {
self.error = Error.networkConnectionUnavailable
timer.fire()
}
private func makeNextError() -> Error {
let nextError : Error
switch error {
case .networkConnectionUnavailable:
nextError = .bluetoothUnavailable
case .bluetoothUnavailable:
nextError = .cameraUnavailable
case .cameraUnavailable,
.none:
nextError = .networkConnectionUnavailable
}
return nextError
}
}
extension Model {
enum Error :String, Swift.Error, CustomStringConvertible {
case networkConnectionUnavailable = "Network connection unavailable"
case bluetoothUnavailable = "Bluetooth Unavailable"
case cameraUnavailable = "Camera Unavailable"
var description : String { rawValue }
var localizedDescription : String { rawValue }
}
}
ErrorViewModel
import Foundation
import Combine
class ErrorViewModel : ObservableObject {
		
		struct ErrorWrapper : Identifiable {
				
				private static var sequenceID = 0
				
				let id			: Int
				let error	 : Model.Error
				
				init(error: Model.Error) {
						
						Self.sequenceID += 1
						id = Self.sequenceID
						
						self.error = error
				}
		}
		
		var errorWrappers = [ErrorWrapper]()
		@Published var firstErrorWrapper : ErrorWrapper?
		
		var canceller : AnyCancellable?
		
		init(errorPublisher: Published<Model.Error?>.Publisher) {
		
				canceller = errorPublisher.sink { [self] in
						
						guard let error = $0 else {
								return
						}
						
						let isEmpty = self.errorWrappers.isEmpty
						
						let errorWrapper = ErrorWrapper(error: error)
						
						errorWrappers.append(errorWrapper)
						
						if isEmpty {
								firstErrorWrapper = errorWrapper
						}
						
						print("appended error \(errorWrapper.id)")
				}
		}
		
		func consumeError() {
				
				DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [self] in
						errorWrappers.removeFirst()
						firstErrorWrapper = errorWrappers.first
				}
		}
}
Here is the view code, I couldn't post it in the same post, as it exceeded text limit:
ContentView
import SwiftUI
import Combine
struct ContentView: View {
		
		@StateObject var viewModel : ErrorViewModel
		
		init(model: Model) {
				_viewModel = .init(wrappedValue: ErrorViewModel(errorPublisher: model.$error))
		}
				
		var body: some View {
				Text("Hello world!")
						.alert(item: $viewModel.firstErrorWrapper, content: makeAlert(errorWrapper:))
		}
		private func makeAlert(errorWrapper: ErrorViewModel.ErrorWrapper) -> Alert {
				
				let cancelButton = Alert.Button.cancel {
						viewModel.consumeError()
				}
				
				let id = errorWrapper.id
				let description = errorWrapper.error.localizedDescription
				let text = "\(id) - \(description)"
				
				let alert = Alert(title: Text("Error"),
													message: Text(text),
													dismissButton: cancelButton)
				return alert
		}
}