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

First version (reworked) #16

Merged
merged 80 commits into from
Jan 21, 2020
Merged
Show file tree
Hide file tree
Changes from 77 commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
d91426f
feat(mobile): Add base mobile ipfs node
gfanton Aug 5, 2019
1daa641
feat(test): Add mobile test
gfanton Aug 6, 2019
485e7d5
chore(lint): cleanup
gfanton Aug 8, 2019
df8188b
feat(react): Add react native example for android
gfanton Sep 10, 2019
8f9a812
build: go1.13
moul Sep 11, 2019
06b102a
fix: updated and fixed go mod + tidy
aeddi Sep 11, 2019
047addf
fix: quick & dirty fix for functions with multiple return on Darwin
aeddi Sep 11, 2019
6dfeb4e
chore: update go.mod
aeddi Sep 17, 2019
2d7cbc6
chore: add ios build output to gitignore
aeddi Sep 17, 2019
3425cf4
refactor: init a clean react-native project
aeddi Sep 17, 2019
05a09ed
refactor: remove interfaces and replace struct return by double return
gfanton Sep 17, 2019
6b08685
feat(ios): Add ipfs bridge on ios
gfanton Sep 17, 2019
dfd6cbf
fix: fixes xerrors modules import with go 1.13 + tidy
aeddi Sep 17, 2019
e15648f
fix: fixes tests post-refactor
aeddi Sep 17, 2019
e43d03c
fix: build ios in release mode
aeddi Sep 18, 2019
281c7b4
feat: add Makefile and implem build commands
aeddi Sep 18, 2019
1a1d97f
chore: restore android bridge after refactor
aeddi Sep 18, 2019
308b79e
style: add ipfs icon / splashscreen and rename app
aeddi Sep 18, 2019
9f9cdef
fix(node): bootstrap peers on new node
gfanton Sep 18, 2019
c383afb
style: add editorconfig rules and fix according errors
aeddi Sep 18, 2019
709a6a4
feat(node): Use random port for api
gfanton Sep 18, 2019
e165d6e
fix: multiple bug and typo fixes: android, ios, js, etc
aeddi Sep 18, 2019
e8d4469
fix: rollback to go 1.12 because 1.13 causes go mod errors
aeddi Sep 19, 2019
a2d211d
fix: update android network security in release mode
aeddi Sep 19, 2019
2571805
docs: update main README and add IPFS dual licence
aeddi Sep 19, 2019
dff1827
docs: add README and package.json license in example
aeddi Sep 19, 2019
2400394
fix(ios): Fix ios getApiAddrs method
gfanton Sep 19, 2019
d032373
fix(api): Don't use wildcard for 'Access-Control-Allow-Origin'
gfanton Sep 25, 2019
ffb051e
feat(api): handle unix socket domain
gfanton Sep 26, 2019
ce3415d
refactor: wip edit dir tree accordingly to proposal
aeddi Oct 30, 2019
e3af32d
fix: tmp fix for gomobile build
aeddi Oct 30, 2019
a04a9ee
WIP: create pod lib
gfanton Oct 30, 2019
2b2dda0
WIP: feat(ios): Add GomobileIPFS pod lib
gfanton Nov 4, 2019
ee57dd3
feat: basic implemen of android example app
aeddi Oct 30, 2019
4479da1
fix: go test wrong path
aeddi Oct 30, 2019
334fa13
feat: setup android local/remote dependency retrieval and version number
aeddi Nov 7, 2019
9ac5709
refactor: remove useless signal catcher goroutine
aeddi Nov 7, 2019
9d82641
WIP: Add repo, node, config class
gfanton Nov 7, 2019
aef1689
feat: implement Android IPFS class
aeddi Nov 12, 2019
05e2672
feat(ios): create base classes for ios
gfanton Nov 8, 2019
9729af3
feat: adapt demo application to new Android bridge
aeddi Nov 13, 2019
65d5a88
feat: clean Android: access, typo, asyncTask in activity, etc
aeddi Nov 13, 2019
714f38d
feat: add repo in-memory lock for NewNode / node.Close()
aeddi Nov 13, 2019
c6b632f
feat: clean Android: access, typo, asyncTask in activity, etc
aeddi Nov 13, 2019
29de656
feat: add repo in-memory lock for NewNode / node.Close()
aeddi Nov 13, 2019
f0f6a52
feat: add variable for additionnal go package in Makefile
aeddi Nov 18, 2019
3388954
fix: few fixes and refactor so Android and iOS package API are identical
aeddi Nov 18, 2019
2c16356
feat: wip basic sockmanager (untested/unbridged)
aeddi Nov 18, 2019
8499ea7
WIP: restruct go folder
gfanton Nov 19, 2019
6a83055
fix: fix sock file creation
aeddi Nov 19, 2019
eef3564
fix(sock): Add static var for sockmanager
gfanton Nov 20, 2019
efd89fb
fix: refactor swift API + few fixes on socket manager
aeddi Nov 20, 2019
826605a
refactor: adapt Java to golang changes
aeddi Nov 20, 2019
106c14e
fix: fix iOS demo application
aeddi Nov 21, 2019
3e4f7ef
feat(ipfs): use tcp shell on simulator
gfanton Nov 21, 2019
a9c7cb9
fix(ios): enable tcp shell on ios simulator only
gfanton Nov 21, 2019
b15261d
feat: better swift error
aeddi Nov 22, 2019
4304e27
feat: improve Android example app
aeddi Nov 22, 2019
9196d8b
fix: temporary lower minimum RSA key length to allows bootstrap to work
aeddi Nov 24, 2019
eb08c5a
feat: improve iOS example app
aeddi Nov 24, 2019
36be92c
chore: indicate that the RN example is obsolete
aeddi Nov 24, 2019
c91e439
fix(ios): Fix peer counter
gfanton Nov 25, 2019
7f66a19
fix(test): remove convey & update test
gfanton Nov 30, 2019
3b75ba0
feat(go): Update to go 1.13
gfanton Dec 20, 2019
c6198c3
feat(mod): update to ipfs last commit
gfanton Jan 4, 2020
b2f7611
feat(go): Add send command to shell
gfanton Jan 14, 2020
ebc2ccc
feat(ios): Replace commands methods by RequestBuilder
gfanton Jan 14, 2020
c9d2b5a
chore(go): cleanup
gfanton Jan 14, 2020
3d19c65
feat(android): Replace command method by RequestBuilder
gfanton Jan 14, 2020
781b0cf
fix: remove obsolete bootstrap fix and reset RSA key size checks to 2048
aeddi Jan 14, 2020
d3f9866
style: remove zeros values from default config
aeddi Jan 14, 2020
84b3654
chore: remove emulator host loopback IPs and useless AndroidManifest
aeddi Jan 14, 2020
804bbce
feat(android): get XKCD cIDs using IPNS/IPFS instead of local json
aeddi Jan 15, 2020
1461ac1
feat(ios): get XKCD cIDs using IPNS/IPFS instead of local json
gfanton Jan 15, 2020
d458fb5
chore: clean obsolet README (todo)
aeddi Jan 20, 2020
8d997a9
fix(shell): Remove infinite recursive call method exec
gfanton Jan 20, 2020
22d9746
fix(ios): Fix IPNS resolve on iOS
gfanton Jan 20, 2020
33d22cd
chore: Update README.md
aeddi Jan 21, 2020
efdf0d2
feat(go): Update to go-ipfs-api v0.0.3
gfanton Jan 21, 2020
f9edb40
chore(go): cleanup some code
gfanton Jan 21, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# editorconfig.org
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8

