291,920 questions
-1
votes
0
answers
71
views
Configuring a NSTextView so it behaves as a NSTextField (same background and focus ring)? [duplicate]
Has someone managed to configure a NSTextView in AppKit in Objective-C so it behave as a NSTextField (same background and focus ring)?
I understand NSTextField cannot manage multiline text editing as ...
1
vote
1
answer
75
views
Swift/objc interoperability and modern swift concurrency
How to resolve error:
Non-Sendable parameter type BookInfo of actor-isolated @objc instance method cannot cross actor boundary?
BookStore.swift:
// manage state of instances of BookInfo
@objc actor ...
3
votes
1
answer
78
views
How to draw tinted monochrome SF Symbol with AppKit
This is super easy with UIKit (imageWithTintColor:) but I need tinted monochrome NSImage in AppKit and no such equivalent exists. I know there is private method in AppKit -[NSImage ...
-2
votes
1
answer
84
views
iOS 26 CLHeading's magneticHeading and trueHeading return travel direction instead of device orientation when user is in motion [closed]
I am using CLLocationManager to obtain the device's compass heading (direction), and I have encountered an abnormal behavior:
When the user is stationary: After calling startUpdatingHeading(), the ...
0
votes
0
answers
41
views
Making xFrameworkVersionNumber in Objective-C umbrella header `const` because of concurrency-safe in Swift
Follow up for this question VersionNumber and VersionString in umbrella header is what is the repercussion of changing this line from the autogenerated umbrella header file xFramework.h:
//! Project ...
0
votes
0
answers
33
views
Cordova bridge not firing after biometric passcode fallback on iOS (device ready / document.ready not triggered)
We are facing an issue in our iOS Cordova hybrid app (WKWebView) during biometric → passcode fallback authentication.
Environment:
Cordova iOS 7.x (WKWebView)
Native plugin handles Face ID / Touch ID ...
1
vote
0
answers
33
views
MKReverseGeocodingRequest fails with NSURLErrorDomain Code=-1009 (WatchOS 26)
We try to replace the depreated reverseGeocodeLocation call by MKReverseGeocodingRequest for WatchOS 26. However, the call always returns error -1009 indicating that there is no connection to the ...
0
votes
0
answers
35
views
Benefits of putting outlets and function headers in the header-file [duplicate]
I'm currently try to learn the basics of Objective-C.
Watching old videos I see people placing outlets and especially function-headers in the header-file.
What is the benefit of having a function-...
0
votes
0
answers
53
views
How to display SVG using QuickLookUI inside app?
I have old code that is capable of displaying every image but not the SVG. SVG can be displayed with QuickLook using Finder. However, I cannot replicate this in app. Quick note: NSImageView can ...
0
votes
0
answers
23
views
What does it take to have system default menus show up when programmatically constructing an application in AppKit for macOS Tahoe? [duplicate]
I create an app in Xcode in macOS Tahoe using Storyboards for macOS not modifying anything, and I run it, and I click on the Window menu. This is what I see:
But now... in the default storyboard it ...
0
votes
1
answer
121
views
How to remove parameter name from left when developing using FxPlug SDK?
I am developing an Apple Motion effect's plugin using the FxPlug v4.3 SDK. Everything compiles and works great, however, there's one unpleasant problem. When I apply a filter, in the Motion inspector ...
4
votes
2
answers
155
views
Strange NSScrollPocket height on my NSTableView in fullscreen mode on macOS Tahoe 26
Since I updated on macOS Tahoe 26, in fullscreen only, my NSTableView in Objective-C has the first two rows hidden by a blurred rectangle which appears at the level of my NSScrollView with an ...
0
votes
0
answers
186
views
XCode 26.0.1, macOS 15.7, Objective-C/Cocoa UI Bindings issue
The console is filled with:
ViewBridge to RemoteViewService Terminated: Error Domain=com.apple.ViewBridge Code=18 "(null)" UserInfo={com.apple.ViewBridge.error.hint=this process disconnected ...
1
vote
1
answer
88
views
Swift 6 Strict Concurrency accessing C shared instance
I am trying to adapt C code, measuring pre/after main time, so it could be accessed from Swift with SC on. But nothing can silent compiler warning, indicating this code is not safe. I've tried every ...
0
votes
0
answers
60
views
SQLite3 Exec Failing with Assertion in checkWalModeFromQuery on Xcode 26
I'm encountering a runtime assertion failure when trying to execute a SQLite query using sqlite3_exec in Xcode 26. The error occurs specifically when attempting to set WAL (Write-Ahead Logging) mode ...
-1
votes
1
answer
126
views
What is wrong with the following Objective-C/Cocoa book example?
I am learning Objective-C + Cocoa. According to a very outdated book (there are no newer ones like this one), I need to do the following:
Create the application.
Create a new Cocoa application named ...
2
votes
0
answers
89
views
How to get call statistics for a pjsip call in iOS
I am working on an iOS project that uses the PJSIP library for video and audio calls.
I have an Objective-C wrapper that accesses the PJSIP C functions directly.
Now, I want to get statistics for each ...
2
votes
0
answers
76
views
How can I fetch the tinted folder icon in macOS Tahoe using Cocoa?
In Tahoe, folder icons are color-tinted with a gradient. A small part of the folder remains uncolored, and it’s also possible to overlay a mask icon or even an emoji on top of the folder.
How can I ...
3
votes
1
answer
2k
views
Can you change the way iOS 26 renders buttons on UINavigationBar?
Since updating my Xcode and building my app for iOS 26, the buttons on the UINavigationBar look terrible, in my opinion, with large rounded rectangles around them. Can anything be done to revert these ...
0
votes
0
answers
36
views
How to detect Bluetooth device name/alias changes on macOS using IOBluetooth
I am developing a macOS app using IOBluetooth.framework.
I simply want to keep a list of paired devices with up-to-date names.
I want to detect when a user renames a paired Bluetooth device (the alias)...
0
votes
0
answers
74
views
NSURLAuthenticationMethodClientCertificate not getting fired in URLSession:didReceiveChallenge: for TLS 1.3 but works fine with TLS 1.2
I am trying to authenticate the communication using certificates over TLS 1.3 in Cocoa application, but URLSession:didReceiveChallenge:ComplitionHandler didn't get called for ...
-1
votes
2
answers
580
views
Under iOS 26 system, screenshots within the code cannot capture the content of the WKWebView [closed]
This is the screenshot of the code. The view content includes UIView and WKWebView. The part of UIView is normal, but the part of WKWebView shows a blank screen. This was not a problem before iOS 26, ...
4
votes
1
answer
70
views
How to get PID from AudioObjectID on macOS pre Sonoma
I am working on an application to get when audio device is being used.
This app runs on macOS.
For Mac versions starting from Sonoma I can use this code:
int getAudioProcessPID(AudioObjectID process)
...
1
vote
1
answer
211
views
UIBarButtonSystemItemDone shows blue checkmark and doesn't respect apperance's `tintColor` under iOS26
Creating a simple UIBarButtonItem on iOS26:
UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone
...
1
vote
1
answer
93
views
How to draw line number with NSRulerView?
How to draw line number with NSRulerView?
Displaying line numbers with NSTextView, written with Objective-C, clean and simple. Sorry, I know this is an old question frequently asked, but I can't find ...
1
vote
0
answers
50
views
Unexpected crash on Tauri related to objective c and c++ bridge
Basically, I am puzzled by this crash I am getting.
For context, I am running a Tauri app for a multi platform desktop app (windows and mac). My windows part works perfectly using winsocks, however I ...
1
vote
1
answer
92
views
Alternative to sizeToFit to space items on toolbar assigned to keyboard inputAccessoryView?
I have created a toolbar and attached it as an inputAccessoryView to the keyboard following Paul Hudson's snippet here.
This is a legacy project with some Objective-C and I have converted Paul's code ...
0
votes
0
answers
143
views
iOS Dylib crashes when published to testflight with CODESIGNING 2 Invalid Page
This is a lengthy one. I have basically compiled a Rust binary into a dylib and packaged into a .xcframework that contains per arch .frameworks. This loads correctly when run from Xcode into a real ...
0
votes
1
answer
45
views
ObjC compiler cannot find method in protocol
I have following ObjC protocol
# import <Foundation/Foundation.h>
@protocol FutureObjC
- (void)setValue: (NSObject *_Nullable)data NS_SWIFT_NAME(setValue(_:));
- (void)setError: (NSError *...
0
votes
0
answers
102
views
NSSavePanel ignores setDirectoryURL: on macOS Sequoia (15), always opens at last-used location
I have code in my macOS app that shows a save dialog using NSSavePanel.
I want the panel to always open in a specific directory that I send as a parameter to my function. (e.g., /User/Desktop).
Here’s ...
1
vote
0
answers
41
views
Why are some SKView SpriteNodes moving jerkily with motionManager
I am working on an Xcode app that uses a Collection View Controller to display images of various animals. When one of the images is touched a GameView (SKView) opens. Each GameView has balls(sprites)...
0
votes
1
answer
116
views
How to let a UIView handle a tap gesture then have the tap gesture passed down to another UIView lying beneath?
The documentation says set:
recognizer.cancelsTouchesInVew = NO;
and add the recognizer to the top view.
I tried and it does not work.
Below is the code pattern I used:
UIView *custom_overlay_1 = [[...
-1
votes
2
answers
291
views
The three dots button won't move inside my navigation item group after resizing in iOS 26
I'm working on an old Objective-C project and I'm trying to adapt iOS 26 and liquid glass to current UI. I'm facing an issue that the three dot buttons won't automatically move inside navigation item ...
1
vote
1
answer
70
views
CAMetalLayer nextDrawable Method is Unbearably Slow in MacOS Metal
The following code renders a scene: (It's called from within an @autorelease nesting)
- (void)setupEncoder:(nonnull MTKView *)view {
id<MTLCommandBuffer> commandBuffer = nil;
id<...
0
votes
0
answers
52
views
How to access classes, methods and send parameters from native iOS to the KMP app?
When I start the iOS app, I want to send parameters from Firebase to my KMP project.
I put annotations in the KMP Kotlin class so that it would be visible, the bridge class that is generated in ...
0
votes
1
answer
94
views
How to disable default resizing behavior for an NSWindow?
I have implemented my resizing behavior for an NSWindow. The problem is I don't know how to disable the default resizing behavior. For example, a resizing cursor would been shown when the cursor was ...
0
votes
2
answers
48
views
Keep size and space between views in UIScrollView when zooming
In the scroll view I have one central view (gray) that should zoom normally and some other views (orange) which should keep their visual size and space to the gray view.
I can keep size by applying ...
-1
votes
1
answer
201
views
Why KVO has no response while the rest of the code seems to work and runs without any error
// Inside root view controller
- (void) play_test_video {
g_video_test = [AVPlayer playerWithURL : file_url];
g_video_controller = [[AVPlayerViewController alloc] init];
...
0
votes
0
answers
50
views
Could not build Objective-C module 'TensorFlowLiteSelectTfOps'
I'm working on an iOS project where I need to use both TensorFlowLiteSwift and TensorFlowLiteSelectTfOps. I installed them via CocoaPods by including the following in my Podfile:
pod '...
0
votes
0
answers
73
views
How to implement reusable MTLBuffer pool in Metal programming?
In my mac application, I have a business requirement: When drawing each frame, hundreds or even thousands of small bitmaps are received from the network transport layer. Then I need to bitblit these ...
0
votes
1
answer
75
views
How to Dynamically Load Images from a Nested Folder in the App Bundle (Swift / iOS) [duplicate]
I hope you're all doing great!
I'm working on an iOS app where I need to load a set of images that I've added manually to the app's resource bundle. The images are stored inside a known top-level ...
0
votes
0
answers
52
views
Calling ARC code from non-ARC code causing EXC_BAD_ACCESS when autorelease pool drains
void test(void) {
@autoreleasepool {
NSDictionary *dict = copyDict();
NSLog(@"%lu", [dict retainCount]);
[dict release];
}
}
int main (int argc, const char * ...
0
votes
0
answers
52
views
How can i enable memoji sticker in system emoji keyboard while keep allowsEditingTextAttributes == NO
I was trying to adapt memoji in my app which write by objective-c. I have a UITextView for user input and I need to keep allowsEditingTextAttributes == NO for some reason. Is there any other way to ...
0
votes
2
answers
60
views
Invisibly block user interaction in macOS app
In my macOS app (objC), the user can trigger tasks that can take some time, like importing files into a database. These tasks do not run on the main thread because they spawn a window (sheet) to show ...
0
votes
1
answer
140
views
How do I monitor the fitting width change of an UIDatePicker on iOS using UIKit?
I'd like to monitor the fitting width of an UIDatePicker set to the mode of .date on iOS. By fitting width, I mean that usually obtained by systemLayoutSizeFittingSize(CGSize(0, 0)) -- but I need to ...
1
vote
0
answers
53
views
Creating RTP-MIDI Sessions via MIDINetworkSession C API (dlopen/dlsym) on macOS 15?
I’m an amateur developer working on a free utility for composers/producers, for which the macOS release needs to create and name RTP-MIDI sessions in Audio MIDI Setup from the command line (so I can ...
1
vote
1
answer
108
views
Failed to preview widget with CHSErrorDomain (1300):NSDebugDescription: extensionNotFound
When I added the widget extension to a multi-target project, the widget preview failed with an error saying Cannot preview in this file.
As we all know, the widget was introduced in iOS 14.0, but my ...
5
votes
1
answer
233
views
Usage of C++ reference to a struct in Swift methods
I've got codebase for iOS target with mixed languages in play: C++, Objective-C++ / Objective-C & now I want to start migration of Objective-C/Objective-C++ code to Swift.
Particular problem I'm ...
1
vote
0
answers
50
views
NEFilterManager saveToPreferences fails with "permission denied" on TestFlight build
I'm working on enabling a content filter in my iOS app using NEFilterManager and NEFilterProviderConfiguration. The setup works perfectly in debug builds when running via Xcode, but fails on ...
1
vote
1
answer
64
views
UIDocumentPickerDelegate method(didPickDocumentsAt) not called on a real device; but it works fine on the simulator
I'm trying to use UIDocumentPickerViewController. It works fine on the simulator and also on a real device in debug mode.
I've tried replacing didPickDocumentAtURL with didPickDocumentsAtURLs but it ...