apple-push-notifications

remove iOS push notification after fresh reinstall

时光毁灭记忆、已成空白 提交于 2019-12-05 13:52:04
I have application which has successfully integrated apple push notifications, when user logs in to the application app registers with the push notification and token is saved on our back-end, when user sign out from the app, we remove the push notification tokens from our back-end. but if user uninstall app from the device WITHOUT SIGN-OUT from app, and then re-install,in that case we can still send push notifications to the device, since app is newly installed and not logged in any user we have to remove tokens from the backend. since iOS app does not have any API for uninstallation events

iOS - Delegate method when user turns on Push Notification manually in Settings

风格不统一 提交于 2019-12-05 13:43:29
We know that when a user is prompted with the system dialog in an app asking for Push Notification permission, if he clicks "YES" then application:didRegisterForRemoteNotificationsWithDeviceToken: will be called, if he clicks "NO" then application:didFailToRegisterForRemoteNotificationsWithError: will be called. What if the user clicks "NO", then later on goes to Settings and manually turns on push notifications? Upon returning to the app, will a certain delegate method be triggered? I would like to execute a block of code as soon as the user turns on push notifications in Settings, what is

apn_sender and Rails 3

白昼怎懂夜的黑 提交于 2019-12-05 12:49:43
I have a project that needs to send notifications from server to device. I don't know how and where to start (create table first or other), because I'm new to Ruby on Rails. I've follow the apn_sender tutorial but it won't work and always errors out on start. Is there any full tutorial to create apn_sender for Rails 3? Thanks Rails 3 and apn_sender I too have been working on the apn_sender problem, because I like that the Apple Push Notification support seems pretty robust. However, the project has been abandoned and now it is falling behind the latest 3 series rails. I have gotten the system

CloudKit Push Notification, App running on background

夙愿已清 提交于 2019-12-05 12:45:16
When iOS8.2-app is running in the background, it does not receive any push notification, while if it is running on the foreground, it receives the push notifications fine. Any idea what is going on ? Running on CloudKit Development mode, the subscription is for add,edit,and remove, and using the following didReceiveRemoteNotification : -(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { NSLog(@"Push received."); NSDictionary * apsDict = [userInfo objectForKey:@"aps"];

iOS 6: update view after push notification was received, but app was closed

被刻印的时光 ゝ 提交于 2019-12-05 12:27:22
After the app receives a push notification, I'd like to change titles of some buttons on my main ViewController . To achieve this behavior, I overwrote in my app delegate the method application: didReceiveRemoteNotification: to re-instantiate the UINavigationController with the controller I'd like to update as its root view controller, setting the buttons' titles to whatever I want: - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:self

Production Push Notifications using Firebase with APNs Auth Key

旧街凉风 提交于 2019-12-05 12:12:05
When testing my application on TestFlight I have noticed that I do not receive push notifications. I have confirmed that I can receive notifications initiated from both cloud functions and the firebase console when loading builds from Xcode. I have referenced other similar questions but none of them reflect the precise problem I am dealing with. When configuring for remote notifications in Firebase I am using an APNs Auth Key , I have also included both .p12 files for Development and Production. However, the .p12 files are greyed out and listed as inactive because the APNs Auth Key has been

Multiple push notifications on 1 device - iPhone

混江龙づ霸主 提交于 2019-12-05 11:34:10
How to handle multiple push notifications on One device e.g: A user receives a notification saying you have 1 new message from my app. Before he checks that message another message comes in so now he has 2. Well I don't want 2 messages stacked in the notification bar, I want 1 notification saying there are 2 messages waiting. How do I implement this? And also if on device got 5 new notification and user taps last notification then how we got the previous notification userInfo - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo Regarding your

Linking user account to device token for push notifications

一笑奈何 提交于 2019-12-05 11:09:52
I have an app set up with an API server and each user creates an account either by email or facebook when they download the app. That information is all stored in the back end. I want to enable push notifications so that they are user specific. I know what needs to be done on the back end with APNS server etc. My question is linking the Device Token with a user account so I can send the right user the right information based on logic from my servers. I know that I place this code in the applicationDidFinishLaunching : - (BOOL)application:(UIApplication *)application

Register notification in iOS 9

隐身守侯 提交于 2019-12-05 10:57:52
I am using this to register notification : if application.respondsToSelector("registerUserNotificationSettings:") { let types:UIUserNotificationType = (.Alert | .Badge | .Sound) let settings:UIUserNotificationSettings = UIUserNotificationSettings(forTypes: types, categories: nil) application.registerUserNotificationSettings(settings) application.registerForRemoteNotifications() } else { // Register for Push Notifications before iOS 8 application.registerForRemoteNotificationTypes(.Alert | .Badge | .Sound) } But it's not woking for iOS 9. I have found solution : if application

Use of undeclared type UNAuthorizationOptions

一世执手 提交于 2019-12-05 10:07:18
问题 I am trying to use Firebase to handle push notifications. I have installed Firebase pod ('Firebase/Core' and 'FirebaseMessaging' pods). And after I imported Firebase to the project import Firebase I have configured the Firebase app like this( code is copied from official docs ): func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {FIRApp.configure() } After that I've tried to use this code ( code is copied from official