Closed ejsarge closed 7 years ago
The combination of Cocoapods and Objective-C works, but I'm not sure about Swift and Cocoapods.
I'm currently using CocoaImageHashing in a large macOS project (100% Swift) through Carthage and it works just fine.
Any update on this? I have the following problem trying to use the library in Swift: http://stackoverflow.com/questions/42394692/swift-use-of-undeclared-type-for-objective-c-library?noredirect=1#comment71937205_42394692
-- update: solved the issue. Cocoapods does not install this library correctly in Xcode 8.2. At Target level, in Build Settings -> Search Paths -> Header Search Paths: there is a path generated by Cocoapods that does not correspond to any actual folder structure: "${PODS_ROOT}/Headers/Public/CocoaImageHashing" when the /Headers/Public structure does not exist. I removed that and remained with ${PODS_ROOT}/CocoaImageHashing , corresponding to the folder Projectname/Pods/Pods-Projectname.debug.xcconfig and now the library was seen. as an aside, the #import <CocoaImageHashing/CocoaImageHashing.h> is imported inside the Bridging Header file.
@ameingast Thanks. I tried Carthage and I, too, found it worked just fine too. Perhaps I might suggest the installation instructions in the Readme be updated to include Carthage instructions? This is especially for people new to Swift who don't know the build tool options and just blindly follow what the library says...
The hashing worked great, btw.
The documentation was updated by @sarah-j-smith.
I'm closing this for now. If there's any more trouble with Swift + Cocoapods, please open another issue.
Great looking library - I think it would solve a problem I have very well.
I'm trying to use it from Swift and I can't get it to link. (I normally program in another language so I don't know what I'm doing here.) I followed the instructions to install CocoaPods and add this library. I also added CocoaImageHashing to the Linked Frameworks and Libraries.
When I attempt to run the default Hello World swift I get
If I remove the use_frameworks! from the Podfile I get
My Podfile
Many thanks for any help or documentation updates you might provide.