0

Firebase integration document for G+ Invites says:

FIRInvites *appInviteDialog = [FIRInvites inviteDialog];
 [appInviteDialog setInviteDelegate:self];

Object for FIRInvites gets created but the methods of this class cant be accessed. I'm getting the following error msg:

error : No visible @interface for 'FIRInvites' declares the selector 'setInviteDelegate:'

Calling the method without creating the object doesn't fire the above error or warnings but calls the delegate method inviteFinishedWithInvitations:

[[FIRInvites inviteDialog] setInviteDelegate:self];
[[FIRInvites inviteDialog] setMessage:@"Hi"];

Instead I get new error as follows:

Error Domain=com.google.gpp.invite Code=-497 "Cannot launch the Invite Widget because message is not set." UserInfo={NSLocalizedDescription=Cannot launch the Invite Widget because message is not set.}

Please help me solve this issue. Thanks in advance.

4

1 回答 1

0

Following solution may work for your problem,

Try declaring your appInviteDialog object as follows:

@property(strong, nonatomic) id appInviteDialog;

And use the object as below:

_appInviteDialog = [FIRInvites inviteDialog]; [appInviteDialog setInviteDelegate:self];

于 2016-12-02T09:18:40.337 回答