Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/mobile/bind: after binding ios framework for go-ipfs it has nothing in it #31655

Closed
mNizhurin opened this issue Apr 24, 2019 · 2 comments
Closed
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Milestone

Comments

@mNizhurin
Copy link

What version of Go are you using (go version)?

$ go version go1.12.4 darwin/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/max/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/max/.go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/opt/go/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/kh/8ts9nvy534b3b0n8fwzpqrwm0000gn/T/go-build592238090=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

go get github.com/ipfs/go-ipfs/cmd/ipfs
go get -d github.com/ipfs/go-ipfs/cmd/ipfs/...
gomobile bind -target=ios github.com/ipfs/go-ipfs

What did you expect to see?

Framework with .h file containing interface for classes, constructors and methods to work with ipfs.

What did you see instead?

As you can see, only IpfsVersion is available:

Ipfs.h:

// Objective-C API for talking to the following Go packages
//
//	github.com/ipfs/go-ipfs
//
// File is generated by gomobile bind. Do not edit.
#ifndef __Ipfs_FRAMEWORK_H__
#define __Ipfs_FRAMEWORK_H__

#include "Ipfs.objc.h"
#include "Universe.objc.h"

#endif

Ipfs.objc.h

// Objective-C API for talking to github.com/ipfs/go-ipfs Go package.
//   gobind -lang=objc github.com/ipfs/go-ipfs
//
// File is generated by gobind. Do not edit.

#ifndef __Ipfs_H__
#define __Ipfs_H__

@import Foundation;
#include "ref.h"
#include "Universe.objc.h"


FOUNDATION_EXPORT NSString* _Nonnull const IpfsApiVersion;
/**
 * CurrentVersionNumber is the current application's version literal
 */
FOUNDATION_EXPORT NSString* _Nonnull const IpfsCurrentVersionNumber;

@interface Ipfs : NSObject
/**
 * CurrentCommit is the current git commit, this is set as a ldflag in the Makefile
 */
+ (NSString* _Nonnull) currentCommit;
+ (void) setCurrentCommit:(NSString* _Nonnull)v;

@end

#endif
@bradfitz bradfitz changed the title [gomobile] after binding ios framework for go-ipfs it has nothing in it. x/mobile/bind: after binding ios framework for go-ipfs it has nothing in it Apr 24, 2019
@gopherbot gopherbot added this to the Unreleased milestone Apr 24, 2019
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Apr 24, 2019
@bradfitz
Copy link
Contributor

/cc @eliasnaur @hyangah

@eliasnaur
Copy link
Contributor

That's all the github.com/ipfs/go-ipfs package contains (according to https://godoc.org/github.com/ipfs/go-ipfs). You have to list all Go packages you want to bind on the gomobile command line.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Projects
None yet
Development

No branches or pull requests

4 participants