Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trying to get to playstore #15

Open
wants to merge 34 commits into
base: playstore
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7f4a3ad
UI fixes
redkoai Jan 28, 2021
96a1467
UI fixes
redkoai Jan 28, 2021
2946224
photoreading fixed
redkoai Jan 28, 2021
fbdbb24
bugs fixes buttons
redkoai Jan 28, 2021
f554577
android swapped
redkoai Jan 29, 2021
1be3bda
ready for android submission
redkoai Jan 30, 2021
060d119
Android Google Upload Fix
shoapeng-redko Jan 31, 2021
159cdb8
Update README.md
shoapeng-redko Jan 31, 2021
296b234
Update README.md
shoapeng-redko Jan 31, 2021
30b175b
Update README.md
shoapeng-redko Jan 31, 2021
e5fd977
Update AndroidManifest.xml
shoapeng-redko Jan 31, 2021
847a050
added compatibility array
kemunoz Feb 5, 2021
0ac9375
onboarding
redkoai Feb 9, 2021
6808da0
changes
redkoai Feb 9, 2021
41fdb60
fixes
redkoai Feb 9, 2021
8bcbee0
Errors fix on android manefiest
shoapeng-redko Feb 10, 2021
57ff1a5
Fix merge issues, please use gradle 6.5 not 6.3
shoapeng-redko Feb 10, 2021
fd647db
Revert "Fix merge issues, please use gradle 6.5 not 6.3"
shoapeng-redko Feb 10, 2021
7633ffa
Revert "Errors fix on android manefiest"
shoapeng-redko Feb 10, 2021
55ba40d
Revert "fixes"
shoapeng-redko Feb 10, 2021
b88a585
Revert "changes"
shoapeng-redko Feb 10, 2021
e43f8c7
Revert "onboarding"
shoapeng-redko Feb 10, 2021
2b83967
Revert "Revert "onboarding""
shoapeng-redko Feb 10, 2021
eef721e
Revert "Revert "changes""
shoapeng-redko Feb 10, 2021
47f6a9b
Revert "Revert "fixes""
shoapeng-redko Feb 10, 2021
c289e0c
Working Version
shoapeng-redko Feb 10, 2021
aff2de4
Update README.md
shoapeng-redko Feb 10, 2021
d724a2d
Fixed gradlew memory issue
shoapeng-redko Feb 10, 2021
c1665cf
Update README.md
shoapeng-redko Feb 10, 2021
5a5ff15
Mmap icons added
shoapeng-redko Feb 10, 2021
f04a5d8
Update README.md
shoapeng-redko Feb 10, 2021
f5f2124
Update app.json
shoapeng-redko Feb 26, 2021
b6c11aa
assets changed
redkoai Mar 1, 2021
3638bd4
assets changed
redkoai Mar 1, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 0 additions & 11 deletions .expo-shared/README.md

This file was deleted.

526 changes: 0 additions & 526 deletions .expo-shared/assets.json

This file was deleted.

12 changes: 12 additions & 0 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ import CompatibilityVirgo from './src/screens/horoscopes/CompatibilityVirgo';
import CompatibilitySagi from './src/screens/horoscopes/CompatibilitySagi';
import CompatibilityLibra from './src/screens/horoscopes/CompatibilityLibra';
import CompatibilityScorpio from './src/screens/horoscopes/CompatibilityScorpio';
import Crystals from './src/screens/Crystals';
import ReadingFace from './src/screens/ReadingFace';
import ReadingCof from './src/screens/ReadingCof';
import ReadingPalm from './src/screens/ReadingPalm';
import HomeH from './src/screens/HomeH';
import Home1 from './src/screens/Home1';

// ONLY STORE NAVIGATION HERE

