Is this still broken?
Post
Replies
Boosts
Views
Activity
Having this problem in Xcode 12 using a playground that used to work in Xcode 11 and 10. Trying to import a class in a framework from the same workspace. Playground compiles fine but then we get "error: Couldn't lookup symbols". Why can't Apple make Playgrounds "just work"? How about giving us a way to explicitly link certain frameworks to the playground so it never has this problem...?
Having the same problem. Unless we embed packages directly to the framework that has the code which is being previewed, then previews can't find the package dependencies. Super annoying!
Is your DerivedData folder in a location not being indexed by Spotlight? Why would Spotlight have anything to do with whether Instruments can find symbols?
macOS allows the user to omit whatever directories they want from Spotlight. Since Spotlight is such a performance hit and serves no useful purpose, I disable it for everything except /Applications.
Why would that prevent Instruments from finding something? Can't it just use unix find command?
Any luck on this? Having the same issue on 12.2
Any updates on this? Having the same issue on Xcode 12.2 release...
Could this be related to the following known issue (from Xcode 12.2 patch notes)?
Simulators may not be available when running command-line tools like simctl or xcodebuild from a non-root LaunchDaemon, or when launching as a different user from the current user (for example, with sudo or launchctl). (62188195) If so, what's the fix?
Also what does it mean, "Simulators **may** not be available..." ?
Stacktrace for testmanagerd:
Process:							 testmanagerd [72950]
Path:									/Applications/Xcode-12.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/libexec/testmanagerd
Identifier:						testmanagerd
Version:							 17155
Code Type:						 X86-64 (Native)
Parent Process:				launchd_sim [72917]
Responsible:					 SimulatorTrampoline [12382]
User ID:							 501
Date/Time:						 2020-11-16 08:12:07.926 -0800
OS Version:						Mac OS X 10.15.7 (19H15)
Report Version:				12
Anonymous UUID:				5CA872E8-AE72-5688-477B-B3E543033B38
Time Awake Since Boot: 310000 seconds
System Integrity Protection: enabled
Crashed Thread:				0	Dispatch queue: com.apple.main-thread
Exception Type:				EXC_CRASH (SIGKILL)
Exception Codes:			 0x0000000000000000, 0x0000000000000000
Exception Note:				EXC_CORPSE_NOTIFY
Termination Reason:		Namespace LIBXPC, Code 0x4
Application Specific Information:
CoreSimulator 732.17 - Device: Clone 3 of iPhone 7 (229EEFDE-E207-4409-AAC8-B00A256DC6D1) - Runtime: iOS 14.0 (18A372) - DeviceType: iPhone 7
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0	 libsystem_kernel.dylib				 0x00007fff5dc9fdfa mach_msg_trap + 10
1	 libsystem_kernel.dylib				 0x00007fff5dca0170 mach_msg + 60
2	 com.apple.CoreFoundation			 0x00007fff203a7e77 __CFRunLoopServiceMachPort + 316
3	 com.apple.CoreFoundation			 0x00007fff203a258d __CFRunLoopRun + 1284
4	 com.apple.CoreFoundation			 0x00007fff203a1b9e CFRunLoopRunSpecific + 567
5	 com.apple.CoreFoundation			 0x00007fff203a2cf1 CFRunLoopRun + 40
6	 testmanagerd									 0x000000010bcd8180 -[XCTDaemon run] + 399
7	 testmanagerd									 0x000000010bcb14fa main + 318
8	 libdyld.dylib								 0x00007fff20257415 start + 1
Thread 1:
0	 libsystem_pthread.dylib			 0x00007fff5dcd7b68 start_wqthread + 0
Thread 2:
0	 libsystem_pthread.dylib			 0x00007fff5dcd7b68 start_wqthread + 0
Thread 3:
0	 libsystem_pthread.dylib			 0x00007fff5dcd7b68 start_wqthread + 0
Thread 0 crashed with X86 Thread State (64-bit):
	rax: 0x0000000010004005	rbx: 0x0000000007000806	rcx: 0x00007ffee3f4e638	rdx: 0x0000000000000000
	rdi: 0x00007ffee3f4e820	rsi: 0x0000000007000806	rbp: 0x00007ffee3f4e690	rsp: 0x00007ffee3f4e638
	 r8: 0x0000000000001d03	 r9: 0x00000000ffffffff	r10: 0x0000000000000c00	r11: 0x0000000000000206
	r12: 0x0000000007000806	r13: 0x0000000000000c00	r14: 0x00007ffee3f4e820	r15: 0x0000000000000000
	rip: 0x00007fff5dc9fdfa	rfl: 0x0000000000000206	cr2: 0x00007fff207357fa
	
Logical CPU:		 0
Error Code:			0x0100001f
Trap Number:		 133
Binary Images:
			 0x10bcaf000 -				0x10bd00fff +testmanagerd (17155) <BA16B26A-A16E-3820-B32B-D08FCA3B4579> /Applications/Xcode-12.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/libexec/testmanagerd
			 0x10bd8c000 -				0x10bde450f +dyld_sim (828.4) <C06A3B9E-9C65-32D9-9362-2107F24CA75E> /Applications/Xcode-12.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/dyld_sim
			 0x10be36000 -				0x10be5ffff	com.apple.dt.instruments.DTXConnectionServices (12.0 - 64540.117.1) <4D6EBEA5-8FDB-3273-A04D-DD85DD4E2D64> /Applications/Xcode-12.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTXConnectionServices.framework/DTXConnectionServices
It seems that one of the simulator clones keeps crashing and relaunching possibly (this is from the same log as the first log above, but happens just before it. (I have removed the timestamps and inserted some separators to make it easier to read, and put this at the bottom of this post since it's the longest one):
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
xcodebuild	IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/tmp/build/jenkins-mobile-ios-develop-1107/ios/fastlane/output/derivedData/Logs/Test/Test-iPhoneSnapshotTests-2020.11.16_08-04-51--0800.xcresult/Staging/1_Test/Diagnostics/DETCADERSnapshotTests-BA58BA45-D47B-418B-8E61-80EBA8B3FAAF/DETCADERSnapshotTests-A6366A3A-D533-4145-A1A2-C487CD9787E8/Session-DETCADERSnapshotTests-2020-11-16_081142-AyG7h3.log
xcodebuild IDETestOperationsObserverDebug: (02A95C0D-288A-4F0B-BE2B-BB376A8C5A16) Beginning test session DETCADERSnapshotTests-02A95C0D-288A-4F0B-BE2B-BB376A8C5A16 at 2020-11-16 08:11:42.263 with Xcode 12A7209 on target <DVTiPhoneSimulator: 0x7fd44999f1e0> {
SimDevice: Clone 2 of iPhone 7 (8FEB1993-97B1-470B-9511-C5B4693A2634, iOS 14.0, Booted)
}
xcodebuild IDETestOperationsObserverDebug: (02A95C0D-288A-4F0B-BE2B-BB376A8C5A16) Finished requesting crash reports. Continuing with testing.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
xcodebuild	IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/tmp/build/jenkins-mobile-ios-develop-1107/ios/fastlane/output/derivedData/Logs/Test/Test-iPhoneSnapshotTests-2020.11.16_08-04-51--0800.xcresult/Staging/1_Test/Diagnostics/DETCADERSnapshotTests-BA58BA45-D47B-418B-8E61-80EBA8B3FAAF/DETCADERSnapshotTests-DF0A8969-D65B-4379-8DD4-1C445437C40C/Session-DETCADERSnapshotTests-2020-11-16_081142-ojHiX7.log
xcodebuild IDETestOperationsObserverDebug: (B3B8C894-1650-4C81-955D-EB3A844A1796) Beginning test session DETCADERSnapshotTests-B3B8C894-1650-4C81-955D-EB3A844A1796 at 2020-11-16 08:11:42.522 with Xcode 12A7209 on target <DVTiPhoneSimulator: 0x7fd44999f1e0> {
SimDevice: Clone 2 of iPhone 7 (8FEB1993-97B1-470B-9511-C5B4693A2634, iOS 14.0, Booted)
}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
xcodebuild	IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/tmp/build/jenkins-mobile-ios-develop-1107/ios/fastlane/output/derivedData/Logs/Test/Test-iPhoneSnapshotTests-2020.11.16_08-04-51--0800.xcresult/Staging/1_Test/Diagnostics/DETCADERSnapshotTests-BA58BA45-D47B-418B-8E61-80EBA8B3FAAF/DETCADERSnapshotTests-30F99A37-EB4E-4E36-9581-0EB2288A3664/Session-DETCADERSnapshotTests-2020-11-16_081142-RaEqDv.log
xcodebuild IDETestOperationsObserverDebug: (60E66AC3-343C-44E6-A0F1-CF1C4404CE76) Beginning test session DETCADERSnapshotTests-60E66AC3-343C-44E6-A0F1-CF1C4404CE76 at 2020-11-16 08:11:42.526 with Xcode 12A7209 on target <DVTiPhoneSimulator: 0x7fd44999f1e0> {
SimDevice: Clone 2 of iPhone 7 (8FEB1993-97B1-470B-9511-C5B4693A2634, iOS 14.0, Booted)
}
xcodebuild IDETestOperationsObserverDebug: (B3B8C894-1650-4C81-955D-EB3A844A1796) Finished requesting crash reports. Continuing with testing.
xcodebuild IDETestOperationsObserverDebug: (60E66AC3-343C-44E6-A0F1-CF1C4404CE76) Finished requesting crash reports. Continuing with testing.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
... repeats 4 more times...
Still a problem we're having. What's the fix?
For us it's:
[2020-11-16T16:12:10.276Z] REDACTED.app encountered an error (Failed to install or launch the test runner. If you believe this error represents a bug, please attach the result bundle at /REDACTED.xcresult. (Underlying Error: The request to open "com.REDACTED.REDACTEDapp" failed. The request was denied by service delegate (SBMainWorkspace) for reason: Busy ("Application cannot be launched because it has outstanding termination assertions"). (Underlying Error: The operation couldn’t be completed. Application cannot be launched because it has outstanding termination assertions.)))
Looks like Apple posted 12.0.1 to the "More" downloads page today. I guess there's just a delay (of about 5 days) between when Mac App Store gets updated, and when the "More" downloads page gets updated.
KMT - https://developer.apple.com/forums/profile/KMT wrote:
If you mean why 12.0.1 hasn't surfaced on 'more' downloads Yes that's exactly what I mean.
At my org we use fastlane and xcversion to ensure our developers are using the same version of Xcode and iOS Simulator as our CI pipeline. Our Jenkinsfile specifies the Xcode and simulator version, then when our CI machines and our developers use fastlane to build the app, the fastlane plugin xcversion makes sure that the correct xcode is installed (or the build fails). We also use this to manage our remote dependency build cache (for Carthage & SPM dependencies).
So if some of our developers want to use 12.0.1, and specify it in the Jenkinsfile, then the build will fail because 12.0.1 is not available on "more" downloads (since that is where fastlane downloads new Xcodes).
either they haven't yet located the appropriate roundtoit, or they don't bother cluttering that archive with dot dot releases... I vote for dot dot reluctance. Well, the "more" downloads page has every other dot-dot release in history available, like 11.4.1, 11.3.1, etc. all the way back to 2.4.1—and the presence of these is certainly not "clutter".
Seems the only bugfix in 12.0.1 was something about the documentation window crashing Xcode, which I never experienced with the 12.0 version that I downloaded from the "more" downloads page. Could it be that this bug was somehow specific to just the App Store version of Xcode?
workingdogintokyo - https://developer.apple.com/forums/profile/workingdogintokyo wrote:
> You could try something like this:
>
						@State var theText = ""
						@State var isInSecureField = false
						SecureField("enter your password", text: Binding<String>(
								get: { self.theText },
								set: { self.theText = $0
										print("editing a SecureField")
self.isInSecureField = true		
									 }
								 ))
That won't work. That would only tell us when someone has actually changed the value of the field.
We want to know when someone started editing the field—i.e. when the blinking insertion point is visible—regardless of whether or not they've made any changes yet.
The only solution I've been able to come up with so far is to record the CGRect of the view using GeometryReader then compare that rect against rect of the object of these notifications:
private var editingPublisher: AnyPublisher<Bool, Never> {
Publishers.Merge(
NotificationCenter.default
.publisher(for: UITextField.textDidBeginEditingNotification)
.map { notification in
guard
let textField = notification.object as? UITextField,
let originA = environmentObj.rectMap[id]?.origin,
let originB = textField.globalFrame?.origin,
originA.y == originB.y
else { return nil }
self.environmentObj.activeFrame = textField.globalFrame=
return true
},
NotificationCenter.default
.publisher(for: UITextField.textDidEndEditingNotification)
.map { notification in
guard
let textField = notification.object as? UITextField,
let originA = environmentObj.rectMap[id]?.origin,
let originB = textField.globalFrame?.origin,
originA.y == originB.y
else { return nil }
self.environmentObj.activeFrame = nil
return false
}
)
.compactMap { $0 }
.eraseToAnyPublisher()
Then add this modifier to the view:
.onReceive(editingPublisher) { isEditing in
		if isEditing { // set border thicker }
		else { // set border skinny }
}
However this solution is inelegant, inefficient, and it depends on a platform-specific API (UIKit) which means it won't work in a native macOS app without resorting to duplicating this logic separately for the Mac.
So that's why I'm here asking what is the correct way to do this? Surely there's a better way, right? What is it?
Just want to make something clear: I am not trying to know when the field is focused, just when it's being edited (the insertion point is blinking). Let me know if that's feasible.