Quantcast
Channel: 應用教學 – Hiraku Dev
Viewing all articles
Browse latest Browse all 94

iOS 13.1.1 Banned Taiwan (ROC) Flag Emoji for HongKong and Macau Users

$
0
0

The Taiwanese (Republic of China) flag emoji “🇹🇼 ” is banned for China users for a long time. This feature even caused a bug on iOS 11.4 and below. However, users live in Hong Kong found that since iOS 13.1.1, Apple banned Taiwanese (ROC) flag in iOS emoji keyboard.

▼ Hong Kong users discussed about Taiwanese (ROC) flag can’t be accessed in emoji keyboard. They must type “Taiwan” in English keyboard and then choose the flag in prediction candidates.

 

Since I am an iOS reverse engineering developer, let’s compare the code between iOS 13 and iOS 13.2 beta.

(Because it’s more convenient for me to get iOS 13.2 beta than iOS 13.1.1…)

After some researches, I found that EmojiFoundation.framework is my target. And I found this class and method:

@interface EMFEmojiCategory : NSObject
+ (id)computeEmojiFlagsSortedByLanguage
@end

Hmm, this function looks like something related with flags. So I tried to decompile this function.

For iOS 13.0:

+ (id)computeEmojiFlagsSortedByLanguage 
{
    NSMutableArray *array = [NSMutableArray arrayWithArray:[EMFEmojiCategory flagEmojiCountryCodesCommon」; //Get flag emojis of most countries 
    NSString *regionCode = _EMFGetDeviceRegionCode(); //Get the device region (hardware)
    
    if (![regionCode isEqualToString:@"CH"])  //If the device is not China model, then continue
    {
        NSString *locale = [[NSLocale currentLocale] objectForKey: NSLocaleCountryCode]; //Get the device local settings (software)
        if (![locale isEqualToString:@"CN"]) //If the device region is not set to China, then continue
        {
            [array addObject:@"TW"]; //All check passed, now adding TW (Taiwanese) flag to emoji keyboard.
        }
    }
//... The following code is not important for this case.
}

However, this function changes on iOS 13.2 beta (actually it changed since iOS 13.1.1)

+ (id)computeEmojiFlagsSortedByLanguage 
{
    NSMutableArray *array = [NSMutableArray arrayWithArray:[EMFEmojiCategory flagEmojiCountryCodesCommon」; //Get flag emojis of most countries 
    NSString *regionCode = _EMFGetDeviceRegionCode(); //Get the device region (hardware)

    if (![regionCode isEqualToString:@"CH"] && ![regionCode isEqualToString:@"ZA"])  //If the device is not China/Hongkong model, then continue
    {
        NSString *locale = [[NSLocale currentLocale] objectForKey: NSLocaleCountryCode]; //Get the device local settings (software)
        if (![locale isEqualToString:@"CN"] && ![locale isEqualToString:@"MO"] && ![locale isEqualToString:@"HK"]) //If the device region is not set to China or Hong Kong or Macau, then continue
        {
            [array addObject:@"TW"]; //All check passed, now adding TW (Taiwanese) flag to emoji keyboard.
        }
    }
//... The following code is not important for this case.
}

From the code above, we can see two significant changes:

  1. From iOS 13.1.1, the device models with “ZA” region do not add Taiwanese (ROC) flag to emoji list.
  2. From iOS 13.1.1, if you have a device with any region, but set your region to Hong Kong or Macau, iOS does not add Taiwanese (ROC) flag to emoji list.

The region code “ZA” is the model region of Hong Kong since iPhone XS / XR. Before iPhone XS, the region code of Hong Kong  is “ZP”. This means that all Hong Kong devices since iPhone XS / XR with iOS 13.1.1 or above don’t show Taiwanese (ROC) flag in Emoji keyboard anymore, and there’s no workaround to pass this restriction.

On the other hand, devices in other regions can add this restriction with software settings. If you want to try, just change your iOS 13.1.1+ device region to Hong Kong, and make sure that the interface language is not set to “Traditional Chinese (Taiwan)”, and then you can find that the Taiwanese flag is missing in Emoji keyboard.

Fortunately (?), these devices can still input the “🇹🇼” flag by typing “Taiwan” in English, and choose the flag in prediction candidates. And of course, unlike China models, this Emoji still can display on Hong Kong / Macau devices. However, we don’t know whether Apple will be more restricted for showing Taiwanese (ROC) flag in Hong Kong and Macau. ಠ_ಠ

 

這篇文章 iOS 13.1.1 Banned Taiwan (ROC) Flag Emoji for HongKong and Macau Users 最早出現於 Hiraku Dev


Viewing all articles
Browse latest Browse all 94

Trending Articles