|
|
7 年之前 | |
|---|---|---|
| __tests__ | 7 年之前 | |
| android | 7 年之前 | |
| img | 7 年之前 | |
| ios | 7 年之前 | |
| native-base-theme | 7 年之前 | |
| .buckconfig | 7 年之前 | |
| .eslintrc.js | 7 年之前 | |
| .flowconfig | 7 年之前 | |
| .gitattributes | 7 年之前 | |
| .gitignore | 7 年之前 | |
| .watchmanconfig | 7 年之前 | |
| App.js | 7 年之前 | |
| README.md | 7 年之前 | |
| app.json | 7 年之前 | |
| babel.config.js | 7 年之前 | |
| index.js | 7 年之前 | |
| metro.config.js | 7 年之前 | |
| package-lock.json | 7 年之前 | |
| package.json | 7 年之前 | |
| process-icon.sh | 7 年之前 | |
| process-splash.sh | 7 年之前 |
This is source code of UNA mobile apps for iOS and Android based on ReactNative.
Mobile apps need to have Nexus UNA app installed.
You need to have npm, react-native along with Android SDK and/or XCode installed to build apps.
After downloading source code, unpacking it, run:
npm install
Then you can already try to run Andoid app with the following commands (Android emulator must be already running):
export ANDROID_HOME=/path/to/android/sdk
react-native run-android
or iOS app (on Max OSX only):
react-native run-ios
Lest assume that you want to rename app to Kookaburra and site name is kookaburra.io.
Then you need to change the following strings:
UNA.IO => Kookaburra
com.una.android => com.kookaburra.android
com.una.ios => com.kookaburra.ios
una.io => kookaburra.io
In the following files and some files need to be renamed:
App.js
app.json
android/app/src/main/res/values/strings.xml
android/app/src/main/java/com/una/android/MainActivity.java => android/app/src/main/java/com/kookaburra/android/MainActivity.java
android/app/src/main/java/com/una/android/MainApplication.java => android/app/src/main/java/com/kookaburra/android/MainApplication.java
android/app/src/main/AndroidManifest.xml
android/app/BUCK
android/app/build.gradle
In XCode change the following:
It will change the following files (don't edit these files directly):
ios/una/Info.plist
ios/una.xcodeproj/project.xcworkspace/xcuserdata/alex.xcuserdatad/UserInterfaceState.xcuserstate
ios/una.xcodeproj/project.pbxproj
Change all images to your own in /img/ folder, leaving the same images dimensions.
To change launcher and icons for iOS and Android apps it's recommended to use special script, it can installed using the following command:
npm install -g yo generator-rn-toolbox
Then you can generate launcher images using the following commands:
yo rn-toolbox:assets --splash ./img/background.png --android
yo rn-toolbox:assets --splash ./img/background.png --ios
Icons for iOS app can be generated using the following command:
yo rn-toolbox:assets --icon ./img/icon.png --ios
To generate Icons for Android - export project (from /android/ folder) in Android Studio then:
logo_android.png file which is in /img/ folder