No description
Find a file
2019-05-01 16:39:04 +02:00
armor fix compile 2019-03-07 16:56:12 +01:00
constants fix compile 2019-03-07 16:56:12 +01:00
crypto Use new KeyExpired function 2019-04-27 07:32:20 +02:00
dist/Android Minor build fixes 2018-11-01 17:03:43 +01:00
internal fix compile 2019-03-07 16:56:12 +01:00
key fix compile 2019-03-07 16:56:12 +01:00
models Issue #3: mobile client fallback version 2018-11-05 22:55:45 +01:00
.gitignore Minor build fixes 2018-11-01 17:03:43 +01:00
.gitlab-ci.yml add ci 2019-05-01 16:39:04 +02:00
build.sh Minor: iOS building target name 2018-11-22 10:56:56 +01:00
Changelog.md fix compile 2019-03-07 16:56:12 +01:00
glide.lock update glide and add ci 2019-05-01 16:35:49 +02:00
glide.yaml Minor build fixes 2018-11-01 17:03:43 +01:00
notes.txt wrapper for mobile 2018-06-04 16:05:14 -07:00
README.md rebase 2019-03-07 13:48:45 +01:00

Common client library for cryptography

this should be imported in go as github.com/ProtonMail/go-pm-crypto

setup gomobile and build/bind the source code:

Gomobile repo: https://github.com/golang/mobile Gomobile wiki: https://github.com/golang/go/wiki/Mobile ProtonMail Openpgp: https://github.com/ProtonMail/crypto/tree/master/openpgp

  1. Install Go: brew install go

  2. Install Gomobile: go get golang.org/x/mobile/cmd/gomobile //go get -u golang.org/x/mobile/cmd/...

  3. Install Gobind: go install golang.org/x/mobile/cmd/gobind

  4. Install android sdk and ndk use android studio

  5. Set Env: export ANDROID_HOME="/AndroidSDK" #set your own path

  6. Init gomobile: gomobile init -ndk /AndroidSDK/ndk-bundle/ #put your own ndk path

  7. build examples: gomobile build -target=android #or ios

    bind examples: gomobile bind -target ios -o frameworks/name.framework gomobile bind -target android

the bind will create framework for ios and jar&aar file for android x86_64 arm arch

  1. Project uses glide to setup vendor

OTHER NOTES: two way bridge go & swift: https://medium.com/@matryer/tutorial-calling-go-code-from-swift-on-ios-and-vice-versa-with-gomobile-7925620c17a4

SOME UNSOLVED ISSUES: No Mips support but this is fine we don't support it anyway https://github.com/golang/go/issues/23692 issue with atomic EXC_BAD_ACCESS is hard to catch https://github.com/golang/go/issues/21288 memory issue https://github.com/golang/go/issues/21594 gradle issue https://github.com/golang/go/issues/23307 https://github.com/golang/go/issues/20241 upload failed. we are using framework need to confirm this https://github.com/golang/go/issues/17278 android load jni issue https://github.com/golang/go/issues/17807 dlopen issue https://github.com/golang/go/issues/18903 doesn't work well with vender https://github.com/golang/go/issues/13438 bind issue https://github.com/golang/go/issues/14332 build types issue https://github.com/golang/go/issues/15956 no multiple independent bindings support

The build.sh need to modify the path when you use it