Skip to main content

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.

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 ...
Lucas Paim's user avatar
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 ...
Leonardo's user avatar
  • 797
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 ...
Markus's user avatar
  • 2,522
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'...
user9792850's user avatar
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 ...
yNnfgpvVPc's user avatar
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 ...
nilgirian's user avatar
  • 105
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 ...
Jonny Taylor's user avatar
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 ...
Nickkk's user avatar
  • 2,585
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 ...
BrainPumpkin's user avatar
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: ...
Marek H's user avatar
  • 5,446
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 ...
ThinkCL's user avatar
  • 119
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 ...
Marin Nagy's user avatar
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 ...
Glider's user avatar
  • 35
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 ...
NikoDiYana's user avatar
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....
Kyung Lee's user avatar

15 30 50 per page
1
2 3 4 5
2642