VPN App using Mysterium Network.

Running manually
- Install and run Tequilapi on your PC
- Install dependencies
yarn install
- Install React Native CLI:
yarn global add react-native-cli
npm install -g react-native-cli
Android
- Setup crash reporting:
- Ensure You have permission to the project here https://console.firebase.google.com
- Download project's firebase crashlytics config -
google-services.jsonfrom https://console.firebase.google.com/u/1/project/mysterium-vpn/overview - Place it in
android/app/
Setup to run on actual device
brew cask install android-platform-toolsor Install ADB- Connect Android phone, check if
adbcan see it:
adb devices
Setup Emulator
- Download Android Studio
- Android Studio comes with JDK preinstalled, but in case that version doesn't work, you need JDK 1.8
- Setup Emulator in Android Studio and start it
Run Android:
Install Android SDK, exportANDROID_HOME to SDK location, i.e.:export ANDROID_HOME=/Users/<username>/Library/Android/sdk/
yarn android
Android Releases
-
Get
google-services.json:
- Go to https://console.firebase.google.com
- Open android project
- Download
google-services.json - Put it to
android/app/google-services.json
-
Create signing key:
More info: https://facebook.github.io/react-native/docs/signed-apk-android#generating-a-signing-keykeytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000
-
Setup values in environment:
cp fastlane/.env.local.dist fastlane/.env.local
vim fastlane/.env.local
- Setup Fastlane, more info in fastlane/README.md
Local development
-
Build Mysterium Node from source code:
util_scripts/build-node.sh
-
Uncomment local dependency in
android/app/build.gradle:
//implementation 'network.mysterium:mobile-node:0.8.1' implementation files('libs/Mysterium.aar')
Building release APK
-
Install Fastlane (if don't have it yet)
brew cask install fastlane
-
Make release build:
source fastlane/.env.local && fastlane android build
android/app/build/outputs/apk/release/app-release.apkYou can install this APK by:
- uploading it to phone, or
- using
adb install android/app/build/outputs/apk/release/app-release.apk
Internal release
- Build and publish internal release:
source fastlane/.env.local && fastlane android beta
iOS
-
Setup crash reporting:
- Download firebase crashlytics config -
GoogleService-Info.plistfrom https://console.firebase.google.com - Place it in
ios/
- Download firebase crashlytics config -
-
Install X Code using App Store
-
Set location for command line tools is X Code:
- Open X Code
- Go to "X Code" -> "Preferences" -> "Locations"
- In "Command Line Tools", select single available option
-
Install Cocoa dependency manager
brew bundle
cd ios
- Install Cocoa dependencies
carthage bootstrap --plaftorm iOS --cache-builds
cd ..
- Run iOS
yarn ios
- E2E tests
brew tap wix/brew
brew install wix/brew/applesimutils
yarn test:e2e:ios
Troubleshooting
iOS build & run error
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/MysteriumVPN.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Entry, ":CFBundleIdentifier", Does Not Exist error is very generic, but doing the following steps fixed the issue.Xcode configuration
-
Open project
-
File -> Project settings -> Advanced
-
Select "custom"
-
Set the following:
Products: build/Build/Products
Intermediates: build/Build/Intermediates.noindex
Index Datastore: Index/DataStore
-
Product -> Build
Android build error
* What went wrong:
A problem occurred configuring project ':react-native-fabric'.
> Could not resolve all artifacts for configuration ':react-native-fabric:classpath'.
> Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).
to fix run:
./util_scripts/fix-react-native-fabric-gradle
command not found: gsed, you can fix it on OSX by running:brew install gnu-sed
Contributing
Android
Bump mobile-node version
- To Update
implementation "mysterium.network:mobile-node:0.5-rc"line in./android/app/build.gradle, published versions can be found here. - Node usage can be found in
MainActivity.java.
Native android logs
To see native android logs, use Logcat:adb logcat
from https://github.com/mysteriumnetwork/mysterium-vpn-mobile
------
https://github.com/mysteriumnetwork/node
No comments:
Post a Comment