Apple's emoji aren't encoded as normal characters do. They are in fact some PNG-like images embedded in some proprietary table in the AppleEmoji font. There is no reason to ever expect support of this Apple(tm) feature in XeLaTeX.
You might try to google if someone has found a way to export the smileys as separate images and import them in your document.
Or you might try an alternative based on other fonts that properly encode the characters as vector glyphs.
[the answer for pdflatex β below, first the answer IMHO best in the long run]
As I see in the first result of "g sharelatex", it's an online LaTeX editor. But what is the TeX engine it uses? Is XeTeX/XeLaTeX available in it?
That's worth clarifying, because if so, then the best solution would be to use XeLaTeX and just type the desired characters as they are, probably switching to a font that contains them. In such a case, the [relevant piece of] preamble would look like:
\documentclass{article}
\usepackage{xltxtra}
\newfontface\emojiFont {Some-Font-with-emoji-etc}
% if the main font doesn't contain those characters, add:
\catcode `\α=\active
\protected\def α{\leavevmode{\emojiFont α}}
\catcode `\π=\active
\protected\def π{\leavevmode{\emojiFont π}}
\begin{document}
α
π
\end{document}
However, if there's only some ancient pre-Unicode TeX engine available, and you really really really do not want to, or really really really cannot switch to XeTeX/XeLaTeX or LuaTeX/LuaLaTeX and avoid further Unicode-related troubles in the future, then:
[the pdflatex answer]
\documentclass{article}
\usepackage[utf8]{inputenc}
\DeclareUnicodeCharacter {168A} {\combUp}
\DeclareUnicodeCharacter {1F55A} {\clockTen}
\protected\def \combUp {<<Comb-UP, U+168A>>}
\protected\def \clockTen {<<Clock Ten, U+1F55A>>}
\begin{document}
α
π
\end{document}
Of course, you should define those \combUp
and \clockTen
to typeset respective char from a font that contains it. The definitions have to be robust, be it via the \protected
primitive, or via LaTeX \DeclareRobustCommand
(the latter is more tricky and robust only in the βrobustedβ LaTeX contexts).
Best Answer
In the end, I used:
where 1F44F and 270C are the emojis that I wanted to include uploaded as pdf files.
Hope this will help someone else also.