Posts

Post not yet marked as solved
2 Replies
201 Views
Hi there, My macOS AppKit/Cocoa app uses Swift and Objective-C, however I'm not using SwiftUI anywhere. Customers launching the app now receive an instant crash due to dyld not being able to locate SwiftUI: Library not loaded: /System/Library/Frameworks/SwiftUI.framework/Versions/A/SwiftUI Again, not using SwiftUI anywhere in my app, cannot find any project references in Xcode that mention SwiftUI - yet checking the generated binary with otool reveals that my app indeed appears to link against SwiftUI. Any idea what happened..? Thanks, Jay
Posted
by JayMcBee.
Last updated
.
Post not yet marked as solved
1 Replies
190 Views
When running my app from Xcode Umlauts are all of a sudden broken in several places. The app has been out in the public w/o similar issues for years. For example, this is the result when entering a filename in my NSDocument-based app: So far I could only observe the bug when launching under Sonoma from Xcode but I'm worried this might be a general issue for users of the app running the release build. Any ideas about what happened in macOS 14.4..? Cheers, Jay
Posted
by JayMcBee.
Last updated
.
Post not yet marked as solved
4 Replies
749 Views
Hi there - Where would a dev go these days to get an initial understanding of SceneKit? The WWDC videos linked in various places seem to be gone?! For example, the SceneKit page at developer.apple.com lists features a session videos link that comes up without any result, https://developer.apple.com/scenekit/ Any advice..? Cheers, Jan
Posted
by JayMcBee.
Last updated
.
Post not yet marked as solved
4 Replies
393 Views
After upgrading to Xcode 15.3 (15E204a) trivial C++ code of mine no longer compiles: const string text = textComponent->GetText(); auto isEmpty = text.empty() || std::all_of(text.begin(), text.end(), std::isspace); now yields compiler error "No matching function for call to 'all_of'" while working as expected on Version 15.2 (15C500b) and older. Is there a regression in the latest Xcode update C++ support..? Thanks, Jay
Posted
by JayMcBee.
Last updated
.
Post not yet marked as solved
1 Replies
535 Views
So in my app users can select a larger block of connected elements with a triple-click, just like selecting a paragraph works in an NSTextView. However, a small subset of these elements also has properties that can be edited and a double-click switches to edit mode for these elements.. This leads to the current, unfortunate behaviour: If a user triple-clicks a non-editable element the entire block of elements is highlighted, no problem. If a user triple-clicks editable elements an edit is triggered and the third click is ignored. What would be the best approach to enable triple-click on editable elements, i.e. something like waiting whether a third mouse click follows and enabling edit mode only then..? Some dispatch after mechanism with a delay of NSEvent.doubleClickInterval maybe? Any suggestions on how to implement this in a robust manner would be much appreciated! Cheers, Jay
Posted
by JayMcBee.
Last updated
.
Post not yet marked as solved
0 Replies
614 Views
I'd like to build an XCFramework and the consuming app in a single workspace to make sure the latest version of the framework is bundled with the app. So both projects - framework and app - are bundled in a common workspace in Xcode; just as we are used to with regular frameworks. In the framework's project I'm creating the XCFramework as per Apple's instruction as a script-only target using xcodebuild -create-xcframework to bundle the individual framework binaries. Now I'd like to include the generated .xcframework in the app project. However, Xcode doesn’t seem to understand that the framework project target creating the XCFramework is actually creating output: I’ve added the XCFramework target as a dependency in the consuming project, it builds when the main project is built, but there’s no output to be selected in the Link with Libraries or Copy Frameworks steps of the app project Directly adding the framework via Finder as a folder from either Debug/Release folder doesn't make sense, which one would you pick? This is a trivial step for regular frameworks but apparently I'm overlooking something when dealing with the .xcframework. How to proceed? Thanks, Jay
Posted
by JayMcBee.
Last updated
.
Post not yet marked as solved
0 Replies
813 Views
My framework project is bundled in the ‘consuming’ project inside 1 workspace in Xcode. Creating the XCFramework as per Apple's instruction as a script-only target using xcodebuild -create-xcframework to bundle the individual framework binaries works just fine; However, Xcode doesn’t seem to understand that the target creating the XCFramework is actually creating output: I’ve added the XCFramework target as a dependency in the consuming project, it builds when the main project is built, but there’s no output that can be selected in the Link with Libraries or Copy Frameworks steps under Build Phases; just the regular frameworks show up, not my newly built XCFramework. Directly adding the framework via Finder as a folder from the built products folder breaks easily.. How can I tell my main project to include the XCFramework that it just build as a dependency? That is, like we do for any other framework in the same workspace. Thanks, Jay
Posted
by JayMcBee.
Last updated
.
Post not yet marked as solved
1 Replies
767 Views
Hi there, So according to Apple's recent Apple announces biggest upgrade to App Store pricing announcement "These newly announced tools, which will begin rolling out today and continue throughout 2023..." (https://developer.apple.com/news/?id=qzex35ch) Yet I don't seem to find a way to set individual, country-specific prices for my products. Anybody having more luck..? Cheers, Jay
Posted
by JayMcBee.
Last updated
.
Post marked as solved
1 Replies
1k Views
A small percentage of my customers is experiencing crashes when invoking the vanilla Page Setup dialog in our document-based macOS AppKit app. So far only AirPrint printers are affected though I cannot replicate the issue locally when printing to an AirPrint target. As soon as the Page Setup dialog is invoked via the usual runPageLayout: method in NSDocument the crash occurs deep inside the system frameworks in the PJCCreateSuggestedPaper() method: Crashed Thread:        0  Dispatch queue: com.apple.main-thread Exception Type:        EXC_BAD_ACCESS (SIGSEGV) Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000 Exception Codes:       0x0000000000000001, 0x0000000000000000 Termination Reason:    Namespace SIGNAL, Code 11 Segmentation fault: 11 Terminating Process:   exc handler [16825] VM Region Info: 0 is not in any region.  Bytes before following region: 4402925568       REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL       UNUSED SPACE AT START --->         __TEXT                      1066f5000-1067ed000    [  992K] r-x/r-x SM=COW  ...M App Thread 0 Crashed::  Dispatch queue: com.apple.main-thread 0   PrintCore                        0x7ff81623d183 PJCCreateSuggestedPaper + 71 1   PrintingUI                           0x12ab25b43 0x12aadb000 + 305987 2   PrintingUI                           0x12ab259ef 0x12aadb000 + 305647 3   PrintingUI                           0x12aaf24c3 0x12aadb000 + 95427 4   PrintingUI                           0x12ab09ab6 0x12aadb000 + 191158 5   PrintingUI                           0x12ab093af 0x12aadb000 + 189359 6   PrintingUI                           0x12ab0fa85 0x12aadb000 + 215685 7   PrintingUI                           0x12ab15c52 0x12aadb000 + 240722 8   AppKit                            0x7ff80bc3b2af -[NSWindowController _windowDidLoad] + 548 9   AppKit                            0x7ff80bc36f78 -[NSWindowController window] + 110 10  AppKit                            0x7ff80c1767d4 -[NSPageLayout beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:] + 217 11  AppKit                            0x7ff80bfda3e7 __82-[NSDocument runModalPageLayoutWithPrintInfo:delegate:didRunSelector:contextInfo:]_block_invoke + 394 12  AppKit                            0x7ff80c06fce2 -[NSDocument(NSDocumentSerializationAPIs) _performActivity:] + 1672 13  AppKit                            0x7ff80c070e37 -[NSDocument(NSDocumentSerializationAPIs) performActivityWithSynchronousWaiting:usingBlock:cancellationHandler:] + 431 14  AppKit                            0x7ff80bfda257 -[NSDocument runModalPageLayoutWithPrintInfo:delegate:didRunSelector:contextInfo:] + 94 For the affected customers the crash is 100% reproducible. As there is no application specific code whatsoever in any of the stack traces and the app is using vanilla NSDocument methods to run the Page Setup dialog this very much looks like a bug in macOS Ventura... Any suggestions or workarounds highly appreciated! Cheers, Jay
Posted
by JayMcBee.
Last updated
.
Post not yet marked as solved
1 Replies
736 Views
The orientation property in NSPrintInfo does not reflect the current user choice (Landscape/Portrait), at least not while the Print Panel is presented. How can we determine the paper orientation? Thanks, Jay
Posted
by JayMcBee.
Last updated
.
Post not yet marked as solved
0 Replies
715 Views
Is there a built-in functionality to retrieve the current column and row during a print operation when using the built-in pagination mechanism of NSView? All I could find in the general printing documentation and for the NSPrintOperation and NSPrintInfo classes is the NSPrintOperation.currentOperation.currentPage property. I'm basically attempting to access the 'address' (page number or row/column) of pages bordering to the left/right/above/below the current page to enable assembly constructions being shown to the user on printouts spanning multiple pages. Hope this makes sense. Thanks, Jay
Posted
by JayMcBee.
Last updated
.
Post not yet marked as solved
7 Replies
1.1k Views
Hi there, the Mac App Store updater crashes my apps as it's updating apps while they're running. Lazy loaded .xib's from the newer version don't match the code of the previous version that's already loaded in memory - so the app crashes. How can this be prevented? Cheers, Jay
Posted
by JayMcBee.
Last updated
.
Post not yet marked as solved
4 Replies
1.9k Views
Hi there,we are getting frequent questions from our user base when they cannot find options in the print dialog of our app because the details in NSPrintPanel are not expanded by default.Is there a way to always expand the details section programmatically to make it easier for our non-technical user base to find the app specific print settings..?Browsing the NSPrintPanel documentation didn't reveal anything obvious..Cheers,Jay
Posted
by JayMcBee.
Last updated
.
Post not yet marked as solved
1 Replies
1.6k Views
I have an iOS project that was created a couple Xcode versions ago bundling some XCFrameworks. As of recently (still with Xcode 13.4.1 (13F100)) the app won't launch anymore on actual devices with the dreaded Unable to install "XYZ" error. I have several other projects using one or other of the XCFrameworks, all using the same team and code signing options, and in any of the other apps still work fine on my test device. I've compared settings between the apps that launch and the one that doesn't but I can't spot any difference that could cause an issue.. Is there any way to track down the specific problem with this app? This is the detailed output when launching on device fails: Unable to install "XYZ" Domain: com.apple.dt.MobileDeviceErrorDomain Code: -402620375 User Info: { DVTErrorCreationDateKey = "2022-06-10 12:22:19 +0000"; IDERunOperationFailingWorker = IDEInstalliPhoneLauncher; } -- The code signature version is no longer supported. Domain: com.apple.dt.MobileDeviceErrorDomain Code: -402620375 User Info: { DVTRadarComponentKey = 261622; MobileDeviceErrorCode = "(0xE8008029)"; "com.apple.dtdevicekit.stacktrace" = ( 0 DTDeviceKitBase 0x000000011e5a1614 DTDKCreateNSErrorFromAMDErrorCode + 272 1 DTDeviceKitBase 0x000000011e5dadd8 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 160 2 DVTFoundation 0x0000000103c39bd0 DVTInvokeWithStrongOwnership + 76 3 DTDeviceKitBase 0x000000011e5dab30 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1336 4 IDEiOSSupportCore 0x000000011e4b9590 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.301 + 2916 5 DVTFoundation 0x0000000103d60f50 __DVT_CALLING_CLIENT_BLOCK__ + 16 6 DVTFoundation 0x0000000103d62068 __DVTDispatchAsync_block_invoke + 364 7 libdispatch.dylib 0x00000001891d65f0 _dispatch_call_block_and_release + 32 8 libdispatch.dylib 0x00000001891d81b4 _dispatch_client_callout + 20 9 libdispatch.dylib 0x00000001891df8a8 _dispatch_lane_serial_drain + 668 10 libdispatch.dylib 0x00000001891e0404 _dispatch_lane_invoke + 392 11 libdispatch.dylib 0x00000001891eac98 _dispatch_workloop_worker_thread + 648 12 libsystem_pthread.dylib 0x0000000189398360 _pthread_wqthread + 288 13 libsystem_pthread.dylib 0x0000000189397080 start_wqthread + 8 ); } Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : { "device_model" = "iPad12,1"; "device_osBuild" = "15.5 (19F77)"; "device_platform" = "com.apple.platform.iphoneos"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 1993; "operation_errorCode" = "-402620375"; "operation_errorDomain" = "com.apple.dt.MobileDeviceErrorDomain"; "operation_errorWorker" = IDEInstalliPhoneLauncher; "operation_name" = IDEiPhoneRunOperationWorkerGroup; "param_consoleMode" = 0; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 5; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.iphoneos"; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 1; "param_diag_gpu_frameCapture_enable" = 0; "param_diag_gpu_shaderValidation_enable" = 0; "param_diag_gpu_validation_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_queueDebugging_enable" = 1; "param_diag_runtimeProfile_generate" = 0; "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" = 1; "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.application"; "param_runnable_swiftVersion" = "5.6.1"; "param_runnable_type" = 2; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "iphoneos15.5"; "sdk_osVersion" = "15.5"; "sdk_variant" = iphoneos; } -- System Information macOS Version 12.4 (Build 21F79) Xcode 13.4.1 (20504) (Build 13F100) And this is the output of codesign on the app: Executable=/Users/***/Library/Developer/Xcode/DerivedData/XYZ-bdjavnfzlagnjzdlfbdbfimpdxdp/Build/Products/Debug-iphoneos/XYZ.app/XYZ Identifier=com.*** Format=app bundle with Mach-O thin (arm64) CodeDirectory v=20400 size=163181 flags=0x0(none) hashes=5088+7 location=embedded Signature size=4787 Signed Time=10. Jun 2022 at 14:17:36 Info.plist entries=36 TeamIdentifier=L***T Sealed Resources version=2 rules=10 files=76 Internal requirements count=1 size=208 The page size indicates the app has DER entitlements (as per https://developer.apple.com/documentation/xcode/using-the-latest-code-signature-format): Page size=4096 -7=a2b7cb9fa9a8e60cacfd73d1830ea5bbab35c8213e0abd86c14233ac1aaf9b90 -6=0000000000000000000000000000000000000000000000000000000000000000 -5=8680ba1b7e8bf98de928906c8d4e1a88e836b7d1aa33a40ee0e079513fc9ee04 -4=0000000000000000000000000000000000000000000000000000000000000000 -3=1a6c79ee253b6b0720c630f094054b9dbf8e4adbcf4d169b3f8b291bb5c377c5 -2=b6a4ad6c366acfe77bc7cb3aeeec40016d45baf36431d07e130d429bebffd891 Any hints appreciated. Cheers, Jay
Posted
by JayMcBee.
Last updated
.
Post not yet marked as solved
1 Replies
1.2k Views
We are using lots of toolbar items with templated NSImage instances in our app. Especially for things like the currently selected tool from a set of tools the extremely low contrast style employed by macOS 11 is a huge usability issue.. Before macOS 11 selected items were rendered in a high-contrast, inverted style. Is there any way to control the style used to render selected toolbar items to restore usability? Cheers, Jay
Posted
by JayMcBee.
Last updated
.