Post

Replies

Boosts

Views

Activity

Reply to Run IBTool from within Sandboxed App
@ekismo Would you please provide me some more information on how to solve the issue? I am building this in SwiftUI, I let the user select the Xcode.app file this way: 	switch result { 		case.success(let urls): 			guard 		let url = urls.first 		else { 			return 		} 		let bookmarkData = 			try url.bookmarkData(options: .withSecurityScope, includingResourceValuesForKeys: nil, relativeTo: nil) 		var isState = false 		let newURL = 			try URL(resolvingBookmarkData: bookmarkData, options: .withSecurityScope, relativeTo: nil, bookmarkDataIsStale: & isState) 		_ = newURL.startAccessingSecurityScopedResource() 		getDeviceList( in: newURL) 		case.failure(let error): 			print("There was a problem selecting the file - \(error)") 	} } catch { 	print("Unable to read file contents") 	print(error.localizedDescription) } And in getDeviceList I am running this task: 	let task = Process() 	task.launchPath = xcodeURL.path 	task.arguments = [ 		"xcrun simctl list devices" 	] 	 	let pipe = Pipe() 	task.standardOutput = pipe 	 	task.launch() 	 	let data = pipe.fileHandleForReading.readDataToEndOfFile() 	if let string = String(data: data, encoding: String.Encoding.utf8) { 		print(string) 	} } But as I keep getting the error: caught non-fatal NSInternalInconsistencyException 'Couldn't posix_spawn: error 13' Where am i going wrong?
Dec ’20