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,225
questions
11
votes
4
answers
6k
views
Getting the Action of UIGestureRecognizer in iOS
I have printed a UITableviewCell's gesture in – tableView:didSelectRowAtIndexPath method in NSLog as
<UIScrollViewPanGestureRecognizer: 0x11e92080; state = Possible; cancelsTouchesInView = NO; ...
1
vote
1
answer
28
views
How can I mock an Objective-C class from Swift code for unit testing?
I'm trying to unit test a Swift class that depends on an Objective-C class. Call these SwiftClass and ObjcClass.
I created a protocol that contains the methods/properties of ObjcClass that SwiftClass ...
0
votes
0
answers
11
views
Unable to create framework in Xcode 15 with Objective-C throwing error "Command PhaseScriptExecution failed with a nonzero exit code"
I am trying to create objective C Network framework using Xcode 15 with minimum supported iOS version 14.0.
Here are the steps I am following:
I created New> Project> framework> Objective C&...
82
votes
14
answers
147k
views
Add animated Gif image in Iphone UIImageView
I need to load an animated Gif image from a URL in UIImageview.
When I used the normal code, the image didn't load.
Is there any other way to load animated Gif images?
9
votes
6
answers
7k
views
How can I create iOS push notifications that don’t vibrate?
I know how to create silent push notifications (with playing a sound file that is silent).
I would also like to send a push notification that doesn't vibrate phone.
When setting silent sound file as ...
5
votes
5
answers
7k
views
How to play MPMediaItem in MPMusicPlayerController in iOS?
I am trying to play MPMedaiItem in MPMusicPlayerController in iOS.
In my case , i have a UITableView that show songs from playlist.
When i tap cell on UITableView , i want to play that song with ...
0
votes
1
answer
26
views
Exclusion of a directory from backup : NSURLIsExcludedFromBackupKey does not always stick even though setResourceValue has reported success
I want to exclude a directory in documents storage class from backup.
Setting exclusion attribute like so
+ (BOOL)kit_addSkipBackupAttributeForItemAtURL:(NSURL *)url
{
if (![[NSFileManager ...
0
votes
0
answers
15
views
How to corroct get notification permission in Objc?
I have a way to get push permissions.
But what I get every time is not the correct value.
How can I rewrite this method?
My push permission has been enabled, but it still prints out 555 first and then ...
-1
votes
0
answers
22
views
How to call "AutoFill Password" dialog like click password button in iOS system keyboard?
I want call "AutoFill Password" dialog like click password button in iOS system keyboard. Is Any iOS API can do that?
I've try using ASAuthorizationPasswordRequest and ...
5
votes
4
answers
4k
views
Reformatting to have method parameters in a new line
There are so many settings in the preferences for Code->Style->Objective-C. I'm looking for the right one to reformat this line of code
SCPropertyDefinition *test = [SCPropertyDefinition ...
-6
votes
1
answer
54
views
how to developed ocr application with textual image [closed]
Tesseract library is good for image scanning
0
votes
0
answers
327k
views
Class FIRApp is implemented in both foo and bar 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/...
2
votes
1
answer
2k
views
Handling authentication for multiple apps under the same account - iOS
Working for a company where we are starting to have many small apps, each with their own log in screen.
So that means whenever someone's password changes, they'll have to re enter their password for ...
-1
votes
0
answers
14
views
kABPhoneProperty how to check the label?
I'm working in Obj-C and am using an ABPersonPicker.
I am able to obtain the phone number from the selected person and output the phone number of any given index. This all works great, however I need ...
-1
votes
0
answers
10
views
“'FIRMessaging' has different definitions in different modules; first difference is defined here found property”
I am currently upgrading an iOS project to version 7.1.0 by creating a new Cordova project. After integrating the 'NativeLogs' plugin, the build process in Xcode fails with multiple errors, one of ...