[{*.js,package.json}]
indent_style = space
indent_size = 2

[{*.go,Makefile}]
indent_style = tab
indent_size = 4
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# OSX
.DS_Store

# Binaries for programs and plugins
*.exe
*.exe~
Expand All @@ -10,3 +13,9 @@

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# go vendor
vendor

# build folder
build
201 changes: 0 additions & 201 deletions LICENSE

This file was deleted.

5 changes: 5 additions & 0 deletions LICENSE-APACHE
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
19 changes: 19 additions & 0 deletions LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
80 changes: 80 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
MAKEFILE_DIR = $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
GO_DIR = $(MAKEFILE_DIR)/go
ANDROID_DIR = $(MAKEFILE_DIR)/android
IOS_DIR = $(MAKEFILE_DIR)/ios
GO_SRC = $(shell find $(GO_DIR) -not \( -path $(GO_DIR)/vendor -prune \) -name \*.go)

BIND_PACKAGE = github.com/berty/gomobile-ipfs/go/bind/ipfs
GOMOBILE = $(GOPATH)/bin/gomobile
GOMOBILE_OPT ?=
ADDITIONAL_GO_PKG ?=

VERSION_FILE = $(MAKEFILE_DIR)/version
LIB_VERSION = $(shell cat $(VERSION_FILE))

