Skip to content

Commit

Permalink
Merge branch 'develop' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesacklin authored Mar 18, 2024
2 parents adaa307 + 224837d commit 1629c32
Show file tree
Hide file tree
Showing 112 changed files with 4,197 additions and 2,176 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/mobile-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ on:
- all
- android
- ios
env:
NOTIFY_PROVIDER: rivfur-livmet
NOTIFY_SERVICE: groups-native
jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -36,9 +33,15 @@ jobs:
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Create build vars
id: vars
run: |
echo "profile=${{ inputs.profile || 'preview' }}" >> $GITHUB_OUTPUT
- name: Build for selected platforms
working-directory: ./apps/tlon-mobile
run: eas build --profile ${{ inputs.profile || 'preview' }} --platform ${{ inputs.platform || 'all' }} --non-interactive --auto-submit
run: eas build --profile ${{ steps.vars.outputs.profile }} --platform ${{ inputs.platform || 'all' }} --non-interactive --auto-submit
env:
EXPO_APPLE_ID: ${{ secrets.EXPO_APPLE_ID }}
EXPO_APPLE_PASSWORD: ${{ secrets.EXPO_APPLE_PASSWORD }}
NOTIFY_PROVIDER: "${{ steps.vars.outputs.profile == 'preview' && 'binnec-dozzod-marnus' || 'rivfur-livmet' }}"
NOTIFY_SERVICE: "${{ steps.vars.outputs.profile == 'preview' && 'tlon-preview-release' || 'groups-native' }}"
12 changes: 8 additions & 4 deletions .github/workflows/mobile-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ on:
- all
- android
- ios
env:
NOTIFY_PROVIDER: rivfur-livmet
NOTIFY_SERVICE: groups-native
jobs:
deploy:
runs-on: ubuntu-latest
Expand All @@ -36,6 +33,13 @@ jobs:
token: ${{ secrets.EXPO_TOKEN }}
- name: Install dependencies
run: npm ci
- name: Create build vars
id: vars
run: |
echo "profile=${{ inputs.profile || 'preview' }}" >> $GITHUB_OUTPUT
- name: Push update for selected platforms
working-directory: ./apps/tlon-mobile
run: eas update --auto --profile ${{ inputs.profile || 'preview' }} --platform ${{ inputs.platform || 'all' }} --non-interactive
run: eas update --auto --profile ${{ steps.vars.outputs.profile }} --platform ${{ inputs.platform || 'all' }} --non-interactive
env:
NOTIFY_PROVIDER: "${{ steps.vars.outputs.profile == 'preview' && 'binnec-dozzod-marnus' || 'rivfur-livmet' }}"
NOTIFY_SERVICE: "${{ steps.vars.outputs.profile == 'preview' && 'tlon-preview-release' || 'groups-native' }}"
4 changes: 4 additions & 0 deletions apps/tlon-mobile/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ DEFAULT_LURE=
DEFAULT_PRIORITY_TOKEN=
RECAPTCHA_SITE_KEY_ANDROID=
RECAPTCHA_SITE_KEY_IOS=
DEFAULT_TLON_LOGIN_EMAIL=
DEFAULT_TLON_LOGIN_PASSWORD=
DEFAULT_SHIP_LOGIN_URL=
DEFAULT_SHIP_LOGIN_ACCESS_CODE=
31 changes: 31 additions & 0 deletions apps/tlon-mobile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,37 @@ Plug in your iOS device or start the iPhone Simulator and run the application in
npm run ios
```

#### Run Preview Scheme

Run the Preview version of the app by specifying `scheme` or `variant` in the run command:

```sh
npm run ios -- --scheme=Landscape-preview
```

```sh
npm run android -- --variant=preview
```

## Debugging

### Dev tools

Press `j` while running expo-cli/metro to open chrome devtools. You can use the devtools to view logs, network requests, and more. [More info here](https://docs.expo.dev/debugging/tools/#debugging-with-chrome-devtools).

### Default Credentials

To streamline testing the login flow, you can use env variables to prepopulate fields in the Tlon Login and ship login screen. The relevant variables are:

```
DEFAULT_TLON_LOGIN_EMAIL=
DEFAULT_TLON_LOGIN_PASSWORD=
DEFAULT_SHIP_LOGIN_URL=
DEFAULT_SHIP_LOGIN_ACCESS_CODE=
```

See `.env.sample` for other configurable env variables.

## Deployment

Deployment is handled by [Expo Application Services](https://expo.dev/eas).
Expand Down
2 changes: 1 addition & 1 deletion apps/tlon-mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
compileSdk rootProject.ext.compileSdkVersion
versionCode 48
versionCode 62
versionName "4.0.0"

buildConfigField("boolean", "REACT_NATIVE_UNSTABLE_USE_RUNTIME_SCHEDULER_ALWAYS", (findProperty("reactNative.unstable_useRuntimeSchedulerAlways") ?: true).toString())
Expand Down
28 changes: 4 additions & 24 deletions apps/tlon-mobile/android/app/google-services.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,15 @@
"package_name": "io.tlon.groups"
}
},
"oauth_client": [
{
"client_id": "543296749236-1l5r4ipguvjdh083t5j7h1eicqi21j0o.apps.googleusercontent.com",
"client_type": 3
}
],
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyDm8-5daeW5B8j6i_RIoSvOgnx6Fo0gEOU"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "543296749236-1l5r4ipguvjdh083t5j7h1eicqi21j0o.apps.googleusercontent.com",
"client_type": 3
}
]
"other_platform_oauth_client": []
}
}
},
Expand All @@ -41,25 +31,15 @@
"package_name": "io.tlon.groups.preview"
}
},
"oauth_client": [
{
"client_id": "543296749236-1l5r4ipguvjdh083t5j7h1eicqi21j0o.apps.googleusercontent.com",
"client_type": 3
}
],
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyDm8-5daeW5B8j6i_RIoSvOgnx6Fo0gEOU"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "543296749236-1l5r4ipguvjdh083t5j7h1eicqi21j0o.apps.googleusercontent.com",
"client_type": 3
}
]
"other_platform_oauth_client": []
}
}
}
Expand Down
10 changes: 6 additions & 4 deletions apps/tlon-mobile/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,23 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
shipUrlPattern: process.env.SHIP_URL_PATTERN,
defaultLure: process.env.DEFAULT_LURE,
defaultPriorityToken: process.env.DEFAULT_PRIORITY_TOKEN,
defaultTlonLoginEmail: process.env.DEFAULT_TLON_LOGIN_EMAIL,
defaultTlonLoginPassword: process.env.DEFAULT_TLON_LOGIN_PASSWORD,
defaultShipLoginUrl: process.env.DEFAULT_SHIP_LOGIN_URL,
defaultShipLoginAccessCode: process.env.DEFAULT_SHIP_LOGIN_ACCESS_CODE,
recaptchaSiteKeyAndroid: process.env.RECAPTCHA_SITE_KEY_ANDROID,
recaptchaSiteKeyIOS: process.env.RECAPTCHA_SITE_KEY_IOS,
devLocal: Boolean(process.env.DEV_LOCAL),
devLocalCode: process.env.DEV_LOCAL_CODE,
},
ios: {
runtimeVersion: '4.0.0',
buildNumber: '48',
buildNumber: '62',
config: {
usesNonExemptEncryption: false,
},
},
android: {
runtimeVersion: '4.0.0',
versionCode: 48,
versionCode: 62,
},
updates: {
url: `https://u.expo.dev/${projectId}`,
Expand Down
6 changes: 6 additions & 0 deletions apps/tlon-mobile/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import { registerRootComponent } from 'expo';
import 'expo-dev-client';
import polyfill from 'react-native-polyfill-globals';
import { TailwindProvider } from 'tailwind-rn';

import App from './src/App';
import utilities from './tailwind.json';

// Modifies fetch to support server sent events which
// are required for Urbit client subscriptions
polyfill();

function Main(props) {
return (
<TailwindProvider utilities={utilities}>
Expand Down
Loading

0 comments on commit 1629c32

Please sign in to comment.