Wednesday 15 August 2012

iphone - Turn Push Notifications On and Off from within App with Parse -


I have been advised that users should turn on and off push notifications from within their app. I am using paras to manage my push notifications. I have everything setup so that a user can register for notifications by pressing "Allow". When Push Gesture Popup is my question, however, it is how can I allow the user to turn on push notifications from within the app if they originally said "do not allow". I know that push notification alerts will only display once. Anyone have any ideas? Thanks!

My App Rep:

  - (BOOL) Application: (UIApplication *) The application did the FinishLaunchingWithOptions: (NSDictionary *) launchOptions { [Parse setApplicationId: @ "APP_ID" Customer: @ "CLIENT_KEY"]; [PFANITX trackupOpInd with launch option: Launch option]; // Other code} - (Zero) Application: (UIApplication *) Application: With registration notification for crediting DevicesToken: (NSDTA *) DeviceTokan {// Store Touch in the current device and save it to parse. PFInstallation * currentInstallation = [PFInstallation currentInstallation]; [Current installation set device talkform data: device tone]; [Current installation save in background];   

View user settings Controller:

  - Switchwalk switch changed {if (toggle switch.on) {[ UIApplication ShareApp] RegisterFormremote Notification Type: (UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)]; PFInstallation * currentInstallation = [PFInstallation currentInstallation]; [Current installation set device talkform data: device tone]; [Current installation save in background]; } Other {}}    

You can not do this The user must go to notification settings manually and set up his app for notifications. Obviously this is because the apple does not want an app to allow a user if the user has already said it once.

I recommend that your app displays a warning to the user to advise turning on notifications.

No comments:

Post a Comment