GithubHelp home page GithubHelp logo

hhy5277 / matcha Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gomatcha/matcha

0.0 2.0 0.0 7.8 MB

Build native mobile apps in Go.

Home Page: https://gomatcha.io/

License: Apache License 2.0

Java 23.14% Go 49.52% C 3.65% C++ 0.15% Objective-C 23.54%

matcha's Introduction

Matcha - iOS and Android apps in Go

gomatcha.io

Matcha is in early development! There are many rough edges and APIs may still change. Please file issues for any bugs you find.

What is Matcha?

Matcha is a package for building iOS and Android applications and frameworks in Go. Matcha provides a UI component library similar to ReactNative and exposes bindings to Objective-C and Java code through reflection. The library also provides Go APIs for common app tasks.

Examples

settings-example insta-example todo-example

Installation - macOS

Matcha requires the following components to be installed.

  • Go 1.8+
  • Xcode 8.3+
  • Android Studio 2.3+ (with SDK 26, NDK and Android Support)

Start by installing Xcode and Android Studio. Instructions can be found at https://developer.apple.com/download/ and https://developer.android.com/studio/install.html.

You may need to run the following before starting Android Studio to allow it to read your GOPATH (https://stackoverflow.com/a/14285335). This also must be done on reboot.

launchctl setenv GOPATH $GOPATH

Open Android Studio's SDK Manager and under the SDK Platforms tab, install the Android 8 Platform (API 26). And in the SDK Tools tab, install NDK and the Android Support Repository.

Configure the ANDROID_HOME enviromental variable to point to the Android SDK by adding the following to your ~/.bash_profile. The Android SDK is often located at ~/Library/Android/sdk depending on your install.

export ANDROID_HOME=<SDK location>

Fetch the project and install the matcha command.

go get gomatcha.io/matcha/...

Next we build the Go standard library for iOS and Android with the following command. The output is installed at $GOPATH/pkg/matcha. If your path doesn't contain $GOPATH/bin, you may need to replace these calls with $GOPATH/bin/matcha.

matcha init

Now build the example project. The output is installed at $GOPATH/src/gomatcha.io/matcha/ios/MatchaBridge/MatchaBridge/MatchaBridge.a and $GOPATH/src/gomatcha.io/matcha/android/matchabridge.aar.

matcha build gomatcha.io/matcha/examples

We can now open the sample iOS project.

open $GOPATH/src/gomatcha.io/matcha/examples/ios-app/SampleApp.xcworkspace

Set the Development Team in Xcode under General > Signing and select SampleApp in the target dropdown in the upper right. Then run the App!

For Android, simply open the sample Android Studio project and hit run!

open -a /Applications/Android\ Studio.app $GOPATH/src/gomatcha.io/matcha/examples/android-app/SampleApp

Installation - Linux

Matcha requires the following components to be installed. iOS builds are not supported on Linux.

  • Go 1.8+
  • Android Studio 2.3+ (with SDK 26, NDK and Android Support Library)

Start by installing Android Studio. Instructions can be found at https://developer.android.com/studio/install.html.

Open Android Studio's SDK Manager and under the SDK Platforms tab, install the Android 8 Platform (API 26). And in the SDK Tools tab, install NDK and the Android Support Repository.

Configure the ANDROID_HOME enviromental variable to point to the Android SDK by adding the following to your ~/.bash_profile. The Android SDK is often located at ~/Android/Sdk depending on your install.

export ANDROID_HOME=<SDK location>

Additionally add the following to your ~/.bash_profile to modify your PATH to include the Java compiler if it does not already. javac can often be found at /usr/local/android-studio/jre/bin.

export PATH=${PATH}:<Java Compiler location>

Fetch the project and install the matcha command.

go get gomatcha.io/matcha/...

Next we build the Go standard library for Android with the following command. The output is installed at $GOPATH/pkg/matcha. If your path doesn't contain $GOPATH/bin, you may need to replace these calls with $GOPATH/bin/matcha.

matcha init

Now build the example project. The output is installed at $GOPATH/src/gomatcha.io/matcha/android/matchabridge.aar.

matcha build gomatcha.io/matcha/examples

Now open the sample Android Studio project and hit run!

<Android Studio location>/bin/studio.sh $GOPATH/src/gomatcha.io/matcha/examples/android-app/SampleApp

Installation - Windows

Matcha requires the following components to be installed. iOS builds are not supported on Windows.

  • Go 1.8+
  • Android Studio 2.3+ (with SDK 26, NDK and Android Support Library)

Start by installing Android Studio. Instructions can be found at https://developer.android.com/studio/install.html.

Open Android Studio's SDK Manager and under the SDK Platforms tab, install the Android 8 Platform (API 26). And in the SDK Tools tab, install NDK and the Android Support Repository.

Configure the ANDROID_HOME enviromental variable to point to the Android SDK. The Android SDK is often located at %USERPROFILE%\AppData\Local\Android\Sdk depending on your install.

setx ANDROID_HOME <SDK location>

Modify your PATH to include the Java compiler if it does not already. javac can often be found at C:\Program Files\Android\Android Studio\jre\bin.

setx PATH %PATH%;<Java Compiler location>

Fetch the project and install the matcha command.

go get gomatcha.io/matcha/...

Next we build the Go standard library for Android with the following command. The output is installed at $GOPATH/pkg/matcha. If your path doesn't contain $GOPATH/bin, you may need to replace these calls with $GOPATH/bin/matcha.

matcha init

Now build the example project. The output is installed at $GOPATH/src/gomatcha.io/matcha/android/matchabridge.aar.

matcha build gomatcha.io/matcha/examples

Now open the sample Android Studio project and hit run!

Try it out!

Contact us

matcha's People

Contributors

omar-elrefaei avatar overcyn avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.