No Visible #interface error in ios - ios

Im getting the following issue in ios how to clear and run the code successfully.
The issue is:
"No visible #interface for 'ViewController' declares the selector 'performSelector:afterDelay:'".

There is no such function performSelector:afterDelay:.
Looking at the docs the only function that includes "performSelector" and "afterDelay" is...
performSelector:withObject:afterDelay:
and
performSelector:withObject:afterDelay:inModes:

Related

No visible #interface for UIPresentationController declares the selector initWithPresentingViewController:presentedViewController

I was watching WWDC 2014 video A Look Inside Presentation Controllers
I downloaded the source code (written in Objective-C) for the session, try to build it and I got this error:
No visible #interface for UIPresentationController declares the
selector initWithPresentingViewController:presentedViewController.
Is the method suppose to be in the UIPresentationController?
I found the answer from the documentation of UIPresentationController the method is supposed to be
- (instancetype)initWithPresentedViewController (UIViewController *)presentedViewController presentingViewController:(UIViewController*)presentingViewController; not -(instancetype)initWithPresentingViewController:(UIViewController *)presentingViewController presentedViewController:(UIViewController *)presentedViewController.
As soon as I changed that it fixed the problem
No visible #interface for 'GIDSignIn' declares the selector 'signInWithConfiguration:presentingViewController:callback:'
Google SDK is updated there for in v6.2.x version signInWithConfiguration:presentingViewController:callback: is using but in updated version v7.0.0 using signInWithPresentingViewController:completion: — check this blow link - and check what version you are using .
https://developers.google.com/identity/sign-in/ios/quick-migration-guide

Error when activate any TyphoonAssembly

I'm trying to getting started with Typhoon Framework and I have a problem.
My code is:
#interface CustomAssembly : TyphoonAssembly
the CustomAssembly don't have more code.
When I run
[CustomAssembly new] activate];
the app crash with:
-[CustomAssembly typhoonPropertiesUpToParentClass:]: unrecognized selector sent to instance 0x15e86610
How can I fix it?
What's the problem with this code?
Finally I get the answer.
The problem was that I needed to add Obj-c in "Other linker flags"
I removed this flag when I added Parse framework.

Method not implemented in protocol (using wit.ai SDK)

I'm using the wit.ai iOS SDK for the first time and I followed step by step what is written in the getting started page in official website https://wit.ai/docs/ios/3.1.1/quickstart. I got this error:
Method 'witDidGraspIntent:entities:body:error:' in protocol 'WitDelegate' not implemented.
I could still run the app and the message is shown in my inbox (in console) but not response is being sent back and the application crashes. I got this error:
Error when enqueuing buffer from callback
Here is my code
ViewController.m
#import "ViewController.h"
#interface ViewController ()
#end
#implementation ViewController {
UILabel *labelView;
}
- (void)witDidGraspIntent:(NSArray *)outcomes
messageId:(NSString *)messageId
customData:(id)customData
error:(NSError*)e {
//Implementation here...
labelView.text = #"Hey what's up";
[self.view addSubview:labelView];
}
ViewController.h
#import <UIKit/UIKit.h>
#import <Wit/Wit.h>
#interface ViewController : UIViewController <WitDelegate>
#end
Thanks.
Dude, the crash message you are getting is telling you exactly what is wrong.
Method 'witDidGraspIntent:entities:body:error:' in protocol
'WitDelegate' not implemented.
You are missing a method (witDidGraspIntent:entities:body:error:) in your implementation of the protocol. You must implement all the required methods in a protocol. In this case the missing method is witDidGraspIntent:entities:body:error:.
You ask "Should I add a new -void ??" By that, if you mean should you add an implementation of the witDidGraspIntent:entities:body:error: method, the answer is YES!
I haven't used the wit.ai SDK before. You might want to edit your question and ask people who have used that SDK for help in implementing the method if you can't figure out how to do it on your own. You might also want to add "(using wit.ai SDK)" to your question title so people familiar with that framework notice your question.

Error "Duplicate interface definition for class 'ViewController'"

I'm making an app and I get the error
Duplicate interface definition for class 'ViewController'
I get this error in ViewController.h.
Here is the code I'm using when I get the error:
#interface ViewController : UIViewController <MFMailComposeViewControllerDelegate>
- (IBAction)Contact:(id)sender;
Please paste more code. Sometimes the errors are somewhere else. Check that you have #interface and #end and do a clean before compiling.

Dropbox iOS API - Simple Questions / DBRestClient Problems

EDIT:
I think I have fixed my issues. Thank you for the help - I really appreciate it.
Original Question:
I am new to objective-c and iOS programming, so hopefully my issues are not difficult to correct. I am trying to add the ability to open a file from Dropbox to my simple iOS application. I have been following the tutorial here:
http://www.mathiastauber.com/integration-of-dropbox-in-your-ios-application-making-api-calls/
I have so far successfully gotten my app to link to my Dropbox account and display the "link successful" message.
Now I am having trouble using the DBRestClient. I have the following code currently:
myviewcontroller.h
...
#end
DBRestClient *restClient;
myviewcontroller.m
- (DBRestClient *)restClient {
if (!restClient) {
restClient =
[[DBRestClient alloc] initWithSession:[DBSession sharedSession]];
restClient.delegate = self;
}
return restClient;
}
I am getting an error on the line
restClient.delegate = self;
that says
"Assigning to 'id<DBRestClientDelegate>' from incompatible type 'myviewcontroller'"
What could be going wrong? I have read through every example I can find and can see no issues with what I am trying to do.
If I try to cast by doing the following, it does not work
restClient.delegate = (id)self;
I have also found that if I remove the code in myviewcontroller.m and only have the variable declaration in the header file (as shown above) I get an error that says "Apple Mach-O Linker Error"
I would greatly appreciate any help you can provide. I am very much stuck with this problem.
In your header file you need to specify that you adhere to the DBRestClientDelegate's protocol.
For example:
#interface MyViewController: UIViewController <DBRestClientDelegate>
If you're already adhering to other protocols, simply add the DBRestClientDelegate and comma seperate, such as...
#interface MyViewController: UIViewController <UITableViewDelegate, DBRestClientDelegate>
For more information, I'd recommend a read of the Delegation section of Cocoa Core Competencies, especially as you'll be encountering delegates (and indeed perhaps defining your own protocols, etc.) a lot in Cocoa.
The error is because the right side of restClient.delegate = self; is not of type id<DBRestClientDelegate>
id<DBRestClientDelegate> is basically any object that conforms to the DBRestClientDelegate protocol
The first step (maybe only step) to removing the error is in your Myviewcontroller.h file
change
#interface Myviewcontroller : UIViewController //<-- my best guess at your interface line
to
#interface Myviewcontroller : UIViewController <DBRestClientDelegate>

Resources