I am writing an app for IOS. Basically my app is a Tabbar application with uinavigation bar and i am intending to use push notification also. So basically my app works and first time the app is luanch it asks whether you want to allow push notification. So i am altering the app so that it will have firstly
1. A login/Registration screen
2. After successful authentication it should then open the tabbar view and also by then it should ask if i want to allow push notification.
Any idea how to do this? I am trying to figure out but no solution yet.
Many thanks 🙂
I am writing an app for IOS. Basically my app is a Tabbar application
Share
If you want to allow multiple users on a device, you’ll have to rethink your approach. Push notifications are sent and received even when the app is closed, so there’s no way to restrict notifications on logged-in-user-level.
If you want the user to log in once before he receives push notifications, you can just move the apns-registration code to after the user has logged in.
If you want the user to only receive notifications while he is logged in, you’ll have to communicate the user’s presence to the server (your apns provider) every time he logs in (and logs out).