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 ...
随机推荐
- 使用PM2管理Node.js集群
介绍 众所周知,Node.js运行在Chrome的JavaScript运行时平台上,我们把该平台优雅地称之为V8引擎.不论是V8引擎,还是之后的Node.js,都是以单线程的方式运行的,因此,在多核心 ...
- 修改npm下载模块的安装位置
默认安装完node.js后会自己安装npm,通过npm下载全局模块默认安装到C:\Users\user\AppData\Roaming目录下,主要有两个文件夹:npm.npm-cache npm:下载 ...
- 每日英语:March Remembers King's Dream
President Barack Obama on Wednesday said the entire world drew strength from the March on Washington ...
- nyoj 504 课程设计
课程设计 时间限制:3000 ms | 内存限制:65535 KB 难度:2 描述 新学期伊始,Gangster 老师又在为如何给学生分配课程设计题目而犯愁,Gangster老师老共有 N 名学生 ...
- Extjs加载本地的一个json文件
<head> <title></title> <link href="../Styles/Extjs/resources/css/ext ...
- Django 笔记(来源于讲师)以及常见问题的解决
写1.Django加载静态文件 1.首先在项目的根目录下,新建static文件夹 2在settings.py中加入这两句话.表明从项目的跟目录找static文件夹 3.在HTML文件中导入{% loa ...
- dp之最长递增、公共子序列总结
1.最长递增子序列模板poj2533(时间复杂度O(n*n)) #include<iostream> #include<stdio.h> #include<string. ...
- js中的extend
js中的extend 1. JS中substring与substr的区别 之前在项目中用到substring方法,因为C#中也有字符串的截取方法Substring方法,当时也没有多想就误以为 ...
- setTimeout解读
看一个简单的例子: for(var i=0; i<4; i++){ setTimeout(function(){console.log(i)}, 0); } 请问下这段代码会输出什么呢? 如果你 ...
- 简单文件系统构建ramdisk
1. BusyBox编译工具,包含bin, sbin, usr, linuxrc. 2. 添加相关重要目录:dev, etc, mnt, proc, sys, lib, var, tmp. ...