yackle / CLImageEditor

MIT License
2.21k stars 573 forks source link

Cocoapods Integration #39

Closed FlorianBasso closed 10 years ago

FlorianBasso commented 10 years ago

Hi,

I tried to integrate this library with cocoapods by adding :

pod 'CLImageEditor'

or

pod 'CLImageEditor/AllTools'

in my Podfile but i always get the following error : [!] Invalid Podfile file: /Users/florianbasso/Documents/Developpement/iOS/crossroad_ios/Podfile:4: syntax error, unexpected '~', expecting end-of-input pod 'CLImageEditor/AllTools’, '~> 0.0' ^. Updating CocoaPods might fix the issue.

However when i paste in my Podfile : pod 'CLImageEditor', '~> 0.0' It works the pod is installed but I have a lot of problem with methods undefined, etc...

Do you have any idea how to fix this please ? Thanks and have a nice day :)

yackle commented 10 years ago

I think this error shows the secondly quote on 'CLImageEditor/AllTools’ isn't a correct quote. Please make sure that you are using a ' instead of .

FlorianBasso commented 10 years ago

Yeah sorry i didn't see it :s Anyway the pod is installed but i get the following error :+[CLImageToolInfo toolInfoForToolClass:]: unrecognized selector sent to class 0x1001e1048.

This error occurs in _CLImageEditorViewController.m in the init method. Do i need to add some extra files or modify the existing?

yackle commented 10 years ago

What CLImageEditor's version was installed by pod install?

FlorianBasso commented 10 years ago

The version 0.0.8 was installed : "Installing CLImageEditor (0.0.8)"

yackle commented 10 years ago

Hmm, Is there CLImageToolInfo+Private.m in Pods/CLImageEditor/CLImageEditor/ImageTools/ToolSettings?

FlorianBasso commented 10 years ago

capture decran 2014-04-28 a 18 24 42

I don't have another folder called CLImageEditor. However, i found the file CLImageToolInfo+Private.m in Pods/CLImageEditor/Core

yackle commented 10 years ago

I'm not sure what caused this issue. Could you delete Pods directory, Podfile.lock and *.xcworkspace then retry pod install. Or can you install CLImageEditor to another new project?

FlorianBasso commented 10 years ago

I didn't have much time to create a new project but i delete and reinstall pod but i have the same error : : +[CLImageToolInfo toolInfoForToolClass:]: unrecognized selector sent to class

yackle commented 10 years ago

2014-04-29 19 31 38

Does CLImageToolInfo+Private.m is linked to Pods-CLImageEditor?

FlorianBasso commented 10 years ago

yeah it is, all the files seem linked to Pods - CLImageEditor.

yackle commented 10 years ago

ok next, is there toolInfoForToolClass in CLImageToolInfo+Private.m?

FlorianBasso commented 10 years ago

yeah and the method looks like :

yackle commented 10 years ago

yeah it's correct code, but now, I have lost the way to fix.

Does it happens too in new empty project (only using the image editor)?

FlorianBasso commented 10 years ago

So I create a new project and tried with both : pod 'CLImageEditor and pod 'CLImageEditor/AllTools' and I don't have any issues in the new project. So I don't know what 's the issue in my main project.

yackle commented 10 years ago

are there other pods in your main project? Or, do you have items that you have changed something in the project settings?

FlorianBasso commented 10 years ago

I have AFNetworking and Reachability as other pods. And I have nothing that changed the project settings. However I use update background location but I think it's not correlated.

Here you can see how i used CLImageEditor :

yackle commented 10 years ago

Your code looks like no problem. And I have no idea. So I suggest you to copy current project's files to a new project.