Questions tagged [objective-c]
This tag should be used only on questions that are about Objective-C features or depend on code in the language. The tags [cocoa] and [cocoa-touch] should be used to ask about Apple's frameworks or classes. Use the related tags [ios], [macos], [apple-watch] and [tvos] for issues specific to those platforms.
objective-c
292,219
questions
0
votes
0
answers
7
views
Exclusion of a directory from backup in documents storage class
Team lead wants to exclude some files in documents storage class from backup.
My argument that those probably belong to NSCachesDirectory is in vain.
Moreover setting exclusion attribute like so
+ (...
-1
votes
0
answers
12
views
make a NSWindow of another app show and focused by clicking a foreground app's button in OC
I have an application H.app (the client app), it has two button a and b, By clicking these buttons, IPC send message to the server app(Also H.app), which will show window A or B. Here' s my sample ...
-1
votes
0
answers
18
views
Which way is preferred for a AND/OR logic? [closed]
I'm refactoring an old Objective-C project. There is 1 AND/OR logic condition that we are debating about:
NSString *str1 = [[url1.path lastPathComponent] stringByDeletingPathExtension];
NSString *str2 ...
0
votes
1
answer
33
views
Retrieve an audio file such as an mp3 from the documents directory in Objective-C or Swift
I would like to store and retrieve audio files such as MP3s in the user's documents directory. When I do this with images I can simply fetch the file as a UIImage. However, I'm struggling with what ...
0
votes
1
answer
13
views
Undo manager with multiple fields
Hello I have an application, it's very basic but has some fields for an address, so city, zip code, state etc...
I want it so the user can undo the content across multiple fields, currently the ...
-1
votes
0
answers
16
views
Export to SVG in Objective C? [closed]
I have an application where I can render certain shapes with overlays on a view and I can export those creations to PDF and EPS.
I've been requested to export to SVG.
Is there any library which can ...
0
votes
1
answer
29
views
AutoFill password into UITextField
I want to implement such a function: a password UITextField, using the system Jiugongge numeric keypad(textField.keyboardType = .numberPad), and enable to automatically fill the password. like this:
...
1
vote
1
answer
18
views
CGContextDrawImage: invalid context 0x0. Failed to bind EAGLDrawable to GL_RENDERBUFFER 2
I'm working on a custom UIView subclass in my iOS project that involves using GLKView and CAEAGLLayer for camera rendering and applying beauty filters. The main goal is to capture video from the ...
0
votes
0
answers
15
views
Cocoapod integration Issue in Framework as target
I have created an Application in which we have framework as target. I am using SendbirdChatSDK and Sendbirdcalls Cocoapod as dependency for framework.
While compiling it is showing error in swift ...
-1
votes
0
answers
35
views
Is there a way to force an NSObject to be allocated in stack or static memory?
I am asking this out of curiosity, because even if this can technically be done, this is almost certainly unsupported by Apple.
As far as I can tell, only NSString literals, and possibly NSDictionary ...
0
votes
0
answers
28
views
Can we customize how parameters and return types are imported from Objective-C into Swift?
I have an Objective-C class that is a proxy to an NSDictionary.
@interface DictionaryProxy : NSProxy
-(id)objectForKey:(id)key;
-(void)setObject:(id)obj forKey:(id<NSCopying>)key;
@end
I have ...
-1
votes
0
answers
52
views
SwiftUI Scroller flashing entire collection when inserting new data
I Have a SwiftUI view which is a collection that displays each item on a full screen sized view. While the user is viewing and interacting with the items (it's a view that shows photo or video that ...
1
vote
0
answers
32
views
Unable to mount NFS share using mount(2) on macOS
I've been trying to write an application for older versions of Mac OS X that mounts an NFS network share and ran into an interesting quirk when trying to use the mount(2) function. According to the ...
0
votes
0
answers
44
views
Generating a signature for promotional offers in Objective-c
My requirements are to generate a signature for a promotional offer in the iOS app code (Objective-C), but I'm getting nil every time with the error: 'The operation couldn’t be completed. (OSStatus ...
0
votes
0
answers
37
views
How can I initiate a new URL request using an already loaded WKWebView?
I have opened a WKWebView with "https://www.google.com", for example. After that, I put my app in the background. When I try to open a new URL request in the same web view with a new link, ...