I’m trying to use gomobile to create iOS bindings for a few functions involving go-libp2p. To test the process, I made this function:
func CreateHostBindingTest(name string) string {
privKey, _, _ := crypto.GenerateKeyPair(crypto.RSA, 2048)
listenAddr, _ := multiaddr.NewMultiaddr("/ip4/0.0.0.0/tcp/0")
host, _ := libp2p.New(
libp2p.ListenAddrs(listenAddr),
libp2p.Identity(privKey),
libp2p.Transport(tcp.NewTCPTransport),
libp2p.EnableAutoRelay(),
)
return host.ID().String()
}
When I run gomobile bind ...
I get an error back that libproc.h was not found. I downloaded libproc.h and libproc.c, but I can’t figure out how to actually use them (on M1 Mac) so gomobile can complete successfully? Has anyone else run into this issue?