apple-push-notifications

Obtain NEW Apple device token?

寵の児 提交于 2019-12-10 19:04:26
问题 I am creating an app that allows the user to log out of the app and log in as different user if they want to. Is there any way to obtain a new device token from Apple once the new user logs in? Is there a way to force call the didRegisterForRemoteNotificationsWithDeviceToken method? 回答1: No, you can't request a new device token. They expire from time to time, and only then will you get a new one (or if you have a different app with a different bundle id, the token will be different). Create a

Async task hanging [duplicate]

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 18:52:50
问题 This question already has an answer here : Deadlock using async & await (1 answer) Closed 3 years ago . I have the following code: public async Task SendPushNotificationAsync(string username, string message) { var task = ApnsNotifications.Instance.Hub.SendAppleNativeNotificationAsync(alert, username); if (await Task.WhenAny(task, Task.Delay(500)) == task) { return true; } return false; } I noticed that SendAppleNativeNotificationAsync was hanging indefinitely (never returning out of the

Report error in Step:Add the Push Notifications feature to your App ID

做~自己de王妃 提交于 2019-12-10 18:09:47
问题 In developer website , I make my app ID 's Push Notifications enable. But in my project, TARGETS -> Capabilities -> Push Notifications -> I want to open it, but after sometime, there report error in Step:Add the Push Notifications feature to your App ID The picture I token: Additional info is: I use Xcode 8 , iOS 10 Edit -1 In my Signing , there is error: Attempt - 1 I have restart my Xcode 8 , and it does not work for me. 回答1: This problem occurred to me when moving from XCode 7 to XCode 8.

Parsing ASCII characters with Erlang

末鹿安然 提交于 2019-12-10 17:56:12
问题 Confused with what parsing needs to be done and at what end client/server. When i send an Umlaut 'Ö' to my ejabberd, it is received by ejabberd as <<"195, 150">> Following this i send this to my client as Push notifications (via GCM/APNS silently). From there, the client builds by UTF-8 decoding on each numeral one by one (this is wrong). i.e. 195 is first decoded to gibberish character � and so on. This reconstruction needs identification if two bytes are to be entertained or 3 or more. This

Apple push notifications - getting empty push token from production app - will push tokens be sent after fix provisioning profile issue

我的梦境 提交于 2019-12-10 17:49:14
问题 We added receiving push notifications to an iPhone app. Everything was working in the test/sandbox environment, we were getting token id's from the app and could send push notifications from our server. But now the app is approved and came out of the Appstore we were getting empty push tokens/notifications id's send to our server. We already have over 600 of them... Note that end users do get the popup to approve of receiving notifications in the app, the app is just sending empty tokens to

How to register for GCM in iOS

天大地大妈咪最大 提交于 2019-12-10 17:43:02
问题 I can't seem to get GCM push notifications working. My problem is I don't know how to get a registration ID from GCM. I can get a token from APN just fine. But I'm not quite sure what to do next. I tried following the tutorial but its not really working for me. I'm a beginner so please be explicit. What I'm asking is, after obtaining a token from APN, then what do I do? Thanks in advance. https://developers.google.com/cloud-messaging/ios/client 回答1: The Registration Token is given to the

sending passbook update with pushsharp

旧城冷巷雨未停 提交于 2019-12-10 16:27:15
问题 I'm trying to test talking to apple's push notification sandbox server. I made a certificate following this link (enabled push notification, requested certificate authority, uploaded, generated cert, export p12) I made a sample C# console application that looks like the following PushBroker push = new PushBroker(); var appleCert = File.ReadAllBytes(@"devapns.p12"); push.OnNotificationSent += NotificationSent; push.OnChannelException += ChannelException; push.OnServiceException +=

Custom sound remote push notification iOS not working

三世轮回 提交于 2019-12-10 15:56:02
问题 I'm trying to change the sound of the remote message I've added the file into my project, see picture 1 I've also added everything into my AppDelegate. In the didFinishLaunchingWithOptions I've added: if (UIDevice.currentDevice().systemVersion as NSString).floatValue >= 8.0 { UIApplication.sharedApplication().registerUserNotificationSettings(UIUserNotificationSettings(forTypes: .Sound | .Alert | .Badge, categories: nil)) UIApplication.sharedApplication().registerForRemoteNotifications() }

APNS Feedback Service - is it still alive? [closed]

隐身守侯 提交于 2019-12-10 15:27:30
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . When Googleing for ios device token expiration topic you'll find many notices about Apple Feedback Service . It's for polling of device token expiration so when Feedback Service told that particular device token is expired it means that there is no chance to deliver push-notification to that device token . We

PushSharp ASP.net MVC4 on Azure woes. - Can't connect to APNS feedback service

烂漫一生 提交于 2019-12-10 15:25:52
问题 I have an ASP.Net MVC4 website running a simple web service on Azure to provide a Push Notification service for our mobile app. It works when run on a local IIS instance on my machine but once deployed to Azure it works for a while then stops. It seems like it may stop after PushSharp fails to connect to Apple's feedback service. Initially I get the first stack trace then every ten minutes after that I get the second one. The certificates work fine for connecting to the APNS itself, indeed I