简体   繁体   中英

If I use Apple Push Notification service for instant messaging will apple block my account?

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?

"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 :)

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 ok 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 (ie 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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM