Objective-C

RSS for tag

Objective-C is a programming language for writing iOS, iPad OS, and macOS apps.

Posts under Objective-C tag

265 results found
Sort by:
Post not yet marked as solved
31 Views

Is there a way to increase FPS for already existed video?

I want to make slow motion video more smoother, so as I understand I need to increase FPS for it. As I know we can use ffmpeg library for it, but is there a native way to increase FPS for video?
Asked
by Anton.Ye.
Last updated
.
Post not yet marked as solved
194 Views

cannot find type in scope xcode 13

I had many swift compiler errors of this type : "Cannot find type 'className' in scope" after passing from Xcode 12.5 to Xcode 13. And the error is always referred to Objective-C classes. The project is for an iOS 11 app for iPad. The bridging-header is correctly set and the project with the same build-settings has never given this error before Xcode 13. I'll try to clean the derived data folder without success. the strange thing is project compile successfully and I can run on simulator as well but after few second from a successful compilation on any swift files that use objective-c class is fired the swift compiler error. Any idea? thanks
Asked
by mrcdev.
Last updated
.
Post not yet marked as solved
288 Views

Unable to get USB bsdname from macOS Monterey 12 Bate4 of Intel processor

I can’t get USB bsdname from macOS Monterey 12 Bate4 of Intel processor: I have use the "IORegistryEntrySearchCFProperty" function to get the bsdName of the io_service_t, It worked fine on macOS Big Sur's M1 and Intel MBP. Also it worked fine on macOS Monterey App M1. But it always returned nil on macOS Monterey Intel MBP. It involves the following code: void getBsdName(io_service_t usbDevice) { CFStringRef bsdName = NULL;         for(int i = 0; i < 500; i++)         {             bsdName = (CFStringRef)IORegistryEntrySearchCFProperty(usbDevice,                                                                    kIOServicePlane,                                                                    CFSTR( kIOBSDNameKey ),                                                                    kCFAllocatorDefault,                                                                    kIORegistryIterateRecursively );             if(!bsdName) {                 // If don't get a bsd name, keep waiting in 5s.                 usleep(10000);                 continue;             }                          printf("[%s]: Found bsd name for device %d.\n”, __func__, usbDevice);             break;         } } Why it happened? Or is there another way to get it?
Asked Last updated
.
Post not yet marked as solved
43 Views

Stuck allowing app users to upload images, videos, or files to a private or public feed

I’m trying to develop a new creative app where app users can upload files, videos, or images. I'm stuck trying to code in swift allowing my app users to upload a video and can be shows in feeds to everyone and visible on their profile in the app. Examples YouTube: allows any user create a channel and upload videos and earn subscribers and receive comments and likes Facebook: allows users to accept friend request and post photos with text to their profile and shows on feeds to everyone, just their friends, or certain people. My Request What I’m asking is how can I code in something like this into my app? Im really passionate about learning how to code and want to learn and grow as a developer, so any and all help is appreciated. Please note I’m a slow learner so please provide examples if possible, Thx!
Asked Last updated
.
Post not yet marked as solved
45 Views

IntentHandler Not Being Called

I want to use Siri to perform a repetitive task in my app that inputs variable parameters, thus accelerating the input of that data. I have implemented a couple custom intents for background execution with the use of an intentDefinition file and implemented an IntentsExtension and associated plist to enable those custom intents. I can successfully donate an interaction that iOS matches with the supported suggestions in the intentsDefinition file that causes a Siri Suggestion to be displayed in Siri Search (or on the lock screen when enabled): CreatePartsListIntent* createPartsListIntent = [[CreatePartsListIntent alloc] init];     createPartsListIntent.projectName = intentData.projectName;     createPartsListIntent.quantity = intentData.quantity; INInteraction* interaction = [[INInteraction alloc] initWithIntent:createPartsListIntent response:nil];     [interaction donateInteractionWithCompletion:^(NSError * _Nullable error) {         if(!error) {             NSLog(@"CreatePartsList donation success");         }else {             NSLog(@"CreatePartsList donation fail %@",error.localizedDescription);         }     }]; I can then tap on this suggestion and it takes me to my appDelegate to process the interaction within the app - (id)application:(UIApplication *)application handlerForIntent:(INIntent *)intent { // This method is called when I tap on the Siri suggestion } But I want to process the interaction in the background using voice commands. When I speak the the command of the interaction I donated, the IntentHandler is never called. I cannot figure out what I need to do to get the IntentHandler to be called. According to the WWDC18 Intro to Siri Shortcuts, I should be able to invoke a dialog with Siri, which is my goal. Am I off track. Why isn't the IntentHandler being called? What should trigger it to be called?
Asked
by jeffb6688.
Last updated
.
Post not yet marked as solved
74 Views

donateInteractionWithCompletion crashes with 'NSUnknownKeyException'

I am attempting to donate an Interaction for a custom intent to create a Siri Shortcut. This is resulting in an execution error as follows: . . . *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<__NSCFString 0x2837703c0> valueForUndefinedKey:]: this class is not key value coding-compliant for the key pronunciationHint.' terminating with uncaught exception of type NSException This error occurs with the invocation of the following code block: `CreatePartsListIntent* createPartsListIntent = [[CreatePartsListIntent alloc] init];          createPartsListIntent.nameOfProject = intentData.nameOfProject;     createPartsListIntent.quantity = intentData.quantity;     INInteraction* interaction = [[INInteraction alloc] initWithIntent:createPartsListIntent response:nil];     [interaction donateInteractionWithCompletion:^(NSError * _Nullable error) {         if(!error) {             NSLog(@"CreatePartsList donation success");         }else {             NSLog(@"CreatePartsList donation fail %@",error.localizedDescription);         }     }];` I did a search for pronunciationHint. I found this in my intents.intentsDefinition file. It is a hidden parameter, but can be found when you open the file as propertyList. It is at the end of the file under INTypes. Below is a screenshot of the INTypes content found at the end of the intents.intentsDefinition file. If I delete Item 2 and Item 3 and delete the DerivedData, I still get the same NSException error, so I don't know where it is finding pronunciationHint and why it even cares that it is there. I am not even sure why the pronunciationHint parameter is being created. An excerpt of my intentDefinition file is shown below where it is showing the parameter TYPE that I created called Project. The auto creation of pronunciationHint is apparently related to the creation of this Project TYPE: Any ideas on how I can get by this error?
Asked
by jeffb6688.
Last updated
.
Post not yet marked as solved
77 Views

New Objective-C project: what can't I do?

My next UIKit project will be in Objective-C. You can argue about why and such, but please know that there are idealist reasons for it. Having said that, what are the main things that aren't supported anymore in Objective-C (= only in Swift)? I don't mean language features, but mainly functional stuff like controls or services (eg. in-app purchases).
Asked Last updated
.
Post marked as solved
46 Views

We are getting a grey line in UITableViewCell only in iPhone 12 devices.

I am getting a grey line in UITableViewCell. I debugged with all possible ways, but I couldn’t figure out the root cause. In addition, this issue occurs only in iPhone 12 devices. The Red coloured highlighted lines shown not be there as checked in iPhone 11 max pro, iPhone 8+, iPhone 6 Plus,Iphone X
Asked Last updated
.
Post not yet marked as solved
42 Views

The line separator is missing in the Alert controller. I am encountering this issue only in the iPhone 12 series devices, in the other versions it works fine.

The line separator is missing in the alert controller. I am encountering this issue only in the iPhone 12 series devices, in the other versions it works fine. The line separator should appear as its appearing in iPhone 11 max pro, iPhone 8 Plus, iPhone 7 Plus, iPhone 6 Plus
Asked Last updated
.
Post not yet marked as solved
47 Views

UIKeyboard Space bar issue in Objecive C iOS

I couldn’t able to enter space character in UITextview or UITextfield while tapping space from UIKeyboard. After multiple taps, a single space character will appear in UITextview. Do you have any solution for this issue?
Asked Last updated
.
Post not yet marked as solved
509 Views

Issue with HTML select element in iOS 15 beta 8

On iOS 15 beta, when I tried to check my application, the select element is having issue. As when I clicked on select dropdown, the option list was not shown. The error message was "Failed to present a context menu for configuration with identifier".
Asked Last updated
.
Post not yet marked as solved
110 Views

My app for iOS crashes on Apple Silicone Mac

I'm developing an iOS app. While executing on iPhone or iPad, there is no problem. But, when I run it on Mac from Xcode, the app crashes. Debugger shows the crashes occur when they execute code regarding vector graphics like [UIBezierPath bezierPath] or [UIImage systemImageWIthNamed:] where image made of vector. Are there anyone experienced such a phenomenon like me?
Asked
by ttakeo.
Last updated
.
Post not yet marked as solved
334 Views

iOS UIAlertController Line separator missing in iPhone 12, iOS 15

The line separator is missing in the alert controller. I am encountering this issue only in the iPhone 12 series devices running iOS 15, in the other versions it works fine. Please share your inputs. Screen capture from iPhone 12 (Line separator is absent) Screen capture from iPhone 11 Here, I have annotated the line separator with a red color box. UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"My title"        message:@"My subtitle"        preferredStyle:UIAlertControllerStyleAlert];                UIAlertAction* defaultAction = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault        handler:^(UIAlertAction * action) {}];                [alert addAction:defaultAction];        [m_window.rootViewController presentViewController:alert animated:YES completion:nil];
Asked Last updated
.