iCepa/Tor.framework

Add Cocoapods integration

Closed this issue ยท 9 comments

Guys, please add Cocoapods integration ๐Ÿ™
I have a project on Cocoapods and I cannot integrate your framework :(

Thx!

Ah. @tladesignz: I think when Tor.framework was first being put together it wasn't possible? (Tor has to be built as a static framework and can't be a dynamic library due to the way we compile the already-existing tor binary in, and CocoaPods support for that was iffy, I think. But looks fixed now?)

CocoaPods/CocoaPods#6651

CocoaPods/CocoaPods#6772

CocoaPods/CocoaPods#6811

Maybe. This is just a guess since I'm having trouble remembering.

How can I manually add a framework to a project without using a Carthage? Thx ๐Ÿ˜‰

Oh, that's easy: Use a "Workspace" for your project. If you're using CocoaPods in your project, you're already doing that. If not, create one with File -> New -> Workspace....

Drag and drop the Tor.framework's Tor.xcodeproj folder into your workspace, next to your app' and the Pods project in the "Project navigator" side panel of Xcode.

@tladesignz I already tried and always get the following error:
ld: framework not found Tor
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Ah. You also need to drag-and-drop the Tor.framework file found in the Products folder of the Tor.framework project into your app's Linked Frameworks and Libraries section in the General tab of all targets you want to use it in. (The huge configuration form you get, when you click on the project root in the project navigator.)

@tladesignz do you have an example of such a project on Swift? since I get various file linking errors

Thx! ๐Ÿ™

Unfortunately not. I use that technique when I develop on OnionBrowser and Tor.framework simultaniously... You can run Carthage and CocoaPods alongside, though. It's annoying, but you'll get over it... ;-)

I have experience with cocoapods and just build via carthage, upload framework and dsym in zip and release podspec.

Example:
ss-abramchuk/OpenVPNAdapter#78