I have an ipad app, that sends confirmation data to sms and email, its working fine, but the question is [hope is not to stupid]
* who is the network responsible for sending this mail?, as it goes out of the device via wifi, which mailer company is being used?, does it have a limit of mails to send in a period of time?
thanks a lot!
edit
* using the built-in mail UI
* and messageComposer for mail as well
cheers
Mail goes out on the account that the user selects -- it's an option in the messaging UI that appears.
And the messaging rate is limited by how often your user is prepared to press the "Send" button. I don't think iOS has a limit, but if you're sending messages to a lot of people some mail servers will throttle the rate of sending. But this shouldn't affect your app as iOS sends messages in the background.
Related
I've implemented Future Payment in my iOS app. Now the problem is I have to send the metaclientid to the server in order to make the payment however the trigger of "its time to charge paypal" is on a different device. Think of the app like uber wherein the passenger only gets charged when they arrived on their destination. And "arrived" is triggered from the driver app.
There are ways I'm thinking on how to go with it
Through push notif. I'll send a push -> catch it -> send metaClientID
(Issue: Probably unreliable since push can fail and user can go offline and not receive the push at all)
Store the MetaClientID to the server (As per paypal storing this is not recommended)
Would appreciate your feedback or suggestions.
How can I send a text message (natively or through the use of an API) from an iOS application to someone without having them have to interact with the message before hand?
The message would be prewritten and would send on tap of screen. Its ok if the user needs to okay it once, but I need a way to send a message without having to have the user interact with their device each time.
Example:
Phone is off, I shake phone, phone senses shake, sends text messaging saying "I'm shaking" to another user via SMS or MMS without having the user need to OK the sending. Is this possible? How would I do it?
You can't do that. You need to show the user the message in the MFMessageComposeViewController that pops up first, and he has to send it by himself.
This restriction was made, because otherwise, many apps could spam your contacts etc. with a massive amount of sms or they could even write sms to expensive numbers.
But if you want to send just some kind of notification to another user, you could use push notifications. To do that, I would recommend you to use parse.com and their free push notification-service. Also, because Push Notifications are free, in contrast to SMS, you will save a lot of money. Of course you need to make some preparations before you can send notifications, but that way you could do it. But also there are restrictions. One restriction is, that the receiver of the notification also must have the app installed on the receiving device.
So the receiver would receive a "message" like that:
So I would recommend you to check the QuickStart Guide from Parse.com for iOS for further informations. The Guide is really simple and shows you step by step how to activate your app for Push notifications.
Sorry, but you can't, it is completely impossible. The only way to send sms is through messageUI, which always requires the users consent. You can probably do it on a jailbroken phone, though.
Yes, it is possible. But you would have to use a 3rd party service to send the text message. for example, Twilio.
Some apps, specifically the StackExchange app and facebook are able to remove notifications from the Notification Center/Lockscreen if you view the notification elsewhere. For example if I get an inbox notification from stack exchange and then view my inbox on my laptop the notification disappears almost immediately from my phone. Originally I thought this was something just Apple could do with Mail and Facebook.
How does StackExchange send a notification to the phone to remove an existing notification?
I think that what they do is to send a notification with a badge number of '0' to clear all the existing ones from the notification center. I have noticed the same behavior on the Gmail app, so I did some small research about it:
When I send one email, I receive a push notification on my phone. Then I open that email from my laptop's browser, and straight away the notification center is clear.
When I send two emails, I receive two push notifications. Then, when I open the first one on my laptop, both notifications still remain on my iPhone. After I open the second email (still on my laptop) the notification center gets cleared.
I did some extra checks with Wireshark and I think that every time that I open an email on my laptop, Google sends a push notification to my phone (even if there are still unread messages in my inbox).
In all the above cases, the gmail app was not running (however I'm not sure if the background fetch introduced on iOS 7 can complicate things).
I hope that helps!
Based on #Irene's answer, my gmail-like suggestion for this would be:
As soon that happens something in Desktop or Web, i.e., you read the mail. The Google Server always calculates what is the badget/notification_number for the specific user. This is as simple as:
- if it is a new mail, or marked as unread the mail, increase it
- if reads, mark as read, archive or something like that, decreases. (Google only worries for mails in inbox.)
So, everytime this number changes, it sends a pushnotitfication for all sessions, updating the badget.
In the iOS case, whenever you send a badget = 0, it clears all notifications. So, in most case, if you are organized, you will receive an notification (there will only be one) and if you read it anywhere else, it will dismiss from your iOS, because you will receive badget = 1, and then badget = 0.
But as Irene mentioned, if you have more than one unread mail. it will just decrease the badget number in your app. So the gmail app icon, will decrease from 10, 9, 8, 7 ... while you are reading mails. But the same rules apply. If you get badget = 0, it will removes all local notification.
My assumption is that this does the trick.
Hope this helps,
with Push Notifications, we can send an notification expiry (at least that is supported in PHP language) parameter and may be that is something, which updates when the email is read on another devices.
// Set the expiry value to 86400 seconds - 1440 minutes
$message->setExpiry(86400); // This message will expire in N seconds
Same happens with Viber application, it supports desktop app and iOS app, if u get any new message it sends you out the notification and as you read in your computer, it also removes the push send to mobile. This should be with expire parameter as per my knowledge.
Please correct me, if I am wrong.
I'm implementing server-to-client communication in my iOS Application. What I'm trying to do is to deliver new messages from server to client such as
Old version will be no longer support soon, please update asap.
There is a new content available.
Reminder of some interesting content.
etc.
When device got message, it will notify user by showing "You got new X messages" with badge number. After user launch the app by clicking at the notification message, it will show those message containing images and text within my application.
At the beginning, I did this by iOS 7 background data fetch because the message content size that I mentioned will contains image url and text, it may exceed the maximum size of push notification content length. After testing with that approach, I found that there is no guarantee of when the application will be wake to connect and fetch new message from my server. (I left the device overnight to see how many time it connect to my server, first night was 5 times, second night was once)
Since some of the message is time sensitive (like reminder), I came up with the another approach by sending a Push Notification to the device when there is any new message to signal the app instead. But, according to App Store Review Guideline
5. Push Notifications
5.6 Apps cannot use Push Notifications to send advertising,
promotions, or direct marketing of any kind
5.8 Apps that excessively use the network capacity or bandwidth
of the APN service or unduly burden a device with Push Notifications
will be rejected
So, my questions are,
If I send a message contains promotions or marketing material but it won't showing at the iOS Device home screen, instead, user has to launch my application to see those contents, will it be the case of 5.6?
From 5.8, "excessively use the network capacity or bandwidth", do you know how many notifications can be sent to how many devices per time period? If I send 2 notifications to thousands of devices every hour, will that be the case?
Thank you, in advance.
5.6 wont be a problem, because i developed few which is working as like your scenario and they are live in app store.
5.8 also wont be problem i think, because i saw few application using push notification for voice call and video call application for intimate new call arrival for the user.
Some chatting application also using APN for intimation the user when
new message arrived for that user.
I want to create an iOS chatting app using APNS. If I have 10,000 active and they are continuing chatting, will apple block my developer account ? Is there any limitation regarding this?
I would discourage you from using APNS as a backbone of an "chatting app".
If you need fast chatting functionality you should write your own TCP-socket based server.
If every-few-second syncing is o.k. you can get away with a HTTP-based server backend (but all the pull-syncing can be hard on network traffic - so TCP-socket is still better choice).
You could however use APNS for fallback - when your app on certain device is not responding (i.e. is not connected to server) you can send an initial message trough APNS (to wake up your app & to notify the user there is a message waiting for him).
As soon as the user opens your app you should switch back to your TCP-socket or HTTP request based server communication.
As for your question: no, Apple would most probably (one can never know for sure) not reject your app just because of using APNS for chatting. But note (as the others said allready): messages between two users will get "lost" if they would interact too frequently - see the link Roman Barzyczak gave you.
"If you are sending multiple notifications to the same device or computer within a short period of time, the push service will send only the last one."
more information: http://developer.apple.com/library/ios/#technotes/tn2265/_index.html
but Apple wont block your developer account :)
You can use them for messaging but you are going to quickly find out that there is no guarantee they will arrive. This is known as the black hole of push notifications. ;-)
I like this answer here.
First try to use an APNS only solution.
Make your push notifications stateless (they only serve as "Hey you have some new stuff in the server").
So when the client gets a push notification it asks the server for new data (messages or other stuff).
Use OneSignal to simplify the code that sends push notifications (from the back-end). If a user in your app gets a message after 10 seconds he dose not care if you used TCP,socket.io or xmpp...
Even Whatsapp's messages can take couple of seconds to arrive.
A chat app is not a realtime game. A delay of couple of seconds will be acceptable by end users.