Questions tagged [cocoa]
Cocoa is Apple's application-development framework for macOS, consisting of Foundation, Application Kit, and Core Data. Use the "cocoa-touch" tag for iOS questions.
cocoa
39,622
questions
2
votes
1
answer
53
views
CGImage.crop(to:) returns a weird crop on MacOS
I was facing a weird behavior while using the method CGImage.crop(to:).
My goal is cropping a user face using the apple vision-framework to train AI-based models on it, but while running the vision on ...
0
votes
0
answers
19
views
My macOS app+helper is not in the "System Preferences/Login Item/Allow Background" list
I created a macOS app that can run in foreground (NSApplicationActivationPolicyRegular) and in background (NSApplicationActivationPolicyAccessory) and can be launched by an Helper (Login Item) and run ...
0
votes
1
answer
27
views
Override NSManagedObject getter/setter to modify data
I have an NSManagedObject class that stores, among other things, a JSON string that comes from a WkWebView form. The form in the web view allows the user to add images to the form; when the form is ...
3
votes
2
answers
447
views
Error after adding google_mobile_ads sdk in swift using CocoaPods
I added the google_mobile_ads sdk v11.6.0 in my swift project. Now when I run the project I get the following error
ld: warning: Could not find or use auto-linked library 'swiftXPC': library 'swiftXPC'...
0
votes
0
answers
26
views
Using NavigationStack with PopOver
I have created a status bar item that shows a popover view when it is clicked
import SwiftUI
@main
class AppDelegate: NSObject, NSApplicationDelegate {
var popover: NSPopover!
let ...
0
votes
1
answer
70
views
Turning an array of RGB pixel data into CGImage in Swift
I'm really really really close here but I just don't know enough with why this is going wrong. It looks like either NSData or CGDataProvider or CGImage is skipping through every 8th row and then ...
0
votes
0
answers
26
views
How can I improve NSView rendering performance?
On OS X/Cocoa I have an NSView into which I am drawing an image (when prompted in the drawRect: method). The image is a video camera image that I update around 80 times/second. As measured using ...
0
votes
0
answers
15
views
Crash in AVPlayerView.setPlaybackControlsViewController
A user of my app, which shows subtitles loaded from a text file on top of a video loaded from another file, reported that it crashes within minutes of launching it. The user confirmed that the crash ...
0
votes
2
answers
78
views
Implementation key press in Swift
I'm writing an application that will use your's phone as touchpad and simulate different touchpad's gestures by Swift code on Mac. But when I've tried to implement swiping between workspaces (same as ...
0
votes
0
answers
26
views
How to properly replace NSTextView's string when used with bindings
I have issues with string replacement when there are newlines.
How to properly replace string or part of a string so that bindings are triggered.
I have used open func replaceCharacters(in range: ...
0
votes
1
answer
21
views
NSTableView Loses Focus After Calling editColumn [duplicate]
I have an NSTableView where the user clicks a button to add a new row. This goes to an IBAction that inserts an object in the NSArrayController and then uses editColumn:row:withEvent:select: to put ...
1
vote
1
answer
78
views
Add NSView to custom parameter in FxPlug - Swift
I'm developing a plugin for Final Cut Pro, and need help on the UI part. FCPX plugins are swift application bundled in a FxPlug wrapper. The UI is made of parameter views packed together, custom ...
1
vote
0
answers
73
views
uncaughtExceptionHandler failed to catch exceptions in objective-c on Mac OS
Hi and I'm working on handling exceptions in an app.
My exception handler code is as below.
In AppDelegate.h
@interface AppDelegate : NSObject <NSApplicationDelegate>
static void ...
0
votes
0
answers
49
views
Why are NSView frames ignored when set just before an animation block?
I have the following unclear behaviour in MacOS:
When setting multiple NSView frames, and animating them as a next step, the animation block ignores the last set frames.
The host view is a ...
0
votes
0
answers
21
views
NSPageController to navigate in vertical direction
I am working MacOS application which has a menu on the left and panels on the right switches back and forth as we select a menu.
I would like to achieve the panel switching logic with NSPageController....