Code Monkey home page Code Monkey logo

react-native-webview's Introduction

React native WebView

This is simple WebView application using React Native.

Run instructions for iOS:

Cd to project path and run:
«npx react-native run-ios»

OR

  1. Open /iOS/ReactNativeWebView.xcworkspace in Xcode or run «xed -b iOS»
  2. Hit the Run button

Run instructions for Android:

Add the following lines to your $HOME/.bash_profile or $HOME/.bashrc (if you are using zsh then ~/.zprofile or ~/.zshrc) config file:

export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools

Please make sure you use the correct Android SDK path. You can find the actual location of the SDK in the Android Studio «Preferences» dialog, under Appearance & BehaviorSystem SettingsAndroid SDK.

  1. Have an Android emulator running (quickest way to get started), or a device connected.
  2. cd to your project path
  3. run: «npx react-native run-android»

For build APK

In /android folder
./gradlew assembleRelease

For change APP_ID

Renamed the project subfolder from:
android/app/src/main/java/MY/APP/OLD_ID/
to:
android/app/src/main/java/MY/APP/NEW_ID/

Then manually switched the old and new package ids:

In android/app/src/main/java/MY/APP/NEW_ID/MainActivity.java:
package MY.APP.NEW_ID;

In android/app/src/main/java/MY/APP/NEW_ID/MainApplication.java:
package MY.APP.NEW_ID;

In android/app/src/main/AndroidManifest.xml:
package="MY.APP.NEW_ID"

In android/app/build.gradle:
applicationId "MY.APP.NEW_ID"

And in android/app/BUCK:

android_build_config(
  package="MY.APP.NEW_ID"
)
android_resource(
  package="MY.APP.NEW_ID"
)

Gradle cleaning in the end (in /android folder):
`./gradlew clean`

Change APP name

In android/app/src/main/res/values/strings.xml:
<string name="app_name">MY_APP_NEW_NAME</string>

Run instructions for Windows and macOS:

See offical tutorial for the latest up-to-date instructions.

react-native-webview's People

Contributors

trylogout 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.