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
5 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
11 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
9 views

How should I add custom view over mobile vlc kit in iOS

i want to show some custom control over vlc player,but when i am trying to do so,my control hides when actual video start running in player player = VLCMediaPlayer() player.media = VLCMedia(url: ...
0
votes
0answers
10 views

How to Discount price in 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 discount percentages for monthly and yearly. - (NSString *)weeklyPrice:(SKProduct *)product { ...
0
votes
0answers
11 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
32 views

IOS 13 PushViewController does not fire ViewDidAppear when navigating to a new view

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
33 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
12 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
19 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
33 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
19 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 ...
0
votes
1answer
18 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
30 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
15 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’...
0
votes
0answers
12 views

Why is Node.JS zlib.inflate not inflating deflated data from iOS app?

I'm writing a MITM proxy for a WebSocket connection from an iOS app. The app connects to my server and I proxy it to the original server. However, I'm trying to inflate the deflated code in my Node.js ...
-2
votes
0answers
35 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
17 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
31 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 ...
-6
votes
0answers
54 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
56 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
20 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
37 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
40 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
13 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
5 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
34 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
27 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
25 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
23 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
27 views

Access ObjectiveC UIAlertController category in Swift

UIAlertController category created in ObjectiveC like UIAlertController+CustomBlocks.h @interface UIAlertController (CustomBlocks) + (nullable instancetype)showAlertViewWithTitle:(nullable NSString ...
0
votes
1answer
22 views

closures in swift objective C and passing dicitonary error in swift to objective c “ unrecognized selector sent to class”

I have below code in objective c .h file + (void)updateSecurityQuestionWithCompletion:(NSDictionary *) SecurityData competion:(UpdateSecurityQuestionCompletion)completion; .m file + (void)...
0
votes
0answers
11 views

pod WEPopover popover menu is not appearing as currentTopViewcontroller. Instead it is going to the back of currentTopviewController view hierarchy

In iOS 13 Popover view menu is not being displayed on the on visible UIWindow although it is present in the view hierarchy of the keyWindow as can be seen here This is the way i am presenting the ...
0
votes
1answer
60 views

UILabel display emojis

I have a UILabel which is displaying emojis incorrectly. Here is a screenshot from iOS app: And here is a screenshot from Android app which is displaying the same text with the emoji correctly. I ...
0
votes
0answers
15 views

How can I access react native asyncstorage data from native(android and iOS)?

I need to get app data from native code which is stored by asyncstorage in react native. So there is any way to get asyncstorage data from native code?
-2
votes
1answer
41 views

App rejection from appstore due to bluetooth error

My app got rejected in app store saying some nsbluetoothdescription after that i changed bluetooth settings in info.plist(bluetooth peripheral usage-would like to access bluetooth for communication ...
1
vote
1answer
34 views

Why is a specific Swift class not visible to Objective-C?

All Xcode 10.3 and Swift 5.0 I have a complex project with 3 targets ("Name", "Name Test" and "Name Local") I have set all interoperability headers between Swift and Objective-C, including the Name-...
0
votes
1answer
41 views

Wait response for HTTP request using NSURLSession - Objective C

Right now I am developing I little class that has a method for sending a POST request. This method is intended for returning a ResponseModel (which basically has two ivars: code, message), this model ...
0
votes
0answers
29 views

UIView width or height dimensions are limited to up to 4096px in Xcode 11

After upgrading the Xcode from 10.3 to 11, I saw something strange to me, a UIView dimensions are limited to up to 4096px in the IB. If I gave a UIView height or width of 4097px, the preview of the ...
0
votes
1answer
26 views

Read numbers from file using NSInputStream

I am trying to read some input numbers from the file in objective C using NSInputStream. But unable to do so, I don't want to use readContentsFromFile api, but NSInputStream instead. Please suggest on ...
0
votes
1answer
32 views

App freezes after clicking on UITextField

Hopefully this will be a simple fix! I am adding a UITextField to my app using the following code in the .m file: editTextField = [[UITextField alloc] init]; editTextField.frame = CGRectMake(0, [...
0
votes
0answers
33 views

How do we know which network interface our server is on?

We are hosting a UDP server within our iOS app. We check for the ip addresses our iPhone is using by doing this: void getIPAddresses(std::map<std::string, std::string>& addresses) { ...
-1
votes
0answers
15 views

Scanline flood fill replace with another image

I have this example https://github.com/Chintan-Dave/UIImageScanlineFloodfill and read this post. But not getting result!! I have one image. In this image when we touch any portion of that image fill ...
-1
votes
0answers
28 views

[UIImageView isSelected]: unrecognized selector sent to instance 0x119a16a20

I got this error: [UIImageView isSelected]: unrecognized selector sent to instance 0x119a16a20 from the below code. for (id subview in [segmentControll subviews]) { if ([subview isSelected]) ...
0
votes
0answers
23 views

Problem with #import and #include in Xcode

This began after one of recent Xcode updates. Previously everything was fine. When I create an empty macOS project in Xcode I get such error: I use C functions in my code, and many #includes like #...
0
votes
0answers
10 views

iOS NSURLRequest uploadTaskWithRequest timeout in background iOS 13 only

I am using AFURLSessionManager with backgroundSessionConfigurationWithIdentifier to upload video to server. I am splitting video in chunks and performing uploadTaskWithRequest fromFile, and each ...
0
votes
0answers
16 views

How to restrict accessing initializer method on the class exclusivly

I I am leaning blocks In objective-c re some topics related to pointer or message passing mechanism in objective-c. As I am reading a question poped-up or occurred to my mind, how one can hide a ...
-3
votes
0answers
21 views

Extending Share Target on Music App (or iTunes) in Mac OS

I'm thinking of developing an app that extends Share Album target of existing Music App or iTunes in macOS. In my Mac OS (10.15), Music App has Share Album menu which has 3 share targets as below. I ...
1
vote
1answer
37 views

Logic behind assigning an NSData object to another NSData object

I inherited an app written in Objective C. It is an app that writes to an external Sandisk iXpand usb drive using SDK provided by Sandisk. Occasionally, I see the app crash where it appears that a ...