Is there a lightweight method to check if emoji is supported in iOS

0 votes

I'm gonna implement a emoji picker supporting Emoji List, v14.0, which could show only compatible emojis, but I don't know how to check if specific emoji is compatible on current iOS version. There are several ways I found:

  1. Render to PNG and compare it with default PNG (see https://stackoverflow.com/a/41393387/7484856), which might be CPU-intensive.
  2. Ask CTFontGetGlyphsForCharacters to check if current emoji could be supported (see https://stackoverflow.com/a/39606543/7484856), which seems good, but it fails to check emoji consists of two or more emojis. For example, 😮‍💨 = (😮 U+1F62E U+200D 💨 U+1F4A8), which is actually not supported on iOS 13, but CTFontGetGlyphsForCharacters still returns true because it could be represented as 😮💨.
  3. Persist emoji list to several .plist files for each iOS version, which requires some effort to maintain a lot of emoji lists
Nov 22, 2022 in Mobile Development by gaurav
• 23,260 points
360 views

1 answer to this question.

0 votes

You can easily override theme by wrapping your view into a new Theme instance with custom properties.

You could do the following :

return new MaterialApp(
  // default theme here
  theme: new ThemeData(),
  builder: (context, child) {
    final defaultTheme = Theme.of(context);
    if (defaultTheme.platform == TargetPlatform.iOS) {
      return new Theme(
        data: defaultTheme.copyWith(
          primaryColor: Colors.purple
        ),
        child: child,
      );
    }
    return child;
  }
);

Which would specify a default theme. And then override primaryColor for IOS.

answered Dec 12, 2022 by gaurav
• 23,260 points

Related Questions In Mobile Development

0 votes
0 answers

How to fetch the width and height of a programatically added view in Swift/ iOS?

I have added a UIView and a ...READ MORE

Nov 10, 2022 in Mobile Development by gaurav
• 23,260 points
775 views
0 votes
0 answers

Xamarin iOS: Check if Google fit app is installed on the device

Is there any way to check if ...READ MORE

Nov 17, 2022 in Mobile Development by gaurav
• 23,260 points
364 views
0 votes
0 answers

Is it possible to open my iOS app from instagram through a deeplink?

I do have a professional Instagram account ...READ MORE

Nov 17, 2022 in Mobile Development by gaurav
• 23,260 points
446 views
0 votes
0 answers

Change English Number To Persian Numbers in Text Swift,IOS

Hi How can i replace english numbers ...READ MORE

Nov 8, 2022 in Mobile Development by gaurav
• 23,260 points
243 views
0 votes
0 answers

Convert Apple Emoji (String) to UIImage

I require every Apple Emoji. I can copy ...READ MORE

Sep 22, 2022 in IOS by Soham
• 9,700 points
427 views
0 votes
1 answer

Get User Group in Swift using AWS Cognito

The groups are exposed in the ID ...READ MORE

answered Nov 12, 2018 in AWS by Priyaj
• 58,090 points
1,359 views
0 votes
1 answer

URL Scheme for iOS Home App

I think you could try doing it ...READ MORE

answered Nov 16, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
964 views
0 votes
1 answer

iOS App : Porting Code to App

If you make a post, missing parameters ...READ MORE

answered Jan 18, 2019 in IoT (Internet of Things) by Shubham
• 13,490 points
440 views
0 votes
1 answer

Is there any library to implement twitter web view login dialog in iOS

Solution to your problem is to implement ...READ MORE

answered Dec 15, 2022 in Mobile Development by gaurav
• 23,260 points
289 views
0 votes
1 answer

Flutter project in iOS emulator takes forever to run, but its worked on Android emulator

Try flutter clean and flutter build ios ...READ MORE

answered Nov 18, 2022 in Mobile Development by gaurav
• 23,260 points
409 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP