Hello, When I lunch any Unit Test with Xcode 14 RC and iPhone 13 iOS 16 I get this error, any ideas??
Details
Process spawn via launchd failed.
Domain: NSPOSIXErrorDomain
Code: 22
Failure Reason: Invalid argument
User Info: {
DVTErrorCreationDateKey = "2022-09-08 15:57:43 +0000";
IDERunOperationFailingWorker = IDELaunchiPhoneSimulatorLauncher;
Session = "com.apple.CoreSimulator.SimDevice.ECF8B277-7010-4ABD-8EC7-109E80FD2A42";
}
--
The operation couldn’t be completed. (Mach error 22 - (os/kern) invalid host)
Domain: NSMachErrorDomain
Code: 22
--
Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
"device_model" = "iPhone14,5";
"device_osBuild" = "16.0 (20A360)";
"device_platform" = "com.apple.platform.iphonesimulator";
"launchSession_schemeCommand" = Test;
"launchSession_state" = 1;
"launchSession_targetArch" = arm64;
"operation_duration_ms" = 7;
"operation_errorCode" = 22;
"operation_errorDomain" = NSPOSIXErrorDomain;
"operation_errorWorker" = IDELaunchiPhoneSimulatorLauncher;
"operation_name" = IDERunOperationWorkerGroup;
"param_consoleMode" = 0;
"param_debugger_attachToExtensions" = 0;
"param_debugger_attachToXPC" = 1;
"param_debugger_type" = 3;
"param_destination_isProxy" = 0;
"param_destination_platform" = "com.apple.platform.iphonesimulator";
"param_diag_MainThreadChecker_stopOnIssue" = 0;
"param_diag_MallocStackLogging_enableDuringAttach" = 0;
"param_diag_MallocStackLogging_enableForXPC" = 0;
"param_diag_allowLocationSimulation" = 1;
"param_diag_checker_tpc_enable" = 0;
"param_diag_gpu_frameCapture_enable" = 3;
"param_diag_gpu_shaderValidation_enable" = 0;
"param_diag_gpu_validation_enable" = 1;
"param_diag_memoryGraphOnResourceException" = 0;
"param_diag_queueDebugging_enable" = 1;
"param_diag_runtimeProfile_generate" = 1;
"param_diag_sanitizer_asan_enable" = 0;
"param_diag_sanitizer_tsan_enable" = 0;
"param_diag_sanitizer_tsan_stopOnIssue" = 0;
"param_diag_sanitizer_ubsan_stopOnIssue" = 0;
"param_diag_showNonLocalizedStrings" = 0;
"param_diag_viewDebugging_enabled" = 1;
"param_diag_viewDebugging_insertDylibOnLaunch" = 0;
"param_install_style" = 0;
"param_launcher_UID" = 2;
"param_launcher_allowDeviceSensorReplayData" = 0;
"param_launcher_kind" = 0;
"param_launcher_style" = 0;
"param_launcher_substyle" = 0;
"param_runnable_appExtensionHostRunMode" = 0;
"param_runnable_productType" = "com.apple.product-type.tool";
"param_runnable_type" = 1;
"param_testing_launchedForTesting" = 1;
"param_testing_suppressSimulatorApp" = 0;
"param_testing_usingCLI" = 0;
"sdk_canonicalName" = "iphonesimulator16.0";
"sdk_osVersion" = "16.0";
"sdk_variant" = iphonesimulator;
}
--
System Information
macOS Version 12.5.1 (Build 21G83)
Xcode 14.0 (21335) (Build 14A309)
Timestamp: 2022-09-08T11:57:43-04:00
Post
Replies
Boosts
Views
Activity
Hello,
I'm trying to run Xcode Cloud but it fail building with this error, any ideas how to install java in the Xcode Cloud server?
The operation couldn’t be completed. Unable to locate a Java Runtime.
Command PhaseScriptExecution failed with a nonzero exit code
Command exited with non-zero exit-code: 65
An internal error was detected which caused this stage to error. The error has been logged, and you can re-run this build again.
I have a problem when signing an AttribuedString to a Text(), the text is shown but the image in the middle if the text isn't.
var body: some View {
if #available(iOS 15.0, *) {
Text(messageString)
}
}
@available(iOS 15, *)
private extension BookingPaymentView {
var messageString: AttributedString {
return AttributedString(self.viewModel.text)
}
}
text content is provided from a external SDK and if I print the content I get this:
some text {\n NSColor = \"<UIDynamicCatalogColor: 0x600001facf50; name = Neutral>\";\n NSFont = \"<UICTFont: 0x14b410660> font-family: \\\"PublicSans-Regular\\\"; font-weight: normal; font-style: normal; font-size: 14.00pt\";\n}{\n NSAttachment = \"<NSTextAttachment: 0x6000014b9ea0>\";\n}. Learn more{\n NSColor = \"<UIDynamicCatalogColor: 0x600001facf50; name = Neutral>\";\n NSFont = \"<UICTFont: 0x14b410660> font-family: \\\"PublicSans-Regular\\\"; font-weight: normal; font-style: normal; font-size: 14.00pt\";\n}
In the app, I can see the text "some text . LearnMore" without the image in-betweeng "text" and "."
Hello there,
With iOS 16 and Xcode 14 (all RC), my UnitTest stop working.
I'll appreciate some help!
Citan
The code that get the error:
XCTAssertTrue(UIPasteboard.general.string == someString)
Error: Thread 8: signal SIGABRT
libsystem_kernel.dylib`:
0x106628e58 <+0>: mov x16, #0x148
0x106628e5c <+4>: svc #0x80
-> 0x106628e60 <+8>: b.lo 0x106628e7c ; <+36>
0x106628e64 <+12>: stp x29, x30, [sp, #-0x10]!
0x106628e68 <+16>: mov x29, sp
0x106628e6c <+20>: bl 0x106621b10 ; cerror_nocancel
0x106628e70 <+24>: mov sp, x29
0x106628e74 <+28>: ldp x29, x30, [sp], #0x10
0x106628e78 <+32>: ret
0x106628e7c <+36>: ret
Hello,
I don't know why I'm getting the error "Failed to produce diagnostic for expression", I have use the List before on a similar way and can't find the error.
I'll appreciate some help
Working with Xcode 12.5.1
If I Change the List to this it works:
List(1 ..< 6) { mood in
HStack {
Text("Hola")
.frame(width: 200, height: 50, alignment: .leading)
}
}
MoodScreen.swift
import SwiftUI
struct MoodScreen: View {
@State private var addMoodModal = false
var body: some View {
VStack {
VStack {
MoodView(addMoodModal: $addMoodModal)
.sheet(isPresented: $addMoodModal, content: {
AddNewMoodScreen(addMoodModal: $addMoodModal)
})
MoodListView()
Spacer()
}
}
.navigationTitle("Mood summary")
.embedInNavigationView()
}
}
struct MoodScreen_Previews: PreviewProvider {
static var previews: some View {
MoodScreen()
}
}
MoodListView.swift
import SwiftUI
struct MoodListView: View {
@ObservedObject var moodsScreen = MoodsViewModel()
var body: some View { //Error is shown here
VStack{
List(moodsScreen.moodsVM) {mood in
HStack {
Text("Hola")
.frame(width: 200, height: 50, alignment: .leading)
}
}
}
}
}
MoodViewModel.swift
import SwiftUI
class MoodsViewModel: ObservableObject {
@ObservedObject private var moods = MoodDataBase()
@Published var moodsVM = [MoodViewModel]()
func callMoods() {
DispatchQueue.main.async {
self.moodsVM = self.moods.moodDatabase.map(MoodViewModel.init)
}
}
}
class MoodViewModel {
var mood: MoodModel
init(mood: MoodModel) {
self.mood = mood
}
var moodId: String {
mood.id.uuidString
}
var moodLevel: String {
mood.value.moodLevel
}
var moodDate: String {
"01/01/2021"
}
}
MoodsDataBase.swift
import Foundation
class MoodDataBase: ObservableObject {
@Published var moodDatabase: [MoodModel] = [MoodModel]()
init() { }
static let shared = MoodDataBase()
// Calendar and Date
let userCalendar = Calendar.current
let calendarComponents: Set<Calendar.Component> = [
.year,
.month,
.day,
.hour,
.minute,
.second
]
}
extension MoodDataBase {
func AddMood(newLevel: MoodValue) -> Void {
let newMood: MoodModel = MoodModel(id: UUID(), date: today(), value: newLevel)
DispatchQueue.main.async {
self.moodDatabase.append(newMood)
print("New Mood to add: \(newMood)")
print("Mood Count: \(self.moodDatabase.count)")
}
}
func today() -> DateComponents {
let today = userCalendar.dateComponents(calendarComponents, from: Date())
return today
}
}