
iPhone crashing bug likely caused by code added to appease Chinese government - bangonkeyboard
https://arstechnica.com/information-technology/2018/07/iphone-crashing-bug-likely-caused-by-code-added-to-appease-chinese-govt/
======
dang
The original blog post is [https://objective-
see.com/blog/blog_0x34.html](https://objective-see.com/blog/blog_0x34.html)
and has more technical information.

------
parliament32
I thought Apple was supposed to be the great government-resistant pro-user-
rights stronghold.

Why is this code even present on US devices? Is the word "Taiwan" such a bad
word in China that, instead of some reasonable action, it crashes the OS? Is
the Chinese government so upset about Taiwan they're insisting manufacturers
hide the flag from the keyboard?

All aspects of this are mind-boggling.

~~~
ubernostrum
As others noted, it appears Apple was attempting to keep the Taiwan flag emoji
(🇹🇼) out of the emoji keyboard depending on localization settings.

This is a well-known cost of being able to do business in China; the version
of your product for sale/use in the PRC cannot in any way acknowledge the
existence of Taiwan/ROC as a separate entity. Most vendors simply have
localization switches which hide/re-label Taiwan in location selectors, use
some icon other than the flag to let users select the zh-TW localization, re-
label any displayed maps, etc.

IIRC Microsoft got in trouble years and years ago for a mistake in code they
shipped, which accidentally displayed either "Taiwan" or the flag in a build
of software for use in the PRC.

This has been the case for many, many years. Most HN readers probably just
don't deal often enough with localization issues to realize how politically
sensitive they can be, and how easily even a small misstep can get you in
trouble with a government.

~~~
derefr
Can you list "Taiwan" as an entry if you don't really care about countries per
se, but are just making a big list of states/provinces/territories/other small
"cultural" boundaries? Whether or not Taiwan is a country, and whether or not
Taiwanese is a language, Taiwan is certainly a _place_ , containing a number
of people; and those people certainly speak a _mutually-unintelligible
dialect_ of Chinese.

Could I get away with listing "Cultures" and "Dialects" rather than
"Countries" and "Languages"?

~~~
ubernostrum
Some things seem to get away with "Taiwan, Province of China".

~~~
gurkendoktor
Oh, thanks for mentioning this. This phrasing is mostly a rookie developer
trap!

We're all so used to ISO standards that we assume they are politically
neutral. That's why everyone starts their weekend project with the ISO 3166
country list that includes "Taiwan, Province of China" [1] [2] [3].

 _This list is crap._ It follows UN country names, and the UN is not a neutral
entity. It isn't even logical that "Hong Kong" can stand on its own in the
list, but Taiwan has to be suffixed with "Province of China". As far as I
know, no major website uses this list unmodified. (The airlines that recently
bowed to PRC pressure now call it "Taiwan, China").

If you see the "Province of China" label on a website, you should refer its
developer to the Unicode CLDR data:
[http://cldr.unicode.org/index](http://cldr.unicode.org/index)

The CLDR data is the actual industry standard, and tries to be as neutral as
possible.

[1]
[https://github.com/rails/country_select](https://github.com/rails/country_select)
[2] [https://gist.github.com/DHS/1340150](https://gist.github.com/DHS/1340150)
[3] [https://pypi.org/project/django-
countries/](https://pypi.org/project/django-countries/)

------
koops
Sure, companies have to adapt to markets. But inserting code like this, buggy
or not, is a cowardly act by Apple. They should be ashamed, and apologize.

~~~
rrggrr
I'm having a hard time understanding what is cowardly about complying with
Chinese law when selling products inside China. There are many laws in the US
I don't agree with, but I'm obligated to comply with them for as long as I
choose to live here and remain a citizen. For example, its essentially US law
that Apple's officers have a fiduciary responsibility to shareholder's best
interests. Not participating in the Chinese cellular market over principle
violates that principal of law. If you want Apple to be "brave" then persuade
the US Congress to require that Apple not comply with repressive Chinese law;
or convince Apple's shareholders to prohibit the same. Short of those outcomes
Apple is doing precisely what its supposed to be doing.

~~~
wyuenho
> Apple is doing precisely what its supposed to be doing.

Such as aidding and abetting authoritarian foreign governments to suppress
freedom of speech.

I'm having a hard time understanding why you are having a hard time
understanding why this is cowardly, given that Apple is not particularly
cowardly when it decided to stand up to US government surveillance.

~~~
adventured
> Such as aidding and abetting authoritarian foreign governments to suppress
> freedom of speech.

Over half of all countries have few to no protections on freedom of speech. Is
your premise that Apple should only sell its products in about four dozen
countries? If we wanted to be really strict about it, only a few nations have
strong protections on freedom of speech.

You are aware of just how bad the individual liberty protections are in the
bottom 100+ countries, right? Freedom of speech protections are rare, and it's
even more rare for them to be regularly enforced.

Major countries as diverse as Turkey, Singapore, Thailand, China, Russia,
Venezuela, Sudan, Libya, Iran, Iraq, Saudi Arabia - have no or very little
freedom of speech. The bottom 40-50 nations on human rights barely have any
actively enforced rights protections at all.

~~~
tonylinn80
As a regular Chinese citizen, freedom of speech is at the bottom of list of
things I care about, and I would happily sell that for profit if it is sell-
able.

I lived in US for quite some time and travel to US regularly. But seriously, I
feel much less safe or comfortable when I am in US, and a lot of things
Americans care so much about doesn't mean anything

~~~
g-b-r
Wow, I would've never thought that being raised in a decades-old dictatorship
could effect one's world view...

Also, makes you wonder if China's censorship might play any role in this lack
of interest in discussing things... Heck, maybe they're not so stupid these
Chinese rulers! But of course that's only for the best interest of the Chinese
citizens, right, dear Chinese citizen?

------
dep_b
Getting out of China is a move by Google I still admire. Perhaps “the old
Google” but they never reversed that decision for the shareholders.

~~~
earenndil
I thought they moved out because they were having difficulty getting
penetration?

~~~
brisance
Upvoted you. Google is still operating in Hong Kong, which is part of China.

------
ramblerman
Countries like Saudi and UAE have 'similar' software requests. Frequently they
will request any map software either blanks out or overwrites Israel.

------
JudasGoat
Because of Apple's kowtow to China, human beings will be imprisoned, tortured,
and executed from information gleaned from Apple devices. Not just common
criminals but political and religous dissidents. I would imagine the other
cell phone choices available are just as bad, but does that make it ethical to
be part of CCP's surveilance?

------
Apocryphon
They didn't even bother to swap the Taiwanese flag emoji with a custom one of
the Chinese Taipei flag:

[https://en.wikipedia.org/wiki/Chinese_Taipei](https://en.wikipedia.org/wiki/Chinese_Taipei)

------
sofaofthedamned
So hang on a bit here - i'm not an Apple fan, don't use their phones, ditched
my MacBook etc.

But this crash is a bit convenient. It smells to me like a teenager complying
with the letter of the rules. Their QA, although awful recently, surely would
have picked up this crash?

So maybe Apple deliberately made the code crap to telegraph the fact they'd
been coerced into writing the code? Assuming they'd been told by PRC to not
give specifics of what they had to comply with?

~~~
hyder_m29
Knowing fully that they would be heavily criticized for complying? I think
not.

If Apple wanted the world to know, they would simply release a statement.

------
mankash666
Apple is generally full of shit. They'll refuse to unlock a terrorist's phone
in the US but will get on all fours for the Chinese government's absurdly
unreasonable requests.

And they'll gladly throw users privacy under the bus in China by forking over
iCloud China to a government backed/owned cloud.

The next time they pretend moral superiority over some obviously inane topic,
like protecting a terrorist, best get a supeona from China.

------
wmblaettler
Reminds me of a method found in the SharePoint SDK called HideTaiwan() [1]

[1] [https://docs.microsoft.com/en-us/previous-
versions/office/de...](https://docs.microsoft.com/en-us/previous-
versions/office/developer/sharepoint-services/ms441219\(v=office.12\))

------
beebmam
Cooperating with China is cooperating with authoritarianism and human rights
abuses.

~~~
debracollain
So much bullshit. As a Chinese citizen that lived in America for a long time,
I found US government being so much worse than China.

~~~
lucb1e
I'm curious because I don't know a lot about China (other than what Western
media reports, which is colored): what was worse in the USA compared to China
in terms of government, oppression, etc.?

(I am not from the USA by the way, so don't worry about offending me or
anything!)

------
andy-x
As a bonus Apple should add a bug that crashes US-region messenger every time
someone types Trump or reads Trump's tweets :)

------
bowmessage
> (his friend’s phone specified the region as the US and the language as
> English, followed by Chinese.)

I use the Chinese keyboard as a _very_ rudimentary Mandarin speaker. Does this
mean the Chinese government was still getting information on my chat history
even though I'm a US citizen?!

~~~
toyg
it's not a keylogger -- it's a simple "if" branch to hide the Taiwan flag from
the emoji set.

~~~
Shivetya
do they hide offensive emoji's in other countries? would the hide the Israeli
flag for phones sold in Middle Eastern countries? I would love to find a
published list of what Apple does censor to accommodate specific country or
regional issues.

~~~
bangonkeyboard
Apple Music literally disappeared scenes and mentions of Palestine from a Vic
Mensa music video and interview.

"You got, like, Charlottesville, you have scenes in Palestine, Standing Rock,"
[0] was edited to, "You got, like, Charlottesville, you have...Standing Rock."
[1]

[0]
[https://itunes.apple.com/us/post/sa.e79e61c0-f89d-11e7-8829-...](https://itunes.apple.com/us/post/sa.e79e61c0-f89d-11e7-8829-d320c2561bfe)

[1]
[https://twitter.com/Beats1/status/952952704564838400](https://twitter.com/Beats1/status/952952704564838400)

~~~
Cyph0n
Now that's plain weird. I mean, I kind of get why Apple pulled the Taiwanese
flag from the emoji set (Foxconn etc.), but what kind of pressure does Israel
have on Apple?

~~~
toyg
You are looking at it from a leverage perspective, but this is about PR.

