apple-push-notifications

Apple push notification with device token and UDID

*爱你&永不变心* 提交于 2019-12-08 08:28:25
问题 I am maintenance a project using UDID and device token to implement push notification for iphone. At first we are using UDID to push, but after that Apple reject other apps using UDID (not our app), so we plan to move all things to use device token instead of UDID. But in our server store many UDID from users, we want to continue using UDID with our server and device token for push notification. Can we keep them both in our server? Do Apple allow that, do we have chance to be rejected from

Identifying the Push Notification Message

爷,独闯天下 提交于 2019-12-08 08:21:48
问题 In my project I want to show the events and offers through push notification, but the problem is, I'm able to show the events or offers, not both. Is there any way to identify the message of Push notification. Here's the code: - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { NSString *message = nil; id alert = [userInfo objectForKey:@"alert"]; if ([alert isKindOfClass:[NSString class]]) { message = alert; } else if ([alert isKindOfClass:

Apple Push Notification Bundle Name

守給你的承諾、 提交于 2019-12-08 08:19:45
问题 By default the title of an push notification alert will be the bundle name which we provide in the info plist file. I'm having a short name representation as bundle name in info plist file which we used as a application name in springboard. But i want a different name as title in the alert (push notification alert) and not the short name which i mentioned in the info list file. Whether it is possible to change the title of the push alert by any means of settings (from app side) or any changes

Apns-alert customization

情到浓时终转凉″ 提交于 2019-12-08 08:03:38
问题 I have successfully used APNS in iphone app and still have a problem the alert customization.Below is my question: 1 I can't custom the Alert view,like title and button title.I custom the alert like: - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { NSDictionary *apsDic = [userInfo valueForKey:@"aps"]; NSString *alertStr = [apsDic valueForKey:@"alert"]; NSNumber *badgeNum = [apsDic valueForKey:@"badge"]; NSString *soundStr = [apsDic

iOS Push Notifications- How to specify alert and badge with NO sound?

∥☆過路亽.° 提交于 2019-12-08 06:38:23
I am wondering how to send a Push Notification with NO sound. From Apple's website : The sound in this file is played as an alert. If the sound file doesn’t exist or default is specified as the value, the default alert sound is played. This says that if I use "default" for the sound file or if I specify a sound file that does not exist, it will play the default alert sound. But it does specifically state how to have no sound... If I just do not include a sound in the payload (leave it out), will this mean that there will be no sound played? Thanks If I just do not include a sound in the

PLSQL APPLE push notifiactions

痞子三分冷 提交于 2019-12-08 05:22:45
问题 I have a problem with notifications. I'm using Oracle apex with rest services. How to send push notifications to APN iphone from pl/sql? Are you using Java in database? 回答1: We successfully implemented the solution in our java code with java-apns You create a service: InputStream resourceAsStream = Thread .currentThread() .getContextClassLoader() .getResourceAsStream("Certificate.p12"); ApnsService service = APNS.newService() .withCert(resourceAsStream, "CERTNAME") .withProductionDestination(

update sqlite db from push notification, app is closed and not running in background iOS

会有一股神秘感。 提交于 2019-12-08 04:50:11
问题 I am trying to update local sqlite database when notification received and app is closed/killed by user. Everything works fine when app is background or active mode. Reference : REFERENCE STACK LINK 1 REFERENCE STACK LINK 2 Here is code i am trying: -(void)application:(UIApplication )application didReceiveRemoteNotification:(NSDictionary )userInfo fetchCompletionHandler:(nonnull void (^)(UIBackgroundFetchResult))completionHandler{ NSLog(@"App Background :%@",userInfo); if(application

Apple push notification new protocol not working

谁说我不能喝 提交于 2019-12-08 04:50:10
问题 I am testing Apple push notification. I found, that APNs accept only old protocol format. Sending data with new format is not working. Here is an example with old (working) protocol. import struct import socket import json payload = { 'aps': { 'alert': '123!', 'sound': 'default' } } payload = json.dumps(payload) payload_len = len(payload) notification = struct.pack('>bh32sh{payload_len}s'.format(payload_len=len(payload)), 0, 32, token.decode('hex'), len(payload), payload) And here is example,

iOS push notification images in content

只谈情不闲聊 提交于 2019-12-08 04:48:29
问题 How can we add icon images in ios push notification content 回答1: Those are emojis unicode characters, not pictures: 🏎🏁 You may illustrate your content with anything from this partial list of Unicode emojis that are supported on iPhone (this list is not exhaustive, it's just for illustration): 😀😃😄😁😆😅🤣😂🙂🙃😉😊😇😍🤩😘😗😚😙😋😛😜🤪😝🤑🤗🤭🤫🤔🤐🤨😐😑😶😏😒🙄😬🤥😌😔😪🤤😴😷🤒🤕🤢🤮🤧😵🤯🤠😎🤓🧐😕😟🙁😮😯😲😳😦😧😨😰😥😢😭😱😖😣😞😓😩😫😤😡😠🤬😈👿💀☠💩🤡👹👺👻👽👾🤖😺😸😹😻😼😽🙀😿😾🙈🙉🙊💋💌💘💝💖💗💓💞💕💟❣💔❤🧡💛💚💙💜🖤💯💢💥💫💦💨🕳💣💬👁️‍🗨️🗨🗯💭💤👋🤚🖐✋🖖👌✌🤞🤟🤘🤙👈👉👆🖕👇☝👍👎✊👊🤛🤜👏🙌👐🤲🤝🙏✍💅🤳💪👂👃🧠👀👁👅👄👶🧒👦👧🧑👱👨🧔👩🧓👴👵👨‍⚕️👩‍⚕️👨

iOS Push Notifications- How to specify alert and badge with NO sound?

扶醉桌前 提交于 2019-12-08 04:44:38
问题 I am wondering how to send a Push Notification with NO sound. From Apple's website: The sound in this file is played as an alert. If the sound file doesn’t exist or default is specified as the value, the default alert sound is played. This says that if I use "default" for the sound file or if I specify a sound file that does not exist, it will play the default alert sound. But it does specifically state how to have no sound... If I just do not include a sound in the payload (leave it out),