VENDOR = $(GO_DIR)/vendor
MOD_FILES = $(GO_DIR)/go.mod $(GO_DIR)/go.sum

BUILD_DIR_IOS = $(IOS_DIR)/Frameworks
BUILD_LIB_IOS = $(BUILD_DIR_IOS)/Ipfs.framework
BUILD_DIR_ANDROID = $(ANDROID_DIR)/local_repo/ipfs/gomobile/gomobile-ipfs/$(LIB_VERSION)
BUILD_LIB_ANDROID = $(BUILD_DIR_ANDROID)/gomobile-ipfs-$(LIB_VERSION).aar
BUILD_POM_ANDROID = $(BUILD_DIR_ANDROID)/gomobile-ipfs-$(LIB_VERSION).pom
POM_TEMPLATE = $(ANDROID_DIR)/pom_template

.PHONY: help build build.android build.ios test deps clean clean.android clean.ios re re.ios re.android

help:
@echo "Commands:"
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | grep -v / | sed 's/^/ $(HELP_MSG_PREFIX)make /'

build: build.android build.ios

build.android: $(BUILD_LIB_ANDROID) $(BUILD_POM_ANDROID)

$(BUILD_LIB_ANDROID): $(BUILD_DIR_ANDROID) $(GO_SRC) $(VENDOR) | $(GOMOBILE)
GO111MODULE=off $(GOMOBILE) bind -v $(GOMOBILE_OPT) -target=android -o $(BUILD_LIB_ANDROID) $(BIND_PACKAGE) $(ADDITIONAL_GO_PKG)

$(BUILD_DIR_ANDROID):
mkdir -p $(BUILD_DIR_ANDROID)

$(BUILD_POM_ANDROID):
sed -e 's/{{LIB_VERSION}}/$(LIB_VERSION)/g' $(POM_TEMPLATE) > $(BUILD_POM_ANDROID)

build.ios: $(BUILD_LIB_IOS)

$(BUILD_LIB_IOS): $(BUILD_DIR_IOS) $(GO_SRC) $(VENDOR) | $(GOMOBILE)
GO111MODULE=off $(GOMOBILE) bind -v $(GOMOBILE_OPT) -target=ios -o $(BUILD_LIB_IOS) $(BIND_PACKAGE) $(ADDITIONAL_GO_PKG)

$(BUILD_DIR_IOS):
mkdir -p $(BUILD_DIR_IOS)

test: $(VENDOR)
cd $(GO_DIR) && go test -v ./...

deps: $(VENDOR)

$(GOMOBILE):
GO111MODULE=off go get golang.org/x/mobile/cmd/gomobile
gomobile init -v

$(VENDOR): $(MOD_FILES)
ifneq ($(wildcard /bin/bash),)
@bash -c 'echo "GO111MODULE=on go mod vendor" && cd $(GO_DIR) && GO111MODULE=on go mod vendor 2> >(grep -v "warning: ignoring symlink" 1>&2)'
else
cd $(GO_DIR) && GO111MODULE=on go mod vendor
endif

clean: clean.android clean.ios

clean.android:
rm -rf $(BUILD_DIR_ANDROID)

clean.ios:
rm -rf $(BUILD_DIR_IOS)

re: re.android re.ios

re.android: clean.android build.android

re.ios: clean.ios build.ios
Loading