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.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

How to reference private instance variable in main.m

I am leaning objective-c, and as shown below in the code, I created an interface with a private instance variable section. In the main.m, a pointer instance variable was created as shown below. what I ...
0
votes
0answers
8 views

What is the purpose of mentioning @interface notation is important in .m file [duplicate]

I am leaning how to build an iOS app in objective-c. i used to split the .h and .m files. However in the pdf I am following the author split dboth of them , but moreover in the .m file he added the ...
0
votes
1answer
26 views

define a delegate that not get dereferenced?

Right now I am implementing FIRMessaging for receiving notifications from Firebase Cloud Messaging. I made a test by creating a new project into firebase console, then registered my bundle ID, I ...
0
votes
0answers
9 views

NSTableView Remembers old Ordering

I have added some Columns in the .xib file. They are standing in the order they should be shown. https://i.imgur.com/DTd1v3F.png But because i have played around with Reordering it remembers that ...
0
votes
1answer
17 views

How to set custom width of tableViewIndex?

I want to change width of tableViewIndex. I didn't find any tableView's method to increase width of tableViewIndex programatically. I have written this method: - (CGFloat)...
0
votes
0answers
14 views

Is there an API that will run on iOS in order to change the Frame Per Second of an existing video?

I am looking for a way to receive as an input any video (that is supported on iOS) and save on the device a new video with a new Frame Per Second rate. The motivation is to decrease the video size, ...
0
votes
0answers
8 views

Clearing NSScrollView and redrawing contents

I have a window with an NSScrollView that gets opened with a click of a button that's populated with a series of checkboxes that are created by parsing a CSV file. The code below is called during ...
2
votes
0answers
29 views

Unable to convert to mp4 in iOS 13

