Google app invite SMS not getting sent but email working fine - ios

i have implemented Google App Invite in iOS. Code :
self.inviteDialog = [GINInvite inviteDialog];
[self.inviteDialog setInviteDelegate: self];
NSString* message = [NSString stringWithFormat:#"Message",
[[GIDSignIn sharedInstance] currentUser].profile.name];
[self.inviteDialog setMessage: message];
[self.inviteDialog setTitle: #"App"];
[self.inviteDialog open];
I am able to send the email but SMS are not getting sent.
When i enter a phone number "MFMessageComposeViewController" opens with text :
"Message Link" but then SMS is not getting sent.
Please help

SMS messages are not sent when the message text contains some "more special" characters.
Try to use less number of symbols.
Try to reduce Message length.

Related

iOS: Firebase invite through email not working

I am trying to send the invitation through emails using Firebase. When i select the user and tap on send, i got an alert view saying invitation has been sent successfully. But i am not getting the email to the invitee.
Here is my code for sending the invite.
// Invite friends
id<FIRInviteBuilder> inviteDialog = [FIRInvites inviteDialog];
[inviteDialog setInviteDelegate:self];
FIRInvitesTargetApplication *targetApplication = [[FIRInvitesTargetApplication alloc] init];
targetApplication.androidClientID = #"Android ID";
[inviteDialog setOtherPlatformsTargetApplication:targetApplication];
NSString *message =
[NSString stringWithFormat:#"Try this out!\n -%#",
#"Ankur"];
[inviteDialog setMessage:message];
[inviteDialog setTitle:#"Invites Friends"];
[inviteDialog setDeepLink:#"Deep_Link"];
[inviteDialog setCallToActionText:#"Install!"];
[inviteDialog open];
At the same time, i am getting the invitation if i send it through phone number.
Any help would be appreciated. Thanks!
You need to add your team ID in the firebase console, it is also required that you add an App Store id (it's ok to fake one for testing)
I was having this issue because i have not mentioned the app store id in firebase console. After saving the AppStore ID, the issue got resolved.

Get Only Unread Messages from QuickBlox?

I had integrated QuickBlox SDK in my chat application.
I am Bit frustrated with an issue of unread messages or say offline messages.
In offline messages QuickBlox do send the push notification. But some where it gets skipped to store at app side.
Like say if i got notification of 25 messages and i click on one of message from notification and app gets open but how can i get those 24 unread(Offline) messages.
There are few methods given by QuickBlox to retrieve messages.
For Group
[[QBChat instance] createOrJoinRoomWithJID:room.JID membersOnly:YES persistent:YES historyAttribute:#{#"maxstanzas": count}]; // Where count is the unread messages count which i get from the `QBChatDialog`, And this code gives me unread messages from the `XMPP` server.
Private and Group both from QuickBlox
NSMutableDictionary *extendedRequest = [NSMutableDictionary new];
extendedRequest[#"limit"] = #(limit);
if (offset) {
extendedRequest[#"skip"] = #([offset integerValue]);
}
extendedRequest[#"sort_desc"] = #"date_sent";
[QBChat messagesWithDialogID:dialogID extendedRequest:extendedRequest delegate:self];
Both of above method return me the messages from last. But some of messages in between gets skipped. So how can i get those perticular messages.
By short and simple i just want the messages that are unread without passing its count as count gives the messages that are from last.
So is there any method that QuickBlox have to retrieve only unread message.
At this moment you can save a datetime where your application has been closed( or moved to background ). Then when you receive push, you can load dialogs from previously saved datetime.

When both users are in chat room, messages are still marked unread

I'm having some trouble with Quickblox chat. Whenever two users are both logged in and both joined in the same chat room, messages that are sent between the two users are not marked as read. When I back out of the room to the dialogs list and the dialogs are refreshed, it says that there are unread messages even though I was in the room and I was receiving the messages live.
Is there a certain call that I must make to let it be known that the received messages should be marked as read? I am developing in iOS.
Thanks.
User has to read message to mark it as read
NSString *dialogID = #"53d10eede4b02f496c21549f";
NSArray *mesagesIDs = #[#"53aabe15e4b077ddd43e7fd3", #"53aabe15e4b077ddd43e7fd7"];
[QBChat markMessagesAsRead:mesagesIDs dialogID:dialogID delegate:self];
In iOS you can use:
QBRequest.markMessagesAsRead(Set<String>?, dialogID: String, successBlock:
{
(QBResponse) in code
})
{
(QBResponse) in code
}

Trying to text from my iOS app fails with wrong number error

So I have a button in my app that people can click which is suppose to open the chat app and allow the user to send a text to the number I specify.
Here is the code:
NSString *phoneNumberStuff = [NSString stringWithFormat:#"tel:%#",self.driverPhoneNumber];
NSString *stringURL = [NSString stringWithFormat:#"sms:%#",phoneNumberStuff];
NSURL *url = [NSURL URLWithString:stringURL];
[[UIApplication sharedApplication] openURL:url];
What happens is when I click the SMS button it opens the texting app and I see in the TO: field the correct phone number to text a message to. So I type a message and hit send, but I get this response back.
"15558354439876552 Error Invalid Number. Please re-send using a valid 10 digit mobile number or valid short code. text again"
Anyone have a clue?
Your format for the url isn't correct.
You are using
sms:tel:1234567890
When you should use
sms:1234567890

Body SMS Twilio in app iOS

I'm making an app for iphone and sending SMS using Twilio for automatic form to send a message when an event determined by the user. I have everything ready but when sending the message only sends the last variable declared, when you have to send the whole body with the three variables. Why can this happen?
NSString *kMessage = (#"%# %# %# %#.", tunombre, _addressOutlet.text, _cityOutlet.text, coordinateLabel.text);
Only send the last variable coordinateLabel.text. Any solutions?
You're not properly concatenating the strings.
Try:
NSString *kMessage = [NSString stringWithFormat:#"%# %# %# %#",tunombre, _addressOutlet.text, _cityOutlet.text, coordinateLabel.text];

Resources