Expand All @@ -84,6 +90,8 @@ function App() {
}}
>
<Stack.Screen name="Home" component={HomeScreen} />
<Stack.Screen name="HomeH" component={HomeH} />
<Stack.Screen name="Home1" component={Home1} />
<Stack.Screen name="ReadingP" component={ReadingP} />
<Stack.Screen name="Favorites" component={FavoritesScreen} />
<Stack.Screen name="Shop" component={ShopScreen} />
Expand Down Expand Up @@ -144,6 +152,10 @@ function App() {
<Stack.Screen name="SomeoneFortune" component={SomeoneFortune} />
<Stack.Screen name="SomeoneFortune1" component={SomeoneFortune1} />
<Stack.Screen name="Gems" component={Gems} />
<Stack.Screen name="Crystals" component={Crystals} />
<Stack.Screen name="ReadingPalm" component={ReadingPalm}/>
<Stack.Screen name="ReadingFace" component={ReadingFace}/>
<Stack.Screen name="ReadingCof" component={ReadingCof}/>
</Stack.Navigator>
</NavigationContainer>
);
Expand Down
20 changes: 20 additions & 0 deletions OLD_1_Fortune-Coffee_upload_cert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-----BEGIN CERTIFICATE-----
MIIDRzCCAi+gAwIBAgIIBaQkqfgGzUwwDQYJKoZIhvcNAQELBQAwUjELMAkGA1UE
BhMCVVMxCTAHBgNVBAgTADEJMAcGA1UEBxMAMQkwBwYDVQQKEwAxCTAHBgNVBAsT
ADEXMBUGA1UEAxMOLS0tLS0tLS0tLS0tLS0wHhcNMjEwMTEzMjMyMDUwWhcNNDgw
NTMxMjMyMDUwWjBSMQswCQYDVQQGEwJVUzEJMAcGA1UECBMAMQkwBwYDVQQHEwAx
CTAHBgNVBAoTADEJMAcGA1UECxMAMRcwFQYDVQQDEw4tLS0tLS0tLS0tLS0tLTCC
ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKeepqMam1siOMXHCR6b8hGt
djUgGckCjwgpv6eY99Y82i91oAMMHCKBuL7z1IyODt8p5WOdqV5cYoRKcB7k5vmw
mZIkOsli1dS2DTc8vUnHOsNhgMITgY1wK/OBxloZr2Wghs1sTOzhoosdMtb9GMxk
tTXfe24AMTMb5HLwOlSu+CKcCLWn8/e2tXWxtV6JBEvN25JNIE3dFqathzZXxB4b
Hym8S3M+JMeFDC9V+LEuS92psRnIHFzVCiQnIIivBdEWbqaWfCV2BcVQ5xgOIxDv
86QQuguko2hGigd0XMgDF+v6HdIBDpiQadxsdgO45sy0kOZTq+53LXRRZPYZHGsC
AwEAAaMhMB8wHQYDVR0OBBYEFKJcvCaAe2uumM5+LLJ3WGMdDfq+MA0GCSqGSIb3
DQEBCwUAA4IBAQCZcjZ+8vAOj+qNDWJ+d510CKXU+2QWVcyQadE4fYHDV2IDyRHs
E5fCDx1DWJg98z7RL98nOY/Ns9ZTv4je1ZaYfWuZhRnLc4cLUDpOsJFeM5FhGVVO
yGQrQqT5GbRlPfGIAR6wq4hS1o4J58u4qX483KIsT7mkbNMtv14hB9HXVQWUDLSy
LdU9bMJ4/xOur4by7uG/H7np6chF/ABrI5e+78y5SlcHgrFrHJLx5v8d3NNZ85hc
6d/bW4ecD9HH+EuV0sJO9sgLKZl6H0amtkczaIqIFo5Lb1h4rm5/Vn8K8po8wu72
ujlKpllM8aJNK/mtpzJITQgTCLU8talTsuGU
-----END CERTIFICATE-----
110 changes: 76 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,63 +4,105 @@ Description:

## Software Dependencies

#### IMPORANTANT
1. Do not modify anything inside the android folder, unless you are just copy and pasteing the the downloaded keys
2. If it doesnt work, check your gradle version to make sure its compatiable. React native should just automatically do it already, therefore this issue is rare.

### Android

1.You might need to do this to run it in Android Studio or on real device: ``adb reverse tcp:8081 tcp:8081``
2. for the sample server: ``adb reverse tcp:3000 tcp:3000``
3. To run from command line try: ``react-native run-android``

## How to Start App

### iOS
In the root directory
# Do not modify any android files, gradles are set in place already. There is no need to make furthur modifications. If it doesnt work. Check the steps
## To Build Android ~ THIS IS SIGNED APK

Install dependencies: npm install
In the ios directory
0.1. Run react-native run-android first, if it works then you can export.

Install Pods: gem install cocoapods
Install Pods: pod install
Install xcpretty: gem install xcpretty
Launch: open Sample.xcworkspace
#### Newer gradlews, we can just run the gradlew commands and it will do all of this. You may try that first. cd into android.
1. `./gradlew clean`
2. `./gradlew assembleRelease`
3. If this doesnt work. Then go ahead and do the bottom code. Hopefully it does
####

## ARCHIVING IN XCODE
1. Generate the Index File ``react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ ``

