I am working on an iPhone application called "INTERSTIZIO". In this, I implemented features such as chat between users. This user can send text, location, and text using the emojis character. If the application is not in open mode at the end of the receiver, then a push is generated from the backend and displayed on the receiver. I can display the message in push as "UserName: Hello ...", but I also want to display the emojis character, for example, "UserName: Hay :)" in the push message, so that anyone has an idea on how I can achieve of this type of push message using emojis code (for example, is there a smile for the apple code?)?
I followed the solution given in this link: http://code.iamcal.com/php/emoji/ But it returns the same code that I passed in the function. It works great on web pages, but not in a push message.
Here I attach one screenshot as it looks at my end. In it, you can see that I displayed a smiley and a lighting symbol, but it was displayed using HTML code, as shown below in the PHP script code:
$lightning = html_entity_decode('',ENT_NOQUOTES,'UTF-8');
But in my case, I displayed the built-in emojis keyboard from apple and using the code below, I can get the 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 the above code, I can store and display emojis in the chat window, but if the recipient user closed the application, then in the push message I can not display the emojis symbol in the push message.
thanks

php ios iphone notifications apple-push-notifications
M007
source share