apple-push-notifications

Handling Push Notification scenarios on iOS and Android

倾然丶 夕夏残阳落幕 提交于 2019-12-04 05:31:35
I want to implement Push Notification for an App (both iOS and Android) and need clarifications on the following scenarios. I understand how the Push Notification works in general and the limitations. I did read the docs but that just got me confused and didnt answer all my questions. How are the following scenarios handled in iOS and Android: When the device is turned off When the device is not connected to 3G or Wifi networks When the device has crashed and need restart When the App is in foreground When the App is in the background When user is currently using the App When my app is closed

UIUserNotificationType was deprecated in iOS10 Swift 3.0

烂漫一生 提交于 2019-12-04 04:34:53
I am getting this warning in iOS 10 which previously is working fine on iOS 9 :- Is there another function to fix this warning in iOS 10, appreciated if anyone would have idea for this issue. in iOS10 UIUserNotificationType has deprecated , use UNUserNotificationCenter dont forget to enable this for Swift3 for sample see this import the UserNotifications framework and add the UNUserNotificationCenterDelegate in Appdelegate import UserNotifications @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate,UNUserNotificationCenterDelegate func application(_ application:

push notification iOS native extension for Adobe Air

被刻印的时光 ゝ 提交于 2019-12-04 04:29:49
问题 I'm working on iOS native extension for Adobe AIR that will get device token for push notifications. Unfortunately I'm not that munch objective-C programmer and I'm not sure if there's something wrong in the code I'm using. It compiles with no problem, I can use the extension with AIR but looks like registering for notifications doesn't return neither positive nor negative effect. So what I'm trying to do is register for notifications when RegisterDevice function is called from AIR and if it

Pushsharp apple notification A call to SSPI failed error

与世无争的帅哥 提交于 2019-12-04 04:09:09
问题 I am using PushSharp to send Apple Push Notification in C# , i have my production .pem file and its password. Below is my code snippet.Am always getting this error .. "A call to SSPI failed, see inner exception. ---> System.ComponentModel.Win32Exception: The message received was unexpected or badly formatted-" OR "System.IO.IOException: Authentication failed because the remote party has closed the transport stream." I tried almost all codes available in net.Even tried MoonAPNS but same error,

no valid 'aps-environment' entitlement string

感情迁移 提交于 2019-12-04 03:35:08
I've searched on Google and Stack Overflow, but I'm unable to resolve this problem. My app has an AdHoc and Appstore provisioning profiles, both of which are giving the error "no valid 'aps-environment' entitlement string found for application" in my X Code console, and I'm unable to send push notifications. So far the steps I've taken are: - edited profile in development portal, downloaded new profile and inspected the .mobliprovision file. Found aps-environment: production get-task-allow : false I submitted it to the App store anyway, and it passed validation and it is awaiting review. When

Why is app not getting registered for push notifications in iOS 8?

这一生的挚爱 提交于 2019-12-04 03:34:50
I upgarded my Xcode to Xcode 6.0.1, now remote notification registration is not happening for iOS 8 device. It is working fine for iOS 7 device. I have added the code in app delegate as mentioned below: //-- Set Notification if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) { UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:(UIRemoteNotificationTypeBadge |UIRemoteNotificationTypeSound|UIRemoteNotificationTypeAlert) categories:nil]; [[UIApplication sharedApplication] registerUserNotificationSettings:settings]; NSLog(@"current notifications : %@

Delayed push notifications and checking if user enabled it

假装没事ソ 提交于 2019-12-04 03:33:13
I develop an app, which builds itself around push notifications. The app requests notification permissions only when the user reaches certain point of the registration process. I have already managed to do the following: the app maintains an NSUserDefaults variable, which indicates if it is required to register for push at launch or not (by default: not) when the registration reaches that point, I flip the variable and call -registerForRemoteNotificationTypes: on iOS 7 and -registerUserNotificationSettings: on iOS 8 This works fine unless the user has already enabled push notifications and

Apple push notifications without developer account

戏子无情 提交于 2019-12-04 03:24:27
问题 I know, It's necessary to have enrolled Apple Developer account to work on push notifications? Is it possible for someone else, who already have dev. account to generate the certificate for me, or it's restricted by Apple? 回答1: Not as far as I know and I've been building mobile apps for five years now. You need to have your own account set up, even if you're using a third party solution like Firebase Cloud Messaging. You'd also need that to publish the app to the iOS app store. If someone

Know if the app received the notification from server side

限于喜欢 提交于 2019-12-04 03:15:00
I'm building a newspaper-like app and I would like to know how many people received the article's push notification vs how many actually read it . I was thinking to implement a way in which when the notification is received the app wakes up and send a request to the server saying " Hi I'm _____, I've received the notification of the article ____ " and store it in the database. Then afterwards if the user click on the notification and goes to read the article I send another request saying " Hi I'm ____ and I've read the article _____ " and I also store it on the database. Afterwards with some

iOS 8 Remote notifications - When should I call registerForRemoteNotifications()?

空扰寡人 提交于 2019-12-04 03:06:40
As the apple's official info page about push notification states: "Device tokens can change, so your app needs to reregister every time it is launched ." I trying to understand what they meant by "every time it is launched". Does it mean I have to call it in the AppDelegate, in didFinishLaunchingWithOptions() like so: func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { application.registerForRemoteNotifications() return true } Putting this code here will cause it to execute every time the user opens the app, which could be