### FREQUENT ERRORS
if you need certificates, go to developer and download the certificates onto your computer. Then rebuild.
// This step is nessassary or you will get errors, we must remove it because gradlew will automatically copy the files themselves.
2. `rm -rf ./android/app/src/main/res/drawable-*` + `rm -rf ./android/app/src/main/res/raw` ` There should be mipmap inside the res folder. These are the icons.

// Create the bundle first. Run this command to export the assets out and bundle it
1.
$ react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios
!! While this is running. Dont do anything. It may look frozen but its not. Let it finish. ~~~~~
3. Go into android folder, ``cd android``


** Change version number in plist file.
4. IMPORTANT, you need the keys from google drive to get it.
// https://drive.google.com/file/d/1avJ6oeOsNJWfSSlyAt_K0fVgIYsRq4Sr/view?usp=sharing
copy and paste to your android. This is the keystore passwords etc. Without this it will not work
These do no get pushed to the repo, therefore you download and get it yourself

2.
-Open Workspace
-Edit the scheme from Xcode like this:
-Product -> Scheme -> Edit Scheme -> Change build Configurration to Release
5. Build using gradlew ``./gradlew assembleRelease``

6. You can find the generated APK at android/app/build/outputs/apk/app-release.apk.

4. Change the build to to a real device or a simulator

5. Go to Product -> Archive
## Google Play Signing & Uploading

6. Once it's done building, Distrubute App to store, Done
How to sign the application

!! There is already a folder inside called output.zip.
This contains the generated Java already.
Just upload this when prompted

1. First create the keystore file. Change
`` keytool -genkeypair -v -keystore YOURKEYNAME.keystore -alias YOURKEYALIAS -keyalg RSA -keysize 2048 -validity 10000``
2. Move the generated keystore file into ``/android/app``

3. Go into ``/android/app/build.gradle``

4. Change build.gradle
```
signingConfigs {
release {
storeFile file('fortunecoffee.keystore') <-- Change to file name of keystore
storePassword 'fortunecoffee' <-- Change to the password you set
keyAlias 'fortunecoffee' <-- Change to the alias you sent when you first ran the keystore generatation
keyPassword 'fortunecoffee' <-- Password
}
}
buildTypes {
release {
... <-- Add everything from before
signingConfig signingConfigs.release <-- Specficaly add this line, remove the debug if its there
}
}
```

5. Then cd into android folder, and create the key pairs using ``/android/pepk.jar``. THIS IS VERY IMPORTANT!!
They keys must match from our end.
``This will be on google, when generateing A new app, Choose to do our own app handler and follow the steps``

6. Follow the steps on google console
7. Upload.

### Android

You might need to do this to run it in Android Studio or on real device: adb reverse tcp:8081 tcp:8081
And for the sample server: adb reverse tcp:3000 tcp:3000
To run from command line try: react-native run-android
## Android Common Build Errors

### Server
1. Android resource linking failed
`./gradlew clean`
`./gradlew assembleRelease`

There is a server that the app hits for data. The data is only stored in memory, but it should produce a more realistic environment.

In the server directory
### @React Native Camera Errors

Install nvm and node-4.2.3
Install dependencies: npm install
Run it: npm start
Under android/app/build.gradle
```
android {
...
defaultConfig {
...
missingDimensionStrategy 'react-native-camera', 'general' <-- insert this line
}
}
```

## Notes - Things to add/debug
-
Expand Down
11 changes: 9 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ android {

defaultConfig {
applicationId 'com.redko.fortunecoffee'
missingDimensionStrategy 'react-native-camera', 'general' // fixes camera bug
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0.28"
missingDimensionStrategy 'react-native-camera', 'general'
}
splits {
abi {
Expand All @@ -154,6 +154,13 @@ android {
keyAlias 'androiddebugkey'
keyPassword 'android'
}
release {
storeFile file('fortunecoffee.keystore')
storePassword 'fortunecoffee'
keyAlias 'fortunecoffee'
keyPassword 'fortunecoffee'
}

}
buildTypes {
debug {
Expand All @@ -162,7 +169,7 @@ android {
release {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package com.fortunecoffee;
package com.lunaris;

import android.content.Context;
import com.facebook.flipper.android.AndroidFlipperClient;
Expand Down
16 changes: 10 additions & 6 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
<uses-permission android:name="android.permission.USE_BIOMETRIC"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
Expand All @@ -22,12 +19,15 @@
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme">
<meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://exp.host/@docholliday211/Fortune-Coffee"/>
<meta-data android:name="expo.modules.updates.EXPO_SDK_VERSION" android:value="40.0.0"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATE_URL" android:value="https://exp.host/@shoapeng.redko/Fortune-Coffee" />
<meta-data android:name="expo.modules.updates.EXPO_SDK_VERSION" android:value="40.0.0" />
<meta-data android:name="expo.modules.updates.ENABLED" android:value="true"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_LAUNCH_WAIT_MS" android:value="0"/>
<activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:screenOrientation="portrait">
<meta-data android:name="expo.modules.updates.EXPO_RELEASE_CHANNEL" android:value="default" />

<activity
android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:theme="@style/Theme.App.SplashScreen" android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand All @@ -40,5 +40,9 @@
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity"/>
<activity
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:theme="@style/Base.Theme.AppCompat">
</activity>
</application>
</manifest>
Loading