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,239
questions
0
votes
0
answers
13
views
Unable to mount NFS share using mount(2) on Mac OS X
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 ...
-1
votes
0
answers
14
views
error while create framework in old version of objective-c
I want to compile this repo to framework(not static lib)
https://github.com/BradLarson/GPUImage
what I have done:
download this repo
run the command:
xcodebuild archive
-project GPUImage....
0
votes
0
answers
32
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
28
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, ...
0
votes
0
answers
25
views
Broken `static_cast` from `NSURL*` to `CFURLRef`
Consider the code at the bottom. I am convinced it’s broken and should not compile. Line 224 has a static_cast from NSURL* to CFURLRef with no bridging which I believe will break the reference count. ...
0
votes
0
answers
28
views
Build input file cannot be found and xcode is searching file at wrong path after pod install
i am getting this error after pod install in xcode
error: Build input file cannot be found: '/usr/lib/libstdc++.6.0.9.dylib'. Did you forget to declare this file as an output of a script phase or ...
0
votes
0
answers
13
views
microsoft.identitymode.tokens.audienceurivalidationfailedexception was thrown while trying to open One Drive document in WKWebView in iOS app
I am working in iOS app needs to be opened One Drive attachments in WKWebView.
Sample One Drive document is
https://\*\*\*.sharepoint.com/personal/\*\*\*\*\*\_onmicrosoft_com/\_layouts/15/Doc.aspx?...
-1
votes
0
answers
23
views
Fetching data while UITableView Scroll
I have caught up in specific situations and cannot find a proper solution.
I have historic data and details are getting fetched via API1 and details are displayed in TableView
e.x
Name - Phone No
...
0
votes
0
answers
27
views
Issue with nullability specifiers in Xcode when developing Flutter app
I'm developing a Flutter application and encountering an issue with nullability specifiers in Xcode. Specifically, I have methods in my Objective-C files where Xcode is reporting conflicts with ...
0
votes
0
answers
26
views
How do I replace detail view controller navigation stack when presenting
I'm working with a UISplitViewController that's using some storyboards but now moving to programmatic presentation (which is what I'm familiar with). I have a VC that's currently presenting as a push, ...
0
votes
1
answer
35
views
Calling NSApplication from Rust using objc
I am trying to learn by doing a project of allowing AppKit certain functions , related with App and Window creation to be called from Rust using objc.
extern crate objc;
use objc::runtime::{Class,...
0
votes
0
answers
47
views
SQLCipher "file is not a database" Error After Updating iOS App
I'm encountering an issue with SQLCipher in my iOS app after updating to a new version, which involves different workspaces of my app. The app uses SQLCipher(version: 3.1) to manage an encrypted ...
0
votes
1
answer
24
views
Kotlin Multiplatform objective-c export file name convention
What logic is used to create class and protocol names when Kotlin code is exported to Objective-C? Additionally, where can I find detailed information about this process?
Where code like:
package ...
0
votes
0
answers
38
views
CMake sets “Generate Debug Symbols” - a Xcode build setting to wrong value
I’m trying to generate Xcode project file of some libraries with CMake.
I want to generate dSYM file in all build config type.
I set values in all my CMakelists.txt as below:
set(CMAKE_CXX_FLAGS &...
0
votes
0
answers
27
views
The request signature we calculated does not match the signature you provided. Check your key and signing method in objective-c in iOS , Xcode 15
We are using AWS-IOS-SDK to upload images and text.
error occurred in Xcode 15 but working good in Xcode 14 ,we used the same source code for both versions.
Please check the error message
AWSiOSSDKv2 [...
-1
votes
0
answers
20
views
Not able to add xpath in Forms Mode
We are unable to add xpath for TTD Desktop application for Mac in Forms Mode. There entire UI View is considered as a single screen(identifier). We are trying to capture xpath for each element in the ...
0
votes
0
answers
18
views
How to Reactivate the Last Focused Window After My Qt App Closes on macOS
I'm developing a screenshot-taker application using Qt and need some assistance with macOS-specific behavior.
Here’s the scenario:
When I take a screenshot, my application becomes focused to allow ...
-1
votes
0
answers
65
views
How to delete files thoroughly in iOS
I try to delete big file(1GB+) in the document directory of my developing App, the codes as below. When I deleted the file, but the space occupied by the app in iPhone storage has not changed. Does ...
0
votes
1
answer
25
views
Override NSManagedObject getter/setter to modify data
I have an NSManagedObject class that stores, among other things, a JSON string that comes from a WkWebView form. The form in the web view allows the user to add images to the form; when the form is ...
-1
votes
0
answers
30
views
macOS App Sandbox - access to ~/Documents folder [duplicate]
I have existing macOS application
the application is distributed via pkg
now I need Mac App Store version
I store application data in ~/Documents/MyApp
ideally i wan't to keep using same folder
1. ...
0
votes
0
answers
17
views
Getting unnecessary log while adding NotificationService Extension in IOS
I am using react native for an app.Just added NotificationService Extension for rich notifications and trying building my project
Getting these unnecessary log in console when hit to run on simulator.
...
0
votes
0
answers
53
views
Location manager delegate never called
I'm trying to build a simple macOS command-line tool in Objective C that merely gets the current location via a CLLocationManager. However, none of my delegate's methods are ever called and my ...
0
votes
0
answers
32
views
How to use Realm in mixed objective-c and swift project?
I have an iOS project that is already written in objective-c and it has Realm as a local database.
I have a class "RealmTransactions.m" which is an objective-c class and it has all the ...
1
vote
0
answers
34
views
Reference variable in Store.swift class from Objective-C file using singleton pattern giving Linker command failed error
I am trying to reference a variable in a Swift class from an Objective-C view controller.
I can reference functions and variables in other Swift Classes from this Objective-C class. However, when I ...
0
votes
1
answer
45
views
Difference between String in Swift and NSString in Foundation(Objective C)
What is the actual difference between String in Swift and NSString in Foundation(Objective C).
I have seen all functions of NSString can be applied to String in swift. For example ...
0
votes
0
answers
64
views
Undeclared identifier 'nullptr' and Obj-C error while using Obj-C library in Swift
No prior knowledge for using external library in Swift.
I was trying to include sf-proj-ios in my empty project named "Test". I followed instruction on the library GitHub, used commands on ...
0
votes
0
answers
25
views
sharing pdf to my ios react native app from gallery/files issue
Recently I implemented ShareExtension in my ios app built using react-native.
coming straight to the point.
added below code to info.plist of ShareExtension app to support sharing of any kind of file/...
0
votes
0
answers
19
views
How can I update running(activated) system extension in mac?
Now we are trying to update our security solution. The solution is built with endpoint security extension, and it's already distributed for all clients, and we want to update them.
But it seems like ...
1
vote
1
answer
54
views
Xcode 15.4 always popup to click "Trust and Open" when open workspace
I just upgrade my macOS from Monterey to Sonoma. And then I also downloaded and installed the new XCode version 15.4. I'm also git clone my project from my BitBucket repo after upgraded to macOS ...
0
votes
1
answer
48
views
NSNumber array containsObject fails as types are different but they should be the same
I'm having troubles checking if an array contains an object.
The @property(nonatomic) NSArray<NSNumber*>* apiArray; array is returned as a parameter from an API model while the object of which I ...
0
votes
1
answer
52
views
I was trying to update the height constraint of my view during an animation. Its not getting updated why..?
Here is how i have configured the profile view,
-(void)addProfileView
{
if(!_profileView)
{
_profileView = [ProfileView new];
_profileView.clipsToBounds = YES;
...
0
votes
0
answers
32
views
How to check what data is received by APNS sent from backend?
I am working as iOS developer and now working to handle the Apple Push Notification Payload contains custom tag like this:
{
"aps": {
"alert": {
"title": "...
0
votes
0
answers
35
views
Sandboxed macOS app not able to launch the PiP window via Javascript, why?
I have a macOS app which has a WKWebView which can load sites and if they have a video player, it can show the native PiP video window which the app invokes via a Javascript action to the WKWebView. ...
0
votes
1
answer
60
views
How does the NSWindow isReleasedWhenClosed property work when using ARC?
In Objective-C with ARC or Swift (which always uses ARC), what difference does it make whether isReleasedWhenClosed is true or not? Won't a window be kept alive as long as my code has strong ...
-2
votes
0
answers
35
views
Xcode bridging: No known class method for selector 'stringWithString:'
I'm trying to bridge Swift with ObjectiveC (A minimum reproducible example at the bottom).
Considering the below structure.
Why does the Test2.mm fails to build with the error and what can be done?:
...
-1
votes
0
answers
25
views
fatal error: 'CocoaLumberjack/CocoaLumberjack.h' file not found
fatal error: 'CocoaLumberjack/CocoaLumberjack.h' file not found
#import <CocoaLumberjack/CocoaLumberjack.h>
But the header file is present
The question is already been asked: CocoaLumberjack.h ...
1
vote
0
answers
22
views
Why can I not include metal_float64 library in Xcode
I want to use the library https://github.com/philipturner/metal-float64, and successfully built and ran tests, next copied the built MetalFloat64 folder into Xcode, but I do not know how to properly ...
0
votes
1
answer
38
views
Github Markdown highlights text with @ in it
I am writing documentation using Github Markdown for Objective-C, and everytime I write @weakify(self) or strongify(self) and publish my documentation, these two writings appear in highlighted red and ...
-2
votes
0
answers
24
views
How can I make the window background of the app created in Unity for Xcode transparent?
I created a Unity project and exported an Xcode project to MacOS. Because the background of the app directly exported from Unity cannot be transparent, I want to make some modifications to it through ...
0
votes
1
answer
30
views
UIBezierPath stroke with alpha issue / artifact
I need to draw a curve with a translucent color. But if the curve contains many points, then you can get a strange effect. How to get rid of it?
UIBezierPath * bezierPath = [ UIBezierPath bezierPath ]...
-1
votes
1
answer
46
views
NSDateFormatter returns nil for date string from server
I received a date string and a timezone from a web service and I am needing to convert into an NSDate. When setting the format and timezone, I get nil:
NSString *timeZoneString = @"Europe/Paris&...
0
votes
1
answer
25
views
How can I use a private-framework's function in Xcode?
I am trying to understand how to use private frameworks in Xcode. Specifically I want to call the MTDeviceCreateList() from the MultitouchSupport-Framework to create a minimal working example. I ...
-3
votes
1
answer
30
views
A viewcontroller(vca) and another vcb, I need to add vcb.view to vca.view as a subview
Here is a viewcontroller(vca) and another vcb, I need to add vcb.view to vca as a subview.
but I did not use addChildViewController, instead, I directly calls [vca.view addSubview:vcb.view], and vcb's ...
0
votes
1
answer
57
views
using NSObject with modern OS X SDK (14.4) and 10.7 MACOSX_DEPLOYMENT_TARGET
i've read the great question here
Is NSObject class a part of the Objective-C runtime library today (instead of being a Foundation component)?
about how NSObject was moved from runtime into its own ...
0
votes
0
answers
327k
views
Class FIRApp is implemented in both xxx and xxx One of the two will be used. Which one is undefined
Class FIRApp is implemented in both /private/var/containers/Bundle/Application/569E9278-0158-424A-9FA0-14D379B57EA4/Monster GO!.app/Frameworks/GWIDNSDK.framework/GWIDNSDK (0x105b879e8) and /private/...
0
votes
1
answer
73
views
"Missing required entitlement" after connecting to ID06 (ISO-DEV)
I´ve created a basic iPhone application for iOS 17.5 using XCode where I would like to scan a PIV card (ID06) and just log the result. I´ve tried to minimize the code as much as possible, but whatever ...
-1
votes
1
answer
58
views
MacOS: How do I give my program permissions during development?
I"m developing an app on macOS.
It's a tauri app which links to a custom library (written in objective-C so I can access some system functionality).
The issue is, some of the functionality in the ...
0
votes
1
answer
32
views
Error: Unnamed type used 'BOOL' in iOS project XCode
I am having project in XCode version: 15.4 using Swift for iOS development -> uiKit.
I have added the c++ class to my project.
MyStaticClass.h:
#ifndef MYSTATICCLASS_H
#define MYSTATICCLASS_H
...
1
vote
1
answer
73
views
Mock AVCaptureDeviceInput for unit tests
I have a class that receives an AVCaptureDevice object as a parameter and I'd like to test it. I found the swizzle method to create an instance of AVCaptureDevice
extension AVCaptureDevice {
class ...
1
vote
1
answer
76
views
iOS Communication Notification icon
I am trying to get iOS communication notifications working in objective-C and no matter which variations I try, the icon keeps getting attached as attachment and not as notification icon
#import <...