Sinch Client works but messages aren't being sent - ios

I'm using sinch and I've gotten the client to work by registering a user, but I can't send a message. When I click my send button, nothing happens. The required methods that need to be implemented, such as messageFailed(), messageDelivered(), etc. are not being called either. Does anyone know why?

Have you registered the one more user? Can you enable logging and share the full log output.
See comment below, user tried to send message to self

Related

Accessing previous MSMessages from MSConversation

If I have sent a few messages in my iMessage app and I want to access previous messages (obviously just my own app-created messages, not just any messages the users have sent in their conversation), is there a way I can do that?
I can access the most previous message with this:
[self activeConversation].selectedMessage;
Any way to loop through previous messages that might not have even ever been clicked by the user (so simply storing it in user defaults is not an option)
There is no way to do this. Apple considers this to be a security/privacy issue.

Monaca Push Debug App

I am working on an app using Monaca where I need to be able to push notifications to users of the app. I tried getting the monaca push back-end working, and that wouldn't work, the app didn't register. I then moved to using the standard cordova plugin, so I can push directly from my servers, without using monaca's back-end. when I call the init function, normally a register event will fire, this works fine when I build the app. However I very much want to get the custom debugger working, I am able to build the custom debugger, and I see the plugin properly installed. Also the init function gets called, as soon as it is called I get the standard IOS security alert to grant the app permission, however the register event is not fired, therefore I am unable to get the device ID to push to the custom debugger app. Has anyone been able to use push notifications with the custom debugger application?
Best,
Peter
(https://github.com/phonegap/phonegap-plugin-push)
P.S, i calls to set the badge count setApplicationIconBadgeNumber works fine in the debugger. I think this is something simple, maybe with the certs? I dont get any errors fired, no notifications no clues using the standard debugger, how can I hunt down what the issue is?
I can get it work using ngCordova, which is AngularJS integration.
http://ngcordova.com/docs/plugins/pushNotifications/
Then, inject it like
var app = ons.bootstrap('myApp', ['onsen', 'ngCordova']);
Get back to me if you need further clarification.

application:didRegisterForRemoteNotificationsWithDeviceToken: is called before the prompt

During the initial app installation everything works as exptected: application:didRegisterForRemoteNotificationsWithDeviceToken: is called after the prompt *"APP Would Like To Send You Push Notifications"* is accepted or rejected. But if the app is deleted, and reinstalled again I'm getting a weird behaviour: that delegate method is called BEFORE user had a chance to accept or reject the prompt, right after it appears...
In my app I need to perform some UI action after a user accepts or rejects that prompt, and I don't see any other option other than using the above delegate method (and it seems not to work after re-install)
Any help is greatly appreciated.

Sending mail without leaving app

I want to send a simple mail from my app without leaving it and I already have the code from other questions in this forum, but my problem is that when I send an email from my app, I have to open the mail program from apple so the mail is being sent.
I get a MFMailComposeResultSent when I send the mail from my app but it stays in the memory or somewhere else until I open the apple-mail-app.
I noticed when searching for my mistake that I never let the user enter his email address and password but they're both saved in the apple-mail-program, that's what I think why I need to open the standard-app.
Any suggestions on how to solve my problem? Any help is appreciated.
You did nothing wrong if you are getting a MFMailComposeResultSent. This is not about any username or password of the email account. The documentation says about MFMailComposeResultSent: Send may only be interpreted as a successful queueing of the message for later sending. The actual send will occur when the device is able to send.
Also your problem became a possible duplicate of: ios4.3.4: MFMailComposer doesn't send an email, but return MFMailComposeResultSent status

XMPPFramework/iOS issue: send and receive subscription

I have a challenge with XMPPFramework today...
I've configured ejabberd correctly: server is up and running and registering users correctly by in-band registration.
But when I try to send a subscription request from one device, the second one can't recieve the presence for the first one. Here's the code I use on the first device to subscribe to a user, as documented:
[[[self appDelegate] xmppRoster] addUser:userJID withNickname:nickname groups:nil subscribeToPresence:YES];
And if everything goes ok, the second device must fire the delegate method:
- (void)xmppRoster:(XMPPRoster *)sender didReceiveBuddyRequest:(XMPPPresence *)presence
The problem is that this delegate method is never fired.
The server creates the new contact for the user, I can see it on ejabberd web administrator, but the subscription type is set to none.
Any ideas?
UPDATE:
Well, it seems that I was forgetting to include the hostname into the JID. Now, the delegates for XMPPRoster are not being called, but I can see on ejabberd that the request is not 'none' but 'both' and pending validation.
Can't imagine why the XMPPRoster delegates are not firing... it seems that ejabberd server don't send the proper notification when a user receives a new subscription request...
It seems that eJabberd was misconfigured or something. Just installed OpenFire and everything works correctly.

Resources