Skip to content
This repository has been archived by the owner on Aug 4, 2019. It is now read-only.

Allow using objcTox as a framework (with use_frameworks! flag in CocoaPods) #169

Open
bucky0970 opened this issue Apr 7, 2017 · 5 comments

Comments

@bucky0970
Copy link

When I add pod 'objcTox' to my exist podfile, It always build fail.

Only if comment the line of "use_frameworks!" will success.

But all other pods is "use_frameworks!", how to do it together?

Sorry for my poor English.

@dvor
Copy link
Member

dvor commented Apr 7, 2017

Hi @bucky0970, unfortunately objcTox doesn't support use_frameworks! option at the moment. This is something that has to be fixed, I was suffering from that myself. :(

For now you have two options:

  • add objcTox manually
  • remove use_frameworks! flag and add other frameworks that require it manually.

Will see if this can be fixed in nearest future.

@dvor dvor changed the title How to implement to exist project? Allow using objcTox as a framework (with use_frameworks! flag in CocoaPods) Apr 7, 2017
@bucky0970
Copy link
Author

bucky0970 commented Apr 11, 2017

  1. pod 'CPAProxy', :git => 'https://github.com/ursachec/CPAProxy.git'

  2. Modify GCDAsyncSocket+CPAProxy.h
    line 9: from @import CocoaAsyncSocket; to #import "GCDAsyncSocket.h"

  3. Set SOCKS Port , in CPAConfiguration.m
    line 137: NSInteger port = (arc4random() % 1000) + 60000; to NSInteger port = 60111; (Whatever you want)

  4. Set SOCKS Proxy, in tox_api.m
    line 74: from tox_options_set_proxy_type(options, TOX_PROXY_TYPE_NONE); to

tox_options_set_proxy_type(options, TOX_PROXY_TYPE_SOCKS5);
tox_options_set_proxy_host(options, "127.0.0.1");
tox_options_set_proxy_port(options, 60111);

Finish~ It seems work well , because when I set a wrong port in tox_api.m, I can't successfully bootstrap.
P.S. Do not forgot run up the proxy.

@dvor
Copy link
Member

dvor commented Apr 11, 2017

Nice, thanks! Original issue about Tor proxy Antidote-for-Tox/Antidote#292

@bucky0970
Copy link
Author

bucky0970 commented Apr 25, 2017

I try to add objctox manually, but can't build. here is my step

  1. drag classes folder. (check copy if needed)
  2. add pod:toxcore,Realm,TPCircularBuffer. (cocoalumberjack already have)

when I build project, it shows 'toxcore/tox.h' file not found with angled include; use quotes instead.
after I change to quotes(in OCTTox+private.h and OCTToxConstants.m), It appear 21 errors...

It's all about crypto_core_api.h, a lot Expected ')'..etc.

If my step wrong to add project?

----UPDATE----
I change toxcore's pod target, in Packaging=>Defines Module=>Yes to No.
It fix the issue. But comes new issue.
I got a lot DDLogCInfo, _DDLogError, _DDLogCWarn .etc undefined symbol.
It look like it doesn't load OCTLogging.h properly...

----UPDATE 2----
It conflict to XMPPFramework, both of pods use cocoalumberJack,
But objctox use 1.9.2, XMPP use 3.4.0.
So that I comment all log in objctox..
And it work properly.

@dvor
Copy link
Member

dvor commented Apr 26, 2017

Thanks for debugging this. It would be nice to make CocoaLumberjack dependency optional and configurable. Probably will do that some day.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants