How to enable-disable Notifications in settings app using sdk? - objective-c

I want to use push notification in my app so first time it launches it will automatically ask for notification.So i want to enable-disable push notification settings for my app programmatically.Note-I do not want to unregistered my app just disable Alert,badge,Sound for my app in settings app.

You can't do this via the SDK. You'll have to inform the user that your app requires push notifications turned on, and then they'll have to go to Settings and turn it on themselves.
Apps have no control over the phone's settings, only its own.

Related

How can i display sendbird push notification when appllication is in foregroundmode?

I've implemented sendbird push notification in react-native. It's working fine when application is in background mode. but if application is in foreground mode then it's not display.
In code, I have also set sb.setForegroundState() and sb.setBackgroundState() method with application state.
So, anyone help me for solve out this ?
SendBird sends a push notification only when a user is disconnected. So, if the application is foreground and a user is connected, the app will not receive a push notification.
If you want to show a push notification when your application is in the foreground, you can show it using data in onMessageReceived() or onChannelChanged().
you can select "Send to devices both offline and online" from sendbird dashboard to receive notifications when the app is in the foreground
Sendbird -> Settings -> Notification -> Push notifications for multi-device users -> select "Send to devices both offline and online"

pushnotification for Advertisement in iOS?

I have developed an iOS app which uses a third party framework for showing Ads inside the app.
I would like to know whether to enable push notifications for the AppId While submiting App?
its depends on how the Ads SDK works.
most likely it works without the APNS (apple push notification server), but its also possible that it does, and from that screenshot, there is a good chance.
I would recommend enabling push notification, just in case.
go to the apple's developer member center, go to your App, press edit, enable "push notifications" and create certificate for production, and also new provisioning profiles.
Don't forget to download the APNS certificate, create a PEM file to implement it on the server side (most likely they'll require that in case they do use APNS)
for more information on how it's done:
http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1
Enabling push notification is not required for Ad integration while submitting app to the App Store.

Facebook app clean notifications and badge.How?

I work on application, that uses Remote Notifications, and I am curious about something:
I notice, that Facebook app cleans notifications and application badge, when you read it in browser,even if you killed an app from app switcher.That happens when friend add something in your timeline.
So my question is: How this is done?
My understanding is when Application is killed from App switcher it goes into suspended state and cannot execute code.Is it possible to do this in my app?
As I understand they just are sending push notification with badge number set to 0.

Sending commands to iPhone app through Apple Push Notification Service

I am working on an iPhone application and I was wondering if I can send a command from my server to activate my application, at which point my app would contact the server with my payload.
You could send a notification to your app saying there are changes.
If the user decides to start of the app as a result of the notification, you could then check for the payload.
You can't automatically start the app with APS though.

observe osx application's state(opening, quitting)

how can I get notified at my app while the specify application is opening or closing?
for example, I need do something in my app when iTunes is quitting.
Subscribe to the NSWorkspace notifications NSWorkspaceDidLaunchApplicationNotification and NSWorkspaceDidTerminateApplicationNotification.