ayushgoel / AGEmojiKeyboard

Emoji Keyboard for iOS
MIT License
692 stars 175 forks source link

Empty emoji board #10

Closed samuelbeek closed 8 years ago

samuelbeek commented 8 years ago

First of all, great library!

I implemented the emoji board like this

        let emojiKeyboard = AGEmojiKeyboardView(frame: CGRectMake(0, 0, self.view.frame.size.width, 216), dataSource: self)
        emojiKeyboard.delegate = self
        emojiKeyboard.autoresizingMask = .FlexibleHeight;
        createView.nameField.inputView = emojiKeyboard

But it's empty when I display it.

for all the data source stuff, I used empty images, like this:

    func emojiKeyboardView(emojiKeyboardView: AGEmojiKeyboardView!, imageForSelectedCategory category: AGEmojiKeyboardViewCategoryImage) -> UIImage! {
        return UIImage()
    }

What am I doing wrong? Hope you can help. screen shot 2015-11-05 at 12 07 18

ayushgoel commented 8 years ago

Did you forget to set dataSource for your keyboard?

 emojiKeyboard.dataSource = self;
samuelbeek commented 8 years ago

I already had it in my init function. AGEmojiKeyboardView(frame: CGRectMake(0, 0, self.view.frame.size.width, 216), dataSource: self) I added it separately like you suggested, but unfortunately that didn't help.

Is there anything else that can be wrong?

samuelbeek commented 8 years ago

Allright, did some research and found out that I had to add the EmojisList.plist to the Copy Bundle Resources Build Phase. I think you'd be able to add that in your podspec.

ayushgoel commented 8 years ago

Added the label @samuelbeek . Would pick it up whenever I find time. Thank you :+1:

ayushgoel commented 8 years ago

@samuelbeek Sorry for missing it, but I noticed that the plist is added as a Resource already in the podspec. Could you please check and let me know if you were using the correct version of the pod.

screen shot 2016-05-06 at 10 12 30 pm
alnesic1987 commented 8 years ago

I had similar problem. Just add EmojisList.plist in main target.

ayushgoel commented 8 years ago

@alnesic1987 Are you using cocoapods for integration or doing it manually?

alnesic1987 commented 8 years ago

Using Cocoapods: pod 'AGEmojiKeyboard'

danhhgl commented 8 years ago

@ayushgoel Thank you for a great library! But can you add this instruction into the README page? I took a lot of time for this issue. Thank you once more time!

ayushgoel commented 8 years ago

@alnesic1987 @danhhgl Sorry for the late reply. 🙇🏻 When I use pod 'AGEmojiKeyboard', my EmojisList.plist is added to the pod target automatically. Could you please share a sample project or gist so that I can reproduce this at my end?

danhhgl commented 8 years ago

@ayushgoel I used Cocoapods to get AGEmojiKeboard dependency and opened the workspace in Xcode 7. Then I implemented it and ran the project, but there was no emoji in the keyboard view. So I put EmojisList.plist in my project and it worked correctly. I hope you fix this issue soon.

ayushgoel commented 8 years ago

Hi @danhhgl ,

Can you clone the repository and try this on the Example project provided?

One thing to notice is that the Recents tab is selected by default (which is empty for a new keyboard). Please try and choose a different category and let me know if the emojis still not appear for you.

danhhgl commented 8 years ago

Yes, your example works correctly. But in my own project, it doesn't work if I don't copy EmojisList.plist to the project. I use Swift instead of Objective-C.

ayushgoel commented 8 years ago

Hello, Found the issue! I had fixed the NSBundle used to find the EmojisList.plist (https://github.com/ayushgoel/AGEmojiKeyboard/commit/2e2cb2c58afa2adb16e8a0f6a5603bed045899ee), but hadn't released a new version for it. Have uploaded a new version 0.2.1 which should fix this. Thank you all for reporting this! ❤️