Post

Replies

Boosts

Views

Activity

Reply to Background processing options for Mac App Store apps?
An app for the Mac App Store must be a single app package, but that package can contain nested helpers of various kinds including app packages. And an app store app can contain a login item, but I was told that it can't be required. I think that's in the review guidelines somewhere. My app AutoPairs has radio buttons in the user interface, where one can choose to run the program only when the UI app is open, or always when logged it. I don't use XPC (I use distributed notifications and shared user defaults), but I think you can. You'll be signing the whole package, including any helpers, with the same app store signature.
Topic: App & System Services SubTopic: Core OS Tags:
Apr ’24
Reply to Help interpreting crash report, is KVO involved?
@Justin said: Typically we would expect to see objc_msgSend at the top of the stack trace when a crash occurs due to messaging a deallocated object. Since I originally wrote this post, I updated my app to be universal, and I'm still getting these crash reports. Here's the start of the backtrace, now showing objc_msgSend: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x19f716290 lookUpImpOrForward + 72 1 libobjc.A.dylib 0x19f715f64 _objc_msgSend_uncached + 68 2 AppKit 0x1a3453e54 -[NSControl currentEditor] + 56 3 AppKit 0x1a344ba14 -[NSControl _setWindow:] + 48 4 AppKit 0x1a34ee160 -[NSSegmentedControl _setWindow:] + 52 5 AppKit 0x1a3ebbeb4 __21-[NSView _setWindow:]_block_invoke.146 + 268 6 AppKit 0x1a34344a4 -[NSView _setWindow:] + 1780 7 AppKit 0x1a3ebbeb4 __21-[NSView _setWindow:]_block_invoke.146 + 268 8 AppKit 0x1a34344a4 -[NSView _setWindow:] + 1780 9 AppKit 0x1a3618a70 -[NSWindow dealloc] + 684 A full crash report: crashlog2024-04-14 08-21-26.crash
Topic: App & System Services SubTopic: Core OS Tags:
Apr ’24
Reply to Packaging Process
With membership in the Apple developer program, Xcode can create any necessary signing certificates for you. You mentioned the Mac store, but you used the Notarization tag, and you need to understand that those are two separate alternatives. So your first decision is whether you will distribute your software on the Mac App Store or on some other web site. Start here: https://developer.apple.com/macos/distribution/
Topic: Code Signing SubTopic: Notarization Tags:
Apr ’24
Reply to Generic Xcode Archive issue
It looks like you're trying to archive a plug-in, not an app. That's why you can't make an app archive. If you need to notarize it, you won't be able to do it using Xcode, you will need to use a more manual approach. See: https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow?language=objc
Topic: Code Signing SubTopic: Notarization Tags:
Apr ’24
Reply to Button menu like macOS
Those buttons, together with the gray box below, are called a "tab view", implemented by the class NSTabView. You can also do something similar without the box as a "segmented control", class NSSegmentedControl. You can read about the kinds of controls (and what Apple calls them) in the Human Interface Guidelines.
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’24
Reply to Background processing options for Mac App Store apps?
An app for the Mac App Store must be a single app package, but that package can contain nested helpers of various kinds including app packages. And an app store app can contain a login item, but I was told that it can't be required. I think that's in the review guidelines somewhere. My app AutoPairs has radio buttons in the user interface, where one can choose to run the program only when the UI app is open, or always when logged it. I don't use XPC (I use distributed notifications and shared user defaults), but I think you can. You'll be signing the whole package, including any helpers, with the same app store signature.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to Help interpreting crash report, is KVO involved?
@Justin said: Typically we would expect to see objc_msgSend at the top of the stack trace when a crash occurs due to messaging a deallocated object. Since I originally wrote this post, I updated my app to be universal, and I'm still getting these crash reports. Here's the start of the backtrace, now showing objc_msgSend: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x19f716290 lookUpImpOrForward + 72 1 libobjc.A.dylib 0x19f715f64 _objc_msgSend_uncached + 68 2 AppKit 0x1a3453e54 -[NSControl currentEditor] + 56 3 AppKit 0x1a344ba14 -[NSControl _setWindow:] + 48 4 AppKit 0x1a34ee160 -[NSSegmentedControl _setWindow:] + 52 5 AppKit 0x1a3ebbeb4 __21-[NSView _setWindow:]_block_invoke.146 + 268 6 AppKit 0x1a34344a4 -[NSView _setWindow:] + 1780 7 AppKit 0x1a3ebbeb4 __21-[NSView _setWindow:]_block_invoke.146 + 268 8 AppKit 0x1a34344a4 -[NSView _setWindow:] + 1780 9 AppKit 0x1a3618a70 -[NSWindow dealloc] + 684 A full crash report: crashlog2024-04-14 08-21-26.crash
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to Packaging Process
With membership in the Apple developer program, Xcode can create any necessary signing certificates for you. You mentioned the Mac store, but you used the Notarization tag, and you need to understand that those are two separate alternatives. So your first decision is whether you will distribute your software on the Mac App Store or on some other web site. Start here: https://developer.apple.com/macos/distribution/
Topic: Code Signing SubTopic: Notarization Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to NSTimer not firing in modal panel
@eskimo Thanks! What I ended up doing is using a delayed perform (which, I gather, uses another timer behind the scenes) to run the dialog. Then my timer fires both inside and outside the dialog.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to Cocoa [NSView viewDidLoad] debugging
The suggestions by @galad87 are good. I would add that you could set a symbolic breakpoint on -[NSObject doesNotRecognizeSelector:]. I haven't actually tried that, but in theory it should work.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to Access Desktop folder from appstore macOS application (sandboxed)
You can specify the entitlement com.apple.security.files.downloads.read-write for access to Downloads, but there is no similar entitlement for Desktop.
Topic: Code Signing SubTopic: Entitlements Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to Open Recent menu stopped working in my doc-based Mac app
OK, it looks like the problem was that this private tool was not code signed at all. I had no idea that would affect Open Recent.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to Generic Xcode Archive issue
It looks like you're trying to archive a plug-in, not an app. That's why you can't make an app archive. If you need to notarize it, you won't be able to do it using Xcode, you will need to use a more manual approach. See: https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow?language=objc
Topic: Code Signing SubTopic: Notarization Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to Disabling edit on single-click in view-based NSTableView?
I'm still having this problem in an outline table with no action or double action and with an implementation of outlineView:pasteboardWriterForItem:.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to Question about deprecated CGDisplayCreateImage()
There is a ScreenCaptureKit framework, but I wouldn’t exactly say it’s the same functionality, it looks way more complicated.
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Mar ’24
Reply to USB HID Specifics for Mac OS?
When your device is connected, does in show up in the Game Controllers panel of the System Settings app?
Topic: Graphics & Games SubTopic: GameKit Tags:
Replies
Boosts
Views
Activity
Mar ’24
Reply to Button menu like macOS
Those buttons, together with the gray box below, are called a "tab view", implemented by the class NSTabView. You can also do something similar without the box as a "segmented control", class NSSegmentedControl. You can read about the kinds of controls (and what Apple calls them) in the Human Interface Guidelines.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’24
Reply to Mystified by certificate renewal process
I don't have a solution, but I wanted to mention another complication: Another place you can see certificates is in the Keychain Access utility. I deleted an expired certificate there, but it still shows up in Xcode, with a status of "Missing private key". And the "Delete Certificate" contextual menu item is still dimmed.
Replies
Boosts
Views
Activity
Mar ’24
Reply to What's the unit in NSView coordinate system
Have you considered that there may be space between columns? See the intercellSpacing property.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Mar ’24
Reply to What's the unit in NSView coordinate system
You can call the units "points", but they do not necessarily have anything to do with printer's points. To see how they correspond to hardware pixels, you look at the "backing" coordinate system, with methods such as convertPointToBacking:.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Mar ’24