Emojis support in Apple push notification
I am working on iPhone app named "INTERSTIZIO".In this I have implemented functionality like chat between users.In this user can send text,location and text with emojis symbol.If the app is not in open mode at receiver end then from backend push is generated and display to receiver.I am able to display message in push like "UserName : Hello..." but I also want to display emojis symbol, like "UserName : Hay :)" in push message so anyone have idea regarding how I can achieve this type of push message using emojis code(like for smile apple code is \u263a) of apple?
I have followed the solution given in this link : http://code.iamcal.com/php/emoji/ But it returns the same code that I have passed in function.Its working fine on web pages but not in push message.
Here I am attaching one screen shot of the push how it looks at my end.In it you can see that I have displayed smiley and lighting symbol but its displayed using HTML supported code like below code of PHP script:
$lightning = html_entity_decode('',ENT_NOQUOTES,'UTF-8');
//add this to the 'alert' portion of your APNS payload:
$message ="You just got the {$lightning}SHOCKER{$lightning}!";
But in my case I have displayed inbuilt emojis keyboard from apple and using below code I am able to get emojis code :
//store code of emojis at backend
NSData*data =[txtspeech.text dataUsingEncoding:NSNonLossyASCIIStringEncoding];
NSString*valueUnicode =[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
//Display emojis in mobile chat window
NSData*data =[objchat.strchat dataUsingEncoding:NSUTF8StringEncoding];
NSString*valueEmoj =[[NSString alloc] initWithData:data encoding:NSNonLossyASCIIStringEncoding];
cell.txtchat.text=valueEmoj;
Using above code I am able to store and display emojis in chat window but if receiver user have closed app then in push message I am not able to display emojis symbol in push message.
Thanks

Emojis support in Apple push notification的更多相关文章
- Provider Communication with Apple Push Notification Service
This chapter describes the interfaces that providers use for communication with Apple Push Notificat ...
- (转)Apple Push Notification Services in iOS 6 Tutorial: Part 1/2
转自:http://www.raywenderlich.com/32960/apple-push-notification-services-in-ios-6-tutorial-part-1 Upda ...
- 远程通知APNs(Apple Push Notification Server)
推送通知是由应用服务提供商发起的,通过苹果的APNs(Apple Push Notification Server)发送到应用客户端.下面是苹果官方关于推送通知的过程示意图: 推送通知的过程可以分为以 ...
- (转)How to renew your Apple Push Notification Push SSL Certificate
转自:https://blog.serverdensity.com/how-to-renew-your-apple-push-notification-push-ssl-certificate/ It ...
- (转)How to build an Apple Push Notification provider server (tutorial)
转自:https://blog.serverdensity.com/how-to-build-an-apple-push-notification-provider-server-tutorial/ ...
- (转)Apple Push Notification Services in iOS 6 Tutorial: Part 2/2
转自:http://www.raywenderlich.com/32963/apple-push-notification-services-in-ios-6-tutorial-part-2 Upda ...
- (转)在SAE使用Apple Push Notification Service服务开发iOS应用, 实现消息推送
在SAE使用Apple Push Notification Service服务开发iOS应用, 实现消息推送 From: http://saeapns.sinaapp.com/doc.html 1,在 ...
- (转)苹果推送通知服务教程 Apple Push Notification Services Tutorial
本文译自http://www.raywenderlich.com/.原文由iOS教程团队 Matthijs Hollemans 撰写,经原网站管理员授权本博翻译. 在iOS系统,考虑到手机电池电量,应 ...
- 陌陌架构分享 – Apple Push Notification Service
http://blog.latermoon.com/?p=878 先描述下基本概念,标准的iPhone应用是没有后台运行的,要实现实时推送消息到手机,需要借助Apple提供的APNS服务. iPhon ...
随机推荐
- android获取对话框文本注意事项
1.View注意设置成final类型如final View layout=.. . 2.获取文本框对象时候格式EditText e = (EditText)layout.findViewById(R. ...
- man手册查找ascii码和运算符优先级
1.man手册可以输出ascii码表 man ascii 2.man手册还可以输出运算符的优先级 man operator
- 【Android】8.4 让主题自适应不同的Android版本
分类:C#.Android.VS2015: 创建日期:2016-02-17 一.简介 默认情况下,高版本提供的主题不能在低版本的Android系统上运行.但是,通过自定义主题,可以让你的系统自适应各自 ...
- zabbix监控某个普通端口
linux下端口和服务是对应的. 先创建一个模板:configureation-->templates然后点create templates按钮: 如果没有组可以新建个组:app 查看新建的te ...
- read pread write pwrite open
http://stackoverflow.com/questions/7592822/what-are-the-advantages-of-pwrite-and-pread-over-fwrite-a ...
- nonatomic对引用计数的影响(非ARC)
@interfaceAppDelegate() { NSObject * obj_; } @property(retain) NSObject * obj;// 默认是atomic //@proper ...
- 简单的图形学(二)——材质与反射
在上一篇[游戏框架系列]简单的图形学(一)文章中,我们讲述了光线追踪的一个最简单的操作--依每个像素延伸出一条追踪光线,光线打到球上(产生交点),就算出这条线的长度,作为最终的灰度,打不到球上,就显示 ...
- HttpClient 教程 (一)
转自:http://www.cnblogs.com/loveyakamoz/archive/2011/07/21/2112804.html HttpClient 教程 (一) 前言 超文本传输协议 ...
- java.util.logging.Logger使用详解 (转)
http://lavasoft.blog.51cto.com/62575/184492/ ************************************************* java. ...
- mysql utf8mb4 所引起的问题
有一个项目需要存储ios的表情(emoji表情)这种表情虽然是utf8编码,但是一个字符需要占用4个字节,而MySQL utf8编码只能存放3字节的字符.在MySQL 5.6中,可以设置编码为utf8 ...