On a device running iOS 13, [exportSession exportAsynchronouslyWithCompletionHandler: always fails with message "The operation could not be completed" while converting .MOV video to mp4. However, the ...
0
votes
0answers
19 views

How to use NSObject in UISearchResultsUpdating in Objective-C

I got 2 arrays, in one of them I use search. 1st array display in cell.textLabel Second display in cell.detailedTextLabel. After search, first array displaying in tableview correctly, second array ...
0
votes
2answers
39 views

Xcode 11: Changes in code not updated to app or breakpoint doesn't work

XCode: 11.1 OS: 10.15 Test device: iPhone 5s, iOS: 12.4.2 Hi guys, I made a stupid mistake to immediately upgrade Xcode and MacOS, without waiting for a later stable version. Anyway, if I made ...
1
vote
0answers
21 views

Image gets uploaded through multipart POST service but I do not receive response from server

I use the following code to upload images to the server: void call_MediaUploadAPI(NSArray *parameters, NSString *url, BOOL isAnUpdate, SuccessBlock successBlock, FailureBlock failureBlock) { ...
-2
votes
1answer
27 views

Create a table on objective-c code without ViewController

I can't create table on objective-c, cause I start learning objective-c. Google can't help me, I tried I hope what u can help me
-1
votes
0answers
43 views

'name' is unavailable: not available on iOS - XCode11

After upgrading from XCode 10.0 to 11 I am getting the error 'name' is unavailable: not available on iOS This is during Build for Swift 4.2 on XCode 11.0 and 11.1 , I can still build using XCode 10 ...
-2
votes
0answers
17 views

EXE_BAD_ACCESS(SIGSEGV), iPhone crashed

Exception Subtype : KERN_INVALID_ADDRESS Termination Signal: Segmentation fault : 11 Termination Reason : Namespace SIGNAL, Code 0xb Termination process : exe handler [5412] Thread 0 name: Dispatch ...
-1
votes
0answers
34 views

how to detect hardware malfunction in iOS [on hold]

I have been going through a app, this app detects the hardware and tells user about the hardware failure of their device. I did research on google but didn't found anything to achieve the same. ...
-1
votes
0answers
8 views

How to hide PSSpecifier when disable?

PSSpecifier *onoff = [PSSpecifier preferenceSpecifierNamed:@"Enable ON/OFF" target:self set:@...
0
votes
0answers
18 views

Missing GPSTimeStamp , GPSDateStamp when select image from gallery iOS 13

When select image from gallery iPhone version 13.1.2 , i see meta data GPS location missing GPSTimeStamp , GPSDateStamp . How can I interpret this? Thank you ! ALAssetRepresentation* representation =...
0
votes
1answer
17 views

Is it safe to assign NULL to an NSDate*?

I'm writing a game that includes a Quest class, which has a completionDate property of type NSDate *, which records the date and time that the player completed the quest. It's declaration (in Quest.h) ...
0
votes
1answer
30 views

NSImage to Texture

We've got a chunk of code that draws to an NSImage (text with a nice looking background), then converts it to an NSBitmapImageRep for use as a texture (originally OpenGL, now Metal). It's worked ...
0
votes
0answers
13 views

Get FCM token from FCM direct channel

I am developing a cocoa touch framework (using objective c) to handle notifications from FCM. Looking into documentation, I found that there is a way to establish a direct channel between FCM and IOS ...
0
votes
0answers
29 views

How to get single digit after fraction in float value in obj c?

How to get a single-digit after fraction in a float value? find below what i have tried. NSString *tempStr = [NSString stringWithFormat:@"%.01f", [[dict objectForKey:@"stringvalue5"] floatValue]]; //"...
0
votes
0answers
17 views

How to show save percent in app purchase subscription ios?

So i have weekly, monthly and yearly subscription plans what i want do is based on weekly price i want to save percentages for monthly and yearly. - (NSString *)weeklyPrice:(SKProduct *)product { ...
0
votes
0answers
21 views

GPSTimeStamp, GPSDateStamp not display in Location Exif data iOS 13.1.2

I am writing a small program to set the GPS info of a iphone jpg photo. It work good in iOS 12.4.2 but when i upgrade iOS 13.1.2 i can't see GPSTimeStamp , GPSDateStamp. How can I interpret this? ...
0
votes
0answers
48 views

IOS 13 PushViewController does not fire ViewDidAppear when navigating to a new view [on hold]

The problem appears when navigating to a new view. The target view is navigated to through the use of PushViewController on a UIViewController class. The supposed table that I show on the target view, ...
0
votes
2answers
37 views

Return type differs in implementation for objective C protocols

I have a protocol that has a method returning NSArray*. In the implementation I had made the return type of that method to be NSView* I see this is happening only in case of Objective C class ...
0
votes
0answers
17 views

IOS 13 SplitViewController Issue

On iOS 13 I currently have problems with my UISplitViewController on IPAD app. MY masterViewcontroller is not loaded while launching in ios 13 wherein ios 12 it works fine . My code is in objective c ...
0
votes
3answers
26 views

Open URL in WKWebview

I am trying to open following URL in WKWebview, https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl=otpauth://totp/[email protected]?secret=B6S2LGJTQHIDKIMU&...
-1
votes
0answers
10 views

XLForms round corner sections

I want to make XLForm (UITableview) section rounded corners like shown in this image
-2
votes
0answers
46 views

Can't seem to find or reset the defaults on Mac OS X Catalina [on hold]

Normally a "defaults delete" command will reset my Mac Game. My game makes use of defaults preferences to store init info and game style preferences of the user. Now it's giving an error, even ...
0
votes
1answer
24 views

What is needed for crashes to show up after Fabric Firebase migration?

There's an application, we performed the migration about a week ago. I receive Daily Summary and the Oct 11th indicates some crashes (more specifically ). When I try to view any crashes either through ...
-1
votes
1answer
23 views

how to use MTKTextureLoader newTextureWithContentsOfURL to retrieve an image from the web?

Is it possible to use MTKTextureLoader.newTextureWithContentsOfURL to retrieve an image from the web (ex: https://i.stack.imgur.com/EwPfY.jpg?s=48&g=1)? I try but I didn't succeed, so maybe I did ...
0
votes
1answer
33 views

How to change background color of a section in a UICollectionView?

I want to change the background color of a section in a collection view. I've seen a few answers here but they are several years old and involve creating decoration views that stretch the entire size ...
0
votes
0answers
16 views

how to receive notifications from Firebase Cloud Messaging through APNS in an Objective C Framework?

I am building a cocoa touch framework (using objective C) to be implemented in other apps, this framework is intended to receive and display Notifications from Firebase Cloud Messaging through APNS. I’...
-2
votes
0answers
37 views

Please explanation of Swift Code Data(bytes: [0xe2, 0x80, 0x8b] as [UInt8]) [on hold]

Im currently maintaining a project that has some Swift Code let error = Data(bytes: [0xe2, 0x80, 0x8b] as [UInt8]) let fixed = self.data.content.replacingOccurrences(of: String(data: error, encoding:...
0
votes
1answer
13 views

Objective C and automake

I have a very small obj program Header test.h is #import <Foundation/Foundation.h> @interface Token : NSObject { @private NSString * literal; size_t line; size_t column; } @property (...
0
votes
0answers
22 views

How Do I Use Objective-C (ObjC) with JavaScript for Automation (JXA) to create HTTP request?

I created a simple http request in the following way: source: Getting HTML Source from a URL without a Web Browser var urlStr = "/"; var htmlStr = getHTMLSource(urlStr); ...
0
votes
1answer
33 views

Method cannot be a member of an @objc protocol because its result type cannot be represented in Objective-C

I am getting "Method cannot be a member of an @objc protocol because its result type cannot be represented in Objective-C" error while making this method @objc public protocol ...
-1
votes
1answer
36 views

Unknown type name 'NSString' in Xcode 11

Xcode shows Unknown type name 'NSString' and other errors when I'm editing codes. There are C and Obj-C codes in my project. Though it shows these error when editing, the codes can run normally in ...
-6
votes
0answers
58 views

How can i fix layout in xcode 11? [on hold]

My old iOS application in Objective-c has a wrong layout in many ipads since upgrade Xcode. ContentViewController does not take Full-Screen. How can i fix this?
-5
votes
2answers
58 views

UIViewController present and dismiss

There are 3 viewControllers available in my code.i wrote the code to present 3rd view controller from first view controller. There are 2 buttons available in 3rd view controller.(done and cancel)....
0
votes
1answer
22 views

Get command key from SKScene

I wanted to support keyboard for my SpriteKit game, but here's the problem: We get the command keys from ViewController: - (NSArray *)keyCommands { return @[[UIKeyCommand keyCommandWithInput:@" "...
0
votes
1answer
40 views

Know when NSException is thrown from Xamarin

I have some Xamarin.Mac code that calls a native function as described here. When the function is called it sometimes causes an NSException to be thrown (dependent on connected hardware). ...
0
votes
1answer
42 views

[NSConcreteValue floatValue]: unrecognized selector sent to instance

In my project I have this problem. I have a NSDictionary, when I try to call a value sometimes the app crash and Xcode give me this error: [NSConcreteValue floatValue]: unrecognized selector sent to ...
0
votes
0answers
14 views

iOS Mantle Object of Object using Objective-C

I am trying to parse following JSON model using Mantle iOS library for Objective-C { "images": { "poster": { "url": "https://example.com" } } } Here is ...
0
votes
0answers
6 views

How can I get a image from AVFoundation? -captureOutput:didOutputSampleBuffer:fromConnection

I want to get a image from AVFoundation's method "- (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection *)...
-2
votes
0answers
37 views

Is there any way to get all called Objective-C/Swift methods with source code or binary? [on hold]

Is there any way that I can analyze the code or mach-o binary to get all called Objective-C/Swift method?
0
votes
0answers
30 views

UIViewAnimationState popAnimationState crash only iOS13

crash only iOS13,But I don't know where it came from I think it's the same problem and hope to help me My code has UI update code, but I'm not sure what caused it. Please help me [self.view ...
0
votes
0answers
31 views

What is a way to detect if application can do a screen recording in obective C on macos catalina?

I am using the following code to take screen shot. CGWindowListCreateImage(CGRectInfinite, kCGWindowListOptionOnScreenOnly, kCGNullWindowID, kCGWindowImageDefault); In objective C, do we have any ...
0
votes
0answers
26 views

Can't click on UINavigationBar

I have Added UINavigationItem in storyboard. I have added UIView in Navigation Item in storyboard. I want to click on that so i have to put tap gesture and set that item to userInteractionEnable to ...
0
votes
0answers
28 views

Access ObjectiveC UIAlertController category in Swift

UIAlertController category created in ObjectiveC like UIAlertController+CustomBlocks.h @interface UIAlertController (CustomBlocks) + (nullable instancetype)showAlertViewWithTitle:(nullable NSString ...