apple-push-notifications

Why not use development provisioning instead of ad hoc?

偶尔善良 提交于 2019-11-28 15:47:24
I was under the impression that when you use a development provisioning profile for a build of an app, only the specified developers can deploy that build to a phone. But I just deployed a build that uses a development profile to a phone using Xcode Organizer, even though I'm not one of the valid developers for that profile. One of my colleagues, who doesn't even have Xcode installed, did the same with his phone using iTunes. In that case, why not use a development provisioning profile for distributing your app to e.g. your QA team, instead of ad hoc distribution? EDIT: Please read the part in

How to Renew Push Notification Services Certificate [duplicate]

拈花ヽ惹草 提交于 2019-11-28 15:42:10
This question already has an answer here: Renew Push certificate and keep current App Store App working 4 answers I am pretty new to IOS development and honestly don't know much about certificates, except for the part that they are needed for the application to be posted on Apple store. My company has few apps on Apple Store, and I got an email saying, "Your Apple Push Notification Service Certificate will expire in 30 days.", for one of the applications. Now, I am not sure how to renew this certificate. Here is what I did... I logged in to developer.apple.com Went to Certificates, Identifiers

Add iPhone push notification using ASP.NET server

坚强是说给别人听的谎言 提交于 2019-11-28 15:25:49
Here's the overview. I need to add push notification to an iPhone app. Server side is ASP.NET in c#. What I would like is some coaching to work through the process. I will then post generic code for an iPhone project and an ASP.NET web app along with step-by-step instructions so that others can learn. Here is my understanding: Apply for APNS certificate and add it to keychain. (Not sure how to bring this to ASP.NET) Have iPhones register with registerForRemoteNotificationWithTypes, send the value to your server, and store in a DB. Seems like this code to register should be easy but I can't

Is the APN Device Token unique to each individual app?

﹥>﹥吖頭↗ 提交于 2019-11-28 15:13:20
I have two apps on the iTunes store - both implement push notifications. While I was testing sending notifications to these production apps, I noticed that a push intended for app A was titled and opened app B. Both of these apps are installed on the same phone. I looked in my device table and saw that the device Tokens (and of course, the Device ID) listed for the two apps were both the same. As required, I am using two different certificates on the server - one for each app. I sort of assumed the device Token or certificate would route the message to the right app but clearly it isn't. I can

Is it possible to intercept push notifications for another app?

非 Y 不嫁゛ 提交于 2019-11-28 14:49:36
I'd like to act on remote push notifications that are meant for another app in an app that I am writing. Is this possible? This is not possible on iOS. A device token is assigned to an installation of an app upon registering to receive push notifications. Push notifications are sent using these tokens as an identifier of the recipient. iOS will then deliver the notification to the app that was assigned that particular device token. The only way to bypass this would be to do some low-level network interception using private APIs, which would most likely only give you an encrypted version of the

Images in iOS push notification

我只是一个虾纸丫 提交于 2019-11-28 14:45:34
I am trying to send images in push notifications I have made the notifications registrations in app delegate and apns device token is generating properly. ALso I have coded in service ext as follows: import UserNotifications class NotificationService: UNNotificationServiceExtension { var contentHandler: ((UNNotificationContent) -> Void)? var bestAttemptContent: UNMutableNotificationContent? override func didReceive(_ request: UNNotificationRequest, withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) { self.contentHandler = contentHandler bestAttemptContent = (request

Update badge icon when app is closed

非 Y 不嫁゛ 提交于 2019-11-28 14:20:08
I am trying to update the badge icon for my app(closed) when I received a PN. I have tried adding the codes into but it's not working when my app is closed. It works when the app is running in the foreground. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSDictionary *remoteNotif = [launchOptions objectForKey: UIApplicationLaunchOptionsRemoteNotificationKey]; //Accept push notification when app is not open if (remoteNotif) { [application setApplicationIconBadgeNumber:100]; return YES; } } -(void) application:(UIApplication *

Apple push notification is not working for distribution but working for development

ぃ、小莉子 提交于 2019-11-28 14:06:49
I am implementing push notifications in my application, in the development part it is working fine, and I receive push notifications well. When I decided to publish it in the app store, I implemented it for distribution (I use the certificate and provisioning profile for distribution), I made the same steps and I converted the .p12 files to .pem through shall, and I combine the certificate.pem and key.pem to another file ck.pem. In the PHP file, I did the following: $passphrase = 'The passphrase I put it in the shall'; $ctx = stream_context_create(); stream_context_set_option($ctx, 'ssl',

Can we send push notification to APNs from iOS device?

你。 提交于 2019-11-28 13:40:00
I want to send push notification from a iOS device to another iOS device without using backend server. Is it possible for an iOS device to act like a server and send push notification to APNs server?. Thanks in advance. Theoretically you can send Apple Push Notifications from a device directly to another device. All you need are the push certificate of the app, the device token of the device you are sending the notification to, and code that establishes a secure TLS connection to the APNS servers. However, there are several practical problems that make the use of a server almost mandatory :

Push Notification Badge Count Not Updating

烈酒焚心 提交于 2019-11-28 12:54:15
this is my code for apple push notification, when the application is running and notification coming i am incrementing the badge count and getting desired result when i click home button, on app icon. but when i am not running my application and notification comes, it didn't auto increment badge count and remains to only 1. the value 1 is coming from server. can any one point out where i am doing wrong. thanks in advance. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { userMessageCounter = @"0"; postType = 0; joinedStreamChecker =