isaced / ISEmojiView

Emoji Keyboard for iOS
MIT License
522 stars 119 forks source link

Disable list of emoji #3

Closed floriangbh closed 7 years ago

floriangbh commented 7 years ago

Hello !

Thank you for this library ! 👍 It is possible to not show somes emoji ? (because some emoji can't be read on Android..)

Thank you, Florian

isaced commented 7 years ago

@terflogag Thanks for your issue, I think this is a necessary enhancement ( emoji list configurable ), currently, ISEmojiView will automatically read the list of pre-defined emoji from ISEmojiList.plist in bundle.

for temporary, You can fork this project, and modify the file ISEmojiList.plist directly, to config emoji list.

Do you have any idea about code?

floriangbh commented 7 years ago

Thank you for your response !

I don't know what is the best. On Android there are a lot of OS version... So I can make a PR with another plist file with only the compatible smiles and set flag for android compatibility. Like that :

let emojiView = ISEmojiView()
emojiView.delegate.setAndroidCompatibility = true // false by default
emojiView.delegate = self

If the flag is set to true, ISEmojiAndroidCompatibilityList.plist is loaded. If the flag is set to false, ISEmojiList.plist is loaded.

What do you think about it ?

isaced commented 7 years ago

How do you ensure that your emoji list is compatible with all Android systems?

I think as a good design of the keyboard library, it should abstract more, like emoji list custom, let the user to configure their own emoji list. looks like this:

let emojis: [[String]] = ... // read from file or other
let emojiView = ISEmojiView(emojis)

What do you think?

floriangbh commented 7 years ago

There are different version of emoji (based on unicode I believe: http://emojipedia.org), and each Android version supporting or not supporting some version. So I will take a version (for exemple Android Jelly Bean) and add only the emoji which are supported since this version...

Yes this is the better way ! But with optional param :

let emojis: [[String]] = ... // read from file or other
let emojiView = ISEmojiView(emojis) // Load custom

// OR 

let emojiView = ISEmojiView()  // Load default ISEmojiList.plist
isaced commented 7 years ago

for ISEmojiList.plist, I think we should use a compatible version by default.

Later I will add a constructor and update here.

isaced commented 7 years ago

mission completed! https://github.com/isaced/ISEmojiView/commit/078f72202dd0e13317ce2be6cfac31c56446ddcc

floriangbh commented 7 years ago

Cool thank you ! I will make the next week a file with Android/iOS emojis compatibility. I can make a PR with it when it's done if you want ?

isaced commented 7 years ago

I have released a new version and updated Cocoapods. (0.0.4)

isaced commented 7 years ago

Very much welcome your PR. I think we should open a new issue for this. ;]

floriangbh commented 7 years ago

I will open new issue asap when I have more information about the minimum Android version. I think Jelly Bean is the good one, but I need to see with the other Android dev :)

floriangbh commented 7 years ago

Finally the current emoji file doesn't contain the last emoji, then almost all of the emoji are compliant with old Android :-)

isaced commented 7 years ago

Congratulations! Welcome to share your emoji list file!