apple-push-notifications

APNs push notification with macOS Sierra

岁酱吖の 提交于 2019-12-04 17:03:54
问题 I'm trying to send my phone a push notification using the simple PHP tool which connects to ssl://gateway.push.apple.com:2195 , but the connection fails with the following errors: Warning: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in <Users/.../file.php> on line 30 Warning: stream_socket_client(): Failed to enable crypto in <Users/.../file.php> on line 30 Warning: stream

XCUITest interact with a Notification Banner.

馋奶兔 提交于 2019-12-04 16:43:24
Is it possible in XCUITest to validate that a notification banner is sent to the screen? I can add an accessibility identifier to the notification, but I am having a problem getting XCUITest to interact with it when the banner is ent to the screen. I know that XCUITest runs in a separate process from the app, but was wondeering if it was still possible to interact with the notification or is it beyond the scope of XCUITest? Thanks, With Xcode 9 this is now possible. You can get access to other apps. That includes the springboard which contains the Notification banner. XCUIApplication now has a

Can an iPhone app act as a server to send messages or push notifications?

痞子三分冷 提交于 2019-12-04 16:32:51
I want to write an iOS app that can act as a client and a server to other iPhones over the cellular data network (i.e., without a typical centralized server). The goal is to share series of about 200 short event messages, one at a time, from the iPhone server to multiple iPhone clients by some means of notification. Apple Push Notification service would be fine for such notifications, but there is no need to use it specifically. I think sending push notifications from one iPhone to another is possible by connecting to gateway.push.apple.com from the serving iPhone as described in the Local and

Apple Push Message

二次信任 提交于 2019-12-04 16:23:27
I am integrating a Push Provider Server with the codes (php-apns) from google codes. Everything seems to be fine except the number of bytes per message. The number of bytes per payload should be maximum 256 characters. If some Chinse characters or UTF8 characters are sent. After JSON_enode, each character would occupy 6 bytes. Am I right ? So the maximum number of UTF8 characters in each push message is around 38. But ... Whatsapp (iPhone application) uses PUSH too, but it can push more Chinese characters ... in one push message ? Any hint ? Here is the solution to your problem: go to ~/APNS

Remove push from notificationcenter after app has been opened

孤者浪人 提交于 2019-12-04 16:22:19
When I send out a PUSH notification to my app, it stays in the notification center in iOS 5. How can I remove the notification from the notification center from within the app? Clearing the badge clears the notifications from the notification center. - (void)applicationDidBecomeActive:(UIApplication *)application { // Clear application badge when app launches [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0]; } This only works if the number changes. So to make it work in case badge is already zero, set it to some value and clear it again after a delay. - (void

Implementation for {“mdm”:“<PushMagic>”} using javapns

大兔子大兔子 提交于 2019-12-04 15:37:50
I am using javapns to develop apple push notification mdm server. There is a package "javapns.notification.management" I could not find an api to send {"mdm":""} to apple. I want to implement MDM solution using javapns. I have installed the mobileConfig and have the deviceToken and pushMagic String. Next I want to send {"mdm":""} and then the other commands. Is this possible using javapns and if yes - is there a sample or some inputs of how to do it? Issue #37 in javapns says it is possible to send mdm payloads but I could not figure how. I really appreciate any help on this. Abstractec Not

iPhone Push Notifications Custom Sound, no Vibrate in silent mode?

北城以北 提交于 2019-12-04 15:12:48
问题 So, I have Push Notifications working fine to my app with Custom Sounds. However, when my iPhone is in silent mode, and I send a push notification with a custom sound, the sound obviously does not play, but there is also no vibration. If I send a push notification with a sound="chime" or something that doesn't exist like that, the iPhone's SMS notification sound plays as expected, and in silent phone, it vibrates, as expected. What am I doing wrong here? 回答1: In case anyone else runs into

global leak errors in mocha

瘦欲@ 提交于 2019-12-04 15:01:16
问题 I was trying to unit test the apple push notification library when I got a global leak error trying to open up an APN connection. Is that a configuration error on my part or an error in node-apn or mocha? I'm not sure I understand what checkGlobals is doing... is it just checking to see if any global variable are being set? 0) Feed "before all" hook: Error: global leak detected: hasCert at Runner.checkGlobals (/usr/lib/node_modules/mocha/lib/runner.js:96:21) at Runner.<anonymous> (/usr/lib

Apple Push Notifications in tvOS

与世无争的帅哥 提交于 2019-12-04 14:56:41
Hi i am a newbie to tvOS. I have an TV application which is registered for APNS. But while i push a notification i am not able to get the notifications. i am getting the device token but not the notification. While i try with the Mobile Devices i am getting the notifications,But not in the tvOS why is it so...? How can i solve this..? let center = UNUserNotificationCenter.current() center.requestAuthorization(options: [.alert, .sound, .badge]) { (granted, error) in if granted == true { print("Allow") UIApplication.shared.registerForRemoteNotifications() } else { print("Don't Allow") } } func

Push notification and view button action[iphone sdk APNS]

你离开我真会死。 提交于 2019-12-04 14:51:30
问题 I am developing a Push Notification enabled application for Iphone. In My application I have two List View (UITableView) 1st for Category List and the 2nd is Contents List. User clicks the desired category then the contents related to that category will be displayed then user will choose the contents and the contents will be displayed in detail view(generally a UIWebView). Push notification is successfully coming in my application. My requirement is:- After VIEW button of Push alert is