Post

Replies

Boosts

Views

Created

Followed docs for "Local Package", how to add to 2nd project?
I have a couple apps in one git repository. I'd like to have a Swift package in that repo as well, shared by apps. In other words, I don't want a separate repo for the Swift package. I followed the instructions here: https://developer.apple.com/documentation/xcode/organizing-your-code-with-local-packages It seems to work. I can write code like this in my app: import MyLocalPackage func foo() { myLocalPackageFunc() } I notice that the package is not listed under Project > MyApp > Package Dependencies. I don't really care, as long as I can reuse code between apps. But when I try to add this package code to a 2nd app, I'm at a loss. I tried "Add Package Dependencies" and "Add Local", but that creates a different looking setup than the 1st app. The code is browsable in the project navigator. And when I try to build it says "Missing package product 'MyLocalPackage'. The documentation linked above, which I used for the 1st app, does a "New > Package". I don't want a new package. How can I connect the existing one?
0
0
70
May ’25
CustomMetalView sample uses deprecated functions - update?
The sample code here, has code like: // Create a display link capable of being used with all active displays cvReturn = CVDisplayLinkCreateWithActiveCGDisplays(&_displayLink); But that function's doc says it's deprecated and to use NSView/NSWindow/NSScreen displayLink instead. That returns CADisplayLink, not CVDisplayLink. Also the documentation for that displayLink method is completely empty. I'm not sure if I'm supposed to add it to run loop, or what, after I get it. It would be nice to get an updated version of this sample project and/or have some documentation in NSView.displayLink
2
0
362
Jul ’25
Equivalent of coalescedTouchesForTouch in AppKit?
This method on UIEvent gets you more touch positions, and I think it's useful for a drawing app, to respond with greater precision to the position of the Pencil stylus. Is there a similar thing in macOS, for mouse or tablet events? I found this property mouseCoalescingEnabled, but the docs there don't describe how to get the extra events.
Topic: UI Frameworks SubTopic: AppKit Tags:
1
0
178
Aug ’25