Post

Replies

Boosts

Views

Activity

Xcode crashes when distributing product for App Store Connect
After building the Product Archive, the Organizer window opens, I click Distribute App. Next. Next. Next. Next. Crash. The crash happens before I'm able to export anything, so I cannot even use the Application Loader. The last message above the indeterminate progress indicator I can read before it crashes is "Packaging MyApp ...". It would be really nice if an Apple engineer could help sort this out, because I already contacted the App Store Connect support and they told me that the only way I can get help is by writing on this forum, searching the Xcode documentation, or using one of the 2 free TSIs I get each year (which I have already used). Stacktrace (I tried to paste the whole crash report, but I get an error that the message is too long and that I should click on the icon to attach a file instead, but I don't see such an icon): Process:&#9;&#9;&#9;&#9;&#9;&#9;&#9; Xcode [834] Path:&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;/Applications/Xcode.app/Contents/MacOS/Xcode Identifier:&#9;&#9;&#9;&#9;&#9;&#9;com.apple.dt.Xcode Version:&#9;&#9;&#9;&#9;&#9;&#9;&#9; 12.2 (17535) Build Info:&#9;&#9;&#9;&#9;&#9;&#9;IDEFrameworks-17535000000000000~23 (12B45b) App Item ID:&#9;&#9;&#9;&#9;&#9; 497799835 App External ID:&#9;&#9;&#9; 838360538 Code Type:&#9;&#9;&#9;&#9;&#9;&#9; X86-64 (Native) Parent Process:&#9;&#9;&#9;&#9;??? [1] Responsible:&#9;&#9;&#9;&#9;&#9; Xcode [834] User ID:&#9;&#9;&#9;&#9;&#9;&#9;&#9; 501 Date/Time:&#9;&#9;&#9;&#9;&#9;&#9; 2020-12-07 17:22:11.231 +0100 OS Version:&#9;&#9;&#9;&#9;&#9;&#9;macOS 11.0.1 (20B29) Report Version:&#9;&#9;&#9;&#9;12 Bridge OS Version:&#9;&#9; 3.0 (14Y908) Anonymous UUID:&#9;&#9;&#9;&#9;7A3F67B1-D68A-4230-40B2-B7EE13B51792 Sleep/Wake UUID:&#9;&#9;&#9; 4913FE52-7DB5-45E0-9396-EFBA2ADD0B5C Time Awake Since Boot: 47000 seconds Time Since Wake:&#9;&#9;&#9; 5900 seconds System Integrity Protection: enabled Crashed Thread:&#9;&#9;&#9;&#9;17&#9;Dispatch queue: ConcurrentQueue: -[IDEDistributionPackagingStepViewController viewDidInstall]_block_invoke Exception Type:&#9;&#9;&#9;&#9;EXC_CRASH (SIGABRT) Exception Codes:&#9;&#9;&#9; 0x0000000000000000, 0x0000000000000000 Exception Note:&#9;&#9;&#9;&#9;EXC_CORPSE_NOTIFY Application Specific Information: Possibly stale failure hints from 2020-12-07 16:21:03 +0000: &#9;0: Calling block provided by: &#9;0&#9; DVTDispatchAsync (in DVTFoundation) &#9;1&#9; __56-[IDEArchiveProductSource updateArchivesWithCompletion:]_block_invoke_2 (in IDEProducts) &#9;2&#9; DVT_CALLING_CLIENT_BLOCK (in DVTFoundation) &#9;3&#9; __DVTDispatchAsync_block_invoke (in DVTFoundation) &#9;4&#9; _dispatch_call_block_and_release (in libdispatch.dylib) &#9;5&#9; _dispatch_client_callout (in libdispatch.dylib) &#9;6&#9; _dispatch_continuation_pop (in libdispatch.dylib) &#9;7&#9; _dispatch_async_redirect_invoke (in libdispatch.dylib) &#9;8&#9; _dispatch_root_queue_drain (in libdispatch.dylib) &#9;9&#9; _dispatch_worker_thread2 (in libdispatch.dylib) 10&#9; _pthread_wqthread (in libsystem_pthread.dylib) 11&#9; start_wqthread (in libsystem_pthread.dylib) ProductBuildVersion: 12B45b ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-17518/DVTFoundation/FilePaths/DVTFilePath.m:912 Details:&#9;url should be an instance inheriting from NSURL, but it is nil Object:&#9; <DVTFilePath> Method:&#9; +filePathForFileURL: Thread:&#9; <NSThread: 0x7fa6c43458e0>{number = 4468, name = (null)} Open FDs: 115/7168 Hints:&#9; &#9;0: Calling block provided by: &#9;0&#9; DVTDispatchAsync (in DVTFoundation) &#9;1&#9; DVTAsyncPerformBlock (in DVTFoundation) &#9;2&#9; -[IDEDistributionPackagingStepViewController viewDidInstall] (in IDEKit) &#9;3&#9; -[DVTViewController _viewDidInstall] (in DVTViewControllerKit) &#9;4&#9; -[_DVTViewController_ViewLifecycleInterpositions viewDidMoveToWindow] (in DVTViewControllerKit) &#9;5&#9; -[NSView _setWindow:] (in AppKit) &#9;6&#9; -[NSView addSubview:] (in AppKit) &#9;7&#9; -[NSView setSubviews:] (in AppKit) &#9;8&#9; -[DVTBorderedView setContentView:] (in DVTUserInterfaceKit) &#9;9&#9; -[IDEDistributionAssistantWindowController setDistributionStepViewController:] (in IDEKit) 10&#9; -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] (in Foundation) 11&#9; -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] (in Foundation) 12&#9; _NSSetObjectValueAndNotify (in Foundation) 13&#9; -[IDEDistributionAssistantWindowController next:] (in IDEKit) 14&#9; __79-[IDEDistributionAutomaticSigningAssetsStepViewController _locateSigningAssets]_block_invoke_2 (in IDEKit) 15&#9; DVT_CALLING_CLIENT_BLOCK (in DVTFoundation) 16&#9; ___DVTAsyncPerformBlockOnMainRunLoop_block_invoke (in DVTFoundation) 17&#9; CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK (in CoreFoundation) 18&#9; __CFRunLoopDoBlocks (in CoreFoundation) 19&#9; __CFRunLoopRun (in CoreFoundation) 20&#9; CFRunLoopRunSpecific (in CoreFoundation) 21&#9; RunCurrentEventLoopInMode (in HIToolbox) 22&#9; ReceiveNextEventCommon (in HIToolbox) 23&#9; _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox) 24&#9; _DPSNextEvent (in AppKit) 25&#9; -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit) 26&#9; -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit) 27&#9; -[NSApplication run] (in AppKit) 28&#9; NSApplicationMain (in AppKit) 29&#9; start (in libdyld.dylib) Backtrace: &#9;0&#9; -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit) &#9;1&#9; _DVTAssertionHandler (in DVTFoundation) &#9;2&#9; _DVTAssertionFailureHandler (in DVTFoundation) &#9;3&#9; +[DVTFilePath filePathForFileURL:] (in DVTFoundation) &#9;4&#9; -[IDEDistributionSymbolsStep runWithError:] (in IDEFoundation) &#9;5&#9; -[IDEDistributionProcessingPipeline process:] (in IDEFoundation) &#9;6&#9; -[IDEDistributionPackagingStepViewController _runPipeline] (in IDEKit) &#9;7&#9; __60-[IDEDistributionPackagingStepViewController viewDidInstall]_block_invoke_2 (in IDEKit) &#9;8&#9; DVT_CALLING_CLIENT_BLOCK (in DVTFoundation) &#9;9&#9; __DVTDispatchAsync_block_invoke (in DVTFoundation) 10&#9; _dispatch_call_block_and_release (in libdispatch.dylib) 11&#9; _dispatch_client_callout (in libdispatch.dylib) 12&#9; _dispatch_continuation_pop (in libdispatch.dylib) 13&#9; _dispatch_async_redirect_invoke (in libdispatch.dylib) 14&#9; _dispatch_root_queue_drain (in libdispatch.dylib) 15&#9; _dispatch_worker_thread2 (in libdispatch.dylib) 16&#9; _pthread_wqthread (in libsystem_pthread.dylib) 17&#9; start_wqthread (in libsystem_pthread.dylib) abort() called Application Specific Signatures: (url) != nil ...
10
0
3.4k
Apr ’21
Creating file bookmarks doesn't work anymore on macOS 15 Sequoia
Before updating to macOS 15 Sequoia, I used to be able to create file bookmarks with this code: let openPanel = NSOpenPanel() openPanel.runModal() let url = openPanel.urls[0] do { let _ = try url.bookmarkData(options: [.withSecurityScope]) } catch { print(error) } Now I get an error Error Domain=NSCocoaErrorDomain Code=256 "Failed to retrieve app-scope key" These are the entitlements: com.apple.security.app-sandbox com.apple.security.files.user-selected.read-write com.apple.security.files.bookmarks.app-scope Strangely, my own apps continued working, after updating to macOS 15 some days ago, until a few moments ago. Then it seems that all of a sudden my existing bookmarks couldn't be resolved anymore, and no new bookmarks could be created. What could be the problem?
28
3
3.4k
Feb ’25
How to install macOS 14 Sonoma or 13 Ventura on an external partition
I would like to install macOS 14 Sonoma on an external partition, but I couldn't find an installer on the developer website. It seems that it's only possible to upgrade from the System Settings, so I thought I would install Ventura first on the separate partition and then upgrade to Sonoma. I downloaded the Ventura installer from the App Store and selected the external partition during the installation, but when the Mac reboots, it just reboots into my main macOS partition. If I shut down and hold the power button pressed to select the boot partition (I have a M1 MacBook Pro 14" 2022), then nothing happens: an indeterminate progress indicator spins for a couple seconds, the partition list remains there and I can only successfully boot into my main partition again. I also tried running the installer from another macOS Ventura and macOS Monterey partition I had installed last year, but when I select the partition on which to install the new Ventura, nothing happens and I can only quit the installer. Is there a way to debug all these issues? How can I install macOS Sonoma on a separate partition without overwriting my main macOS Ventura install?
4
2
4.0k
Jun ’23
Getting clicked item index in NSPathControl with pathItems instead of pathComponentCells
Since NSPathControl.setPathComponentCells(_:) and .clickedPathComponentCell() are deprecated, I'm trying to use pathItems and clickedPathItem instead. Since I'm representing a virtual path, I cannot use the NSPathControl.url setter, but instead set pathItems directly. The problem is that in the action method it doesn't seem possible to get the index of the clicked path item, nor does it seem possible to associate any kind of data with each path item, since when the action method is called, the actual object instances stored in pathItems and also the one returned by clickedPathItem change every time. Here is the sample code that reproduces the issue: class ViewController: NSViewController {     @IBOutlet weak var pathControl: NSPathControl!          override func viewDidLoad() {         super.viewDidLoad()         pathControl.pathItems = ["a", "b", "c"].map({ title in             let item = NSPathControlItem()             item.title = title             return item         })     }     @IBAction func selectPath(_ sender: NSPathControl) {         print(sender.clickedPathItem!.description, sender.clickedPathItem!.title, sender.pathItems.description)     }      } Here is a sample output (notice how the printed addresses change every time): <NSPathControlItem: 0x6000012780a0> a [<NSPathControlItem: 0x6000012780a0>, <NSPathControlItem: 0x600001278020>, <NSPathControlItem: 0x600001278090>] <NSPathControlItem: 0x600001278070> a [<NSPathControlItem: 0x600001278070>, <NSPathControlItem: 0x600001278140>, <NSPathControlItem: 0x6000012780d0>] <NSPathControlItem: 0x60000124c030> a [<NSPathControlItem: 0x60000124c030>, <NSPathControlItem: 0x60000124c080>, <NSPathControlItem: 0x60000124c070>]
Topic: UI Frameworks SubTopic: AppKit Tags:
7
0
838
Feb ’23
Xcode shows that variable is nil but it isn't
When evaluating some variables holding an optional value in the debugger with e variable, Xcode prints something like (Bool?) $R3 = nil. This gives the impression that the value is nil (what else should it mean?) and hovering that variable in the code editor also shows a popover with the content nil, but evaluating e variable?.description shows that it holds some value, for example (String?) $R4 = "false" (as a validation, the command e variable == false prints (Bool) $R6 = true. I submitted a bug report on November 2019, more than 2 years ago, and it never got any response. Is it possible that this is the expected behavior? Why can nobody fix it? I'm constantly wasting time because of this bug that causes me to make wrong assumptions during debugging.
0
1
834
Jan ’22
NSOutlineView with usesAutomaticRowHeights and group row causes log "WARNING: Application performed a reentrant operation in its NSTableView delegate."
What does this warning mean? In my main app, whenever this warning is logged, the outline view begins to behave weirdly after that, overlapping rows and not responding to clicks anymore. When not using automatic row heights or group rows, the warning doesn't appear anymore. A sample project can be found here. An interesting thing is that even if there are no group rows, simply implementing the data source method func outlineView(_ outlineView: NSOutlineView, isGroupItem item: Any) -> Bool {     return false } makes the warning appear.
Topic: UI Frameworks SubTopic: AppKit Tags:
0
2
1k
Jan ’23
Sharing files from Finder to Simulator doesn't work
I'm trying to copy some files from the Finder on macOS 14 to several Simulator instances running iOS 16 and 17. When I right-click the file in the Finder, I can select Share > Simulator, then a share dialog pops up where I select the relevant Simulator and click on Send. According to this official help topic, the Files app should open allowing me to choose the destination, but instead nothing happens and the shared file is nothing to be seen. What's the issue?
2
2
594
Jun ’25
How to debug Quick Look Preview Extension
When I launch the Quick Look Preview Extension target in Xcode, an app called Quick Look Simulator opens with an almost empty window: Online I read that the Terminal command qlmanage allows to test Quick Look plugins (which I think were an older format for creating Quick Look extensions), but running qlmanage -p /path/to/previewed/file -c public.text -g /path/to/QuickLookPreviewExtension.appex (where QuickLookPreviewExtension.appex is generated by the Xcode build and is located in the DerivedData folder) gives an error Can't get generator at QuickLookPreviewExtension.appex How can I debug a Quick Look Preview Extension?
3
2
945
May ’25
UITextView with custom NSUndoManager breaks auto-enabling of software keyboard undo button
I have a custom UITextView where entering text causes the undo button in the software keyboard to be enabled. When I override the undo manager like this: class TextView: UITextView { let _undoManager = UndoManager() override var undoManager: UndoManager? { return _undoManager } } the auto-enabling of the undo button doesn't work anymore. What is the correct way of providing my own undo manager?
Topic: UI Frameworks SubTopic: UIKit Tags:
1
1
767
Sep ’22
Warning when archiving product in Xcode with AppIntent extension
When building my app for debugging in Xcode I don't get any warning, only when archiving the product: MyIntent.appex is an ExtensionKit extension and must be embedded in the parent app bundle's Extensions directory, but is embedded in the parent app bundle's ../../../BuildProductsPath/Release/MyApp.app/Contents/Extensions directory. The MyIntent.appex is listed in the main target's Frameworks, Libraries and Embedded Content section and its Build Phase Embed ExtensionKit Extensions with Destination ExtensionKit Extensions. The extension also seems to work, since the app intent is correctly listed in the Shortcuts app. Is this an Xcode bug or do I need to do something different?
2
2
1.2k
Feb ’24
Text background color for newlines in TextKit 2
When using NSTextLayoutManager.addRenderingAttribute(.backgroundColor, value: NSColor.red, for: range), the background color for a line is only drawn as far as the last visible character. There is also a thin space between the lines where the background color is not visible. Whe using NSLayoutManager.addTemporaryAttribute(.backgroundColor, value: NSColor.red, forCharacterRange: range), the background color is drawn also for newline characters and soft line wraps. I would like to achieve the effect of using NSLayoutManager.addTemporaryAttribute(.backgroundColor, value: NSColor.red, forCharacterRange: range), but since I'm targeting TextKit 2, I have to avoid using NSLayoutManager. Is there a way to achieve this with NSTextLayoutManager or one of the other related classes in TextKit 2?
0
1
570
Sep ’23