IOS app using polling to retrieve newest data

apnsdata synchronizationdeveloper-programios

Currently we have an iOS app in development which uses polling based method to retrieve latest data from the REST API only if the app is launched by the user. It will keep polling the server periodically for 3-5 seconds when the app is active.

At the same time we are also using APNS service for push notification.

The question is: If we submit this iOS app to the App Store, will it be rejected by Apple because of using periodically polling method? Apple has suggested the right way is to use APNS for status update in background.

Best Answer

No Apple won't. At-least not just for this reason.

A simple answer is, your app could execute any code as long as it is active. Your app won't be rejected by Apple simply for the reason that it is making periodic calls to your backend. However, where it's a good approach to take or not is another question altogether and an important one to consider.

A general recommendation from Apple for app developers is to minimize the network activity to prolong the battery life and to guard against any data costs on a metered connection.

From the Networking Overview guide on Apple Developer website:

Transfer only as much data as required to accomplish a task. Minimizing the amount of data sent and received prolongs battery life, and may reduce the cost for users on metered Internet connections that bill by the megabyte.

APNS is preferred over polling as when using APNS, your app gets notified about the updates on an as needed basis. Another benefit is that polling will only work when your app is active and in foreground.

So, it is recommended to reconsider your app architecture to take the most appropriate approach keeping in mind best practises, Apple Developer guidelines and overall user experience.