Skip to content

Commit

Permalink
Convert client to CNG (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
wschurman authored Jun 21, 2024
1 parent 62a3914 commit 7623dc9
Show file tree
Hide file tree
Showing 74 changed files with 55 additions and 3,565 deletions.
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,25 +33,19 @@ The flow for creating an update is as follows:

Note: The app is configured to load updates from the server running at http://localhost:3000. If you prefer to load them from a different base URL (for example, in an Android emulator):
1. Update `.env.local` in the server.
2. Update `updates.url` in `app.json` and then run `npx expo prebuild` to sync the changes with the generated native code.
2. Update `updates.url` in `app.json` and re-run the build steps below.

### Create a "release" app

The example Expo project configured for the server is located in **/expo-updates-client**.

#### iOS

Run `yarn` and `npx pod-install` to install packages, and run it locally with `yarn ios`. In **/expo-updates-client/ios/expoupdatesclient/Supporting/Expo.plist**, you'll find a modified Plist that specifies the updates URL to point toward http://localhost:3000/api/manifest.

This app is configured to query this custom server for updates on launch, but only in the "release" version. To create this version, open Xcode, then open **/expo-updates-client/ios**. Click on the project's name in the top bar, then click "Edit scheme". In the modal, select "Release" for "Build configuration" (by default it's set to "Debug").

Then, build the app. You should see it open in an iOS simulator.
Run `yarn` and `yarn ios --configuration Release`.

#### Android

Run `yarn` and then run `yarn android --variant release`. The `AndroidManifest.xml` specifies the updates URL to point toward http://localhost:3000/api/manifest.

You may need to add `android:usesCleartextTraffic="true"` to the `AndroidManifest.xml` applicaiton element.
Run `yarn` and then run `yarn android --variant release`.

### Make a change

Expand Down
3 changes: 3 additions & 0 deletions expo-updates-client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,7 @@ buck-out/
web-build/
dist/

android/
ios/

# @end expo-cli
16 changes: 0 additions & 16 deletions expo-updates-client/android/.gitignore

This file was deleted.

172 changes: 0 additions & 172 deletions expo-updates-client/android/app/build.gradle

This file was deleted.

Binary file removed expo-updates-client/android/app/debug.keystore
Binary file not shown.
14 changes: 0 additions & 14 deletions expo-updates-client/android/app/proguard-rules.pro

This file was deleted.

7 changes: 0 additions & 7 deletions expo-updates-client/android/app/src/debug/AndroidManifest.xml

This file was deleted.

36 changes: 0 additions & 36 deletions expo-updates-client/android/app/src/main/AndroidManifest.xml

This file was deleted.

This file was deleted.

Loading

0 comments on commit 7623dc9

Please sign in to comment.