eycorsican / go-tun2socks

A tun2socks implementation written in Go.
MIT License
1.31k stars 434 forks source link

如何编译在IOS里使用的framework? #12

Closed ameue closed 5 years ago

ameue commented 6 years ago

用gomobile bind --target=ios github.com/eycorsican/go-tun2socks/tun/ 感觉不对,是个空framework。应该怎样正确的编译呢? 看了这个https://github.com/eycorsican/go-tun2socks/issues/8#issue-375416238 后面都在说内存了。

eycorsican commented 6 years ago

参考:https://github.com/eycorsican/go-tun2socks-ios

ameue commented 6 years ago

make文件加上ios/arm64后,编译出armv7 arm64库,但是在iPhone 5这样的设备上只要把包添加到工程,不import的情况,PacketTunnel都运行不起来

eycorsican commented 6 years ago

能提供相关的错误信息吗?

ameue commented 5 years ago

lipo -info Tun2socks.framework/Tun2socks 查看了下framework的指令集 Architectures in the fat file: Tun2socks.framework/Tun2socks are: armv7 arm64

caobug commented 5 years ago

之前弄过overture但不支持bitcode,不知现在支持了吗?

ameue commented 5 years ago

Mac控制台输出: assigning plug-in x.PacketTunnel(1.0.0) to plugin sandbox enabling pid=1018 for plug-in x.PacketTunnel(1.0.0) 73FC5485-52BC-4C31-A366-7C6397E9A0D6 /private/var/mobile/Containers/Bundle/Application/2DB4BAD1-61EF-412C-9C90-146571431CF6/test.app/PlugIns/PacketTunnel.appex plugin x.PacketTunnel interrupted Hub connection error Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named x.PacketTunnel" UserInfo={NSDebugDescription=connection to service named x.PacketTunnel} Failed to start extension x.PacketTunnel: Error Domain=NSCocoaErrorDomain Code=4097 "connection to service named x.PacketTunnel" UserInfo={NSDebugDescription=connection to service named x.PacketTunnel}