Post

Replies

Boosts

Views

Activity

Reply to Playground can't find symbols in swift private frameworks
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...?
Dec ’20
Reply to Profiling on device won't symbolicate
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?
Dec ’20
Reply to testmanagerd crashing intermittently in CI builds via Jenkins & Fastlane. Why?
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..." ?
Nov ’20
Reply to testmanagerd crashing intermittently in CI builds via Jenkins & Fastlane. Why?
Stacktrace for testmanagerd: Process:&#9;&#9;&#9;&#9;&#9;&#9;&#9; testmanagerd [72950] Path:&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;/Applications/Xcode-12.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/libexec/testmanagerd Identifier:&#9;&#9;&#9;&#9;&#9;&#9;testmanagerd Version:&#9;&#9;&#9;&#9;&#9;&#9;&#9; 17155 Code Type:&#9;&#9;&#9;&#9;&#9;&#9; X86-64 (Native) Parent Process:&#9;&#9;&#9;&#9;launchd_sim [72917] Responsible:&#9;&#9;&#9;&#9;&#9; SimulatorTrampoline [12382] User ID:&#9;&#9;&#9;&#9;&#9;&#9;&#9; 501 Date/Time:&#9;&#9;&#9;&#9;&#9;&#9; 2020-11-16 08:12:07.926 -0800 OS Version:&#9;&#9;&#9;&#9;&#9;&#9;Mac OS X 10.15.7 (19H15) Report Version:&#9;&#9;&#9;&#9;12 Anonymous UUID:&#9;&#9;&#9;&#9;5CA872E8-AE72-5688-477B-B3E543033B38 Time Awake Since Boot: 310000 seconds System Integrity Protection: enabled Crashed Thread:&#9;&#9;&#9;&#9;0&#9;Dispatch queue: com.apple.main-thread Exception Type:&#9;&#9;&#9;&#9;EXC_CRASH (SIGKILL) Exception Codes:&#9;&#9;&#9; 0x0000000000000000, 0x0000000000000000 Exception Note:&#9;&#9;&#9;&#9;EXC_CORPSE_NOTIFY Termination Reason:&#9;&#9;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&#9; libsystem_kernel.dylib&#9;&#9;&#9;&#9; 0x00007fff5dc9fdfa mach_msg_trap + 10 1&#9; libsystem_kernel.dylib&#9;&#9;&#9;&#9; 0x00007fff5dca0170 mach_msg + 60 2&#9; com.apple.CoreFoundation&#9;&#9;&#9; 0x00007fff203a7e77 __CFRunLoopServiceMachPort + 316 3&#9; com.apple.CoreFoundation&#9;&#9;&#9; 0x00007fff203a258d __CFRunLoopRun + 1284 4&#9; com.apple.CoreFoundation&#9;&#9;&#9; 0x00007fff203a1b9e CFRunLoopRunSpecific + 567 5&#9; com.apple.CoreFoundation&#9;&#9;&#9; 0x00007fff203a2cf1 CFRunLoopRun + 40 6&#9; testmanagerd&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; 0x000000010bcd8180 -[XCTDaemon run] + 399 7&#9; testmanagerd&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; 0x000000010bcb14fa main + 318 8&#9; libdyld.dylib&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; 0x00007fff20257415 start + 1 Thread 1: 0&#9; libsystem_pthread.dylib&#9;&#9;&#9; 0x00007fff5dcd7b68 start_wqthread + 0 Thread 2: 0&#9; libsystem_pthread.dylib&#9;&#9;&#9; 0x00007fff5dcd7b68 start_wqthread + 0 Thread 3: 0&#9; libsystem_pthread.dylib&#9;&#9;&#9; 0x00007fff5dcd7b68 start_wqthread + 0 Thread 0 crashed with X86 Thread State (64-bit): &#9;rax: 0x0000000010004005&#9;rbx: 0x0000000007000806&#9;rcx: 0x00007ffee3f4e638&#9;rdx: 0x0000000000000000 &#9;rdi: 0x00007ffee3f4e820&#9;rsi: 0x0000000007000806&#9;rbp: 0x00007ffee3f4e690&#9;rsp: 0x00007ffee3f4e638 &#9; r8: 0x0000000000001d03&#9; r9: 0x00000000ffffffff&#9;r10: 0x0000000000000c00&#9;r11: 0x0000000000000206 &#9;r12: 0x0000000007000806&#9;r13: 0x0000000000000c00&#9;r14: 0x00007ffee3f4e820&#9;r15: 0x0000000000000000 &#9;rip: 0x00007fff5dc9fdfa&#9;rfl: 0x0000000000000206&#9;cr2: 0x00007fff207357fa &#9; Logical CPU:&#9;&#9; 0 Error Code:&#9;&#9;&#9;0x0100001f Trap Number:&#9;&#9; 133 Binary Images: &#9;&#9;&#9; 0x10bcaf000 -&#9;&#9;&#9;&#9;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 &#9;&#9;&#9; 0x10bd8c000 -&#9;&#9;&#9;&#9;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 &#9;&#9;&#9; 0x10be36000 -&#9;&#9;&#9;&#9;0x10be5ffff&#9;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
Nov ’20
Reply to testmanagerd crashing intermittently in CI builds via Jenkins & Fastlane. Why?
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&#9;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&#9;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&#9;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...
Nov ’20
Reply to Xcode 12 issues running multiple test suites with 'Underlying Error: Invalid device state' [only when running via SSH]
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.)))
Nov ’20
Reply to Why is Xcode 12.0.1 only available via Mac App Store?
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?
Sep ’20
Reply to What's the best way to know when a user is editing a SecureField in SwiftUI?
workingdogintokyo - https://developer.apple.com/forums/profile/workingdogintokyo wrote: > You could try something like this: > &#9;&#9;&#9;&#9;&#9;&#9;@State var theText = "" &#9;&#9;&#9;&#9;&#9;&#9;@State var isInSecureField = false &#9;&#9;&#9;&#9;&#9;&#9;SecureField("enter your password", text: Binding<String>( &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;get: { self.theText }, &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;set: { self.theText = $0 &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;print("editing a SecureField") self.isInSecureField = true&#9;&#9; &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; } &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9; )) 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.
Sep ’20
Reply to What's the best way to know when a user is editing a SecureField in SwiftUI?
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 &#9;&#9;if isEditing { // set border thicker } &#9;&#9;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?
Sep ’20