You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README-native-apps.md
+44-17Lines changed: 44 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,39 +46,66 @@ The desktop app uses Electron to load the PWA from the production website. It pr
46
46
47
47
See the [Desktop README](./desktop/README.md) for detailed instructions on building and running the desktop app.
48
48
49
-
## Customization
49
+
## Configuration
50
50
51
-
All apps can be easily customized to point to different environments (development, staging, production) by modifying the URL in the respective WebView implementation.
51
+
All apps are configured to load the PWA URL from the `API_BASE_URL` variable in the project's root `.env` file. This allows you to easily switch between different environments (development, staging, production) by modifying a single configuration file.
52
52
53
-
### iOS URL Configuration
53
+
### .env Configuration
54
54
55
-
In `ios/PDFConverter/PDFConverter/ViewController.swift`:
55
+
In the project root's `.env` file:
56
+
57
+
```
58
+
API_BASE_URL=https://profullstack.com/pdf
59
+
```
60
+
61
+
### How Each App Reads the Configuration
62
+
63
+
#### iOS App
64
+
65
+
The iOS app uses a `Config.swift` file that reads from the `.env` file in the project root:
Copy file name to clipboardExpand all lines: android/README.md
+39-5Lines changed: 39 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ A simple Android app that uses WebView to load the PDF Converter PWA from the pr
4
4
5
5
## Features
6
6
7
-
- Loads the PWA from https://profullstack.com/pdf
7
+
- Loads the PWA from the URL specified in the project's root .env file
8
8
- Supports all PWA features through WebView
9
9
- Pull-to-refresh functionality
10
10
- Handles back navigation within the WebView
@@ -27,17 +27,51 @@ A simple Android app that uses WebView to load the PDF Converter PWA from the pr
27
27
## Project Structure
28
28
29
29
-`MainActivity.kt`: Main activity with WebView implementation
30
+
-`Config.kt`: Configuration class that reads from the .env file
30
31
-`activity_main.xml`: Main layout with WebView and SwipeRefreshLayout
31
32
-`AndroidManifest.xml`: App configuration and permissions
32
33
-`build.gradle`: Project and app-level build configurations
33
34
34
-
## Customization
35
+
## Configuration
35
36
36
-
To change the URL of the PWA, modify the `pwaUrl` variable in `MainActivity.kt`:
37
+
The app reads the PWA URL from the `API_BASE_URL` variable in the project's root `.env` file. This allows you to easily switch between different environments (development, staging, production) by modifying a single configuration file.
38
+
39
+
### How It Works
40
+
41
+
The `Config.kt` file reads the API_BASE_URL from the .env file:
Copy file name to clipboardExpand all lines: desktop/README.md
+52-6Lines changed: 52 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ A cross-platform desktop application that wraps the PDF Converter PWA in an Elec
4
4
5
5
## Features
6
6
7
-
- Loads the PWA from https://profullstack.com/pdf
7
+
- Loads the PWA from the URL specified in the project's root .env file
8
8
- Native desktop integration
9
9
- Cross-platform support (Windows, macOS, Linux)
10
10
- Custom application menu
@@ -15,6 +15,7 @@ A cross-platform desktop application that wraps the PDF Converter PWA in an Elec
15
15
16
16
- Node.js 16.x or later
17
17
- npm or yarn
18
+
- dotenv (for .env file parsing)
18
19
19
20
## Getting Started
20
21
@@ -72,15 +73,59 @@ This will generate:
72
73
- Debian package (.deb)
73
74
- RPM package (.rpm)
74
75
75
-
## Customization
76
+
## Configuration
76
77
77
-
### PWA URL
78
+
The app reads the PWA URL from the `API_BASE_URL` variable in the project's root `.env` file. This allows you to easily switch between different environments (development, staging, production) by modifying a single configuration file.
78
79
79
-
To change the URL of the PWA, modify the `pwaUrl` variable in `src/main.js`:
80
+
### .env Configuration
81
+
82
+
In the project root's `.env` file:
83
+
84
+
```
85
+
API_BASE_URL=https://profullstack.com/pdf
86
+
```
87
+
88
+
### How It Works
89
+
90
+
The `config.js` file reads the API_BASE_URL from the .env file:
0 commit comments