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
+32-7Lines changed: 32 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,14 @@
1
1
# PDF Converter Native Apps
2
2
3
-
This repository contains native iOSand Android applications that wrap the PDF Converter PWA (Progressive Web App) in a WebView. These apps provide a native experience for users while leveraging the existing web application.
3
+
This repository contains native iOS, Android, and desktop applications that wrap the PDF Converter PWA (Progressive Web App) in a WebView. These apps provide a native experience for users while leveraging the existing web application.
4
4
5
5
## Project Structure
6
6
7
-
The repository is organized into two main directories:
7
+
The repository is organized into three main directories:
8
8
9
9
-`/ios`: Contains the iOS application written in Swift
10
10
-`/android`: Contains the Android application written in Kotlin
11
+
-`/desktop`: Contains the cross-platform desktop application built with Electron
11
12
12
13
Each directory has its own README with specific instructions for building and running the respective applications.
13
14
@@ -33,9 +34,21 @@ The Android app uses WebView to load the PWA from the production website. It pro
33
34
34
35
See the [Android README](./android/README.md) for detailed instructions on building and running the Android app.
35
36
37
+
## Desktop App
38
+
39
+
The desktop app uses Electron to load the PWA from the production website. It provides a native desktop experience for Windows, macOS, and Linux users with the following features:
40
+
41
+
- Cross-platform support (Windows, macOS, Linux)
42
+
- Native desktop integration
43
+
- Custom application menu
44
+
- External link handling
45
+
- Offline capabilities (when the PWA supports it)
46
+
47
+
See the [Desktop README](./desktop/README.md) for detailed instructions on building and running the desktop app.
48
+
36
49
## Customization
37
50
38
-
Both 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 can be easily customized to point to different environments (development, staging, production) by modifying the URL in the respective WebView implementation.
39
52
40
53
### iOS URL Configuration
41
54
@@ -59,14 +72,24 @@ In `android/PDFConverter/app/src/main/java/com/profullstack/pdfconverter/MainAct
59
72
privateval pwaUrl ="https://profullstack.com/pdf"
60
73
```
61
74
75
+
### Desktop URL Configuration
76
+
77
+
In `desktop/src/main.js`:
78
+
79
+
```javascript
80
+
// URL of the PWA
81
+
constpwaUrl='https://profullstack.com/pdf';
82
+
```
83
+
62
84
## Benefits of Native WebView Apps
63
85
64
-
1.**App Store Presence**: Makes the application discoverable in app stores
86
+
1.**App Store/Distribution Presence**: Makes the application discoverable in app stores and software distribution platforms
65
87
2.**Native Features**: Access to device capabilities not available to web apps
66
88
3.**Offline Support**: Better offline capabilities through native caching
67
-
4.**User Experience**: Provides a more integrated experience on mobile devices
89
+
4.**User Experience**: Provides a more integrated experience on mobile and desktop devices
68
90
5.**Push Notifications**: Native push notification support
69
-
6.**Icon on Home Screen**: Automatic placement on the user's home screen
91
+
6.**Icon on Home Screen/Desktop**: Automatic placement on the user's home screen or desktop
92
+
7.**Desktop Integration**: System tray, dock, and taskbar integration for desktop apps
70
93
71
94
## Future Enhancements
72
95
@@ -76,4 +99,6 @@ Potential future enhancements for these apps include:
76
99
2. Implementing push notifications
77
100
3. Adding deep linking support
78
101
4. Integrating native file pickers for better file handling
79
-
5. Adding biometric authentication options
102
+
5. Adding biometric authentication options
103
+
6. Implementing auto-updates for the desktop app
104
+
7. Adding system tray/menu bar functionality for the desktop app
A cross-platform desktop application that wraps the PDF Converter PWA in an Electron shell. This app provides a native desktop experience for Windows, macOS, and Linux users.
4
+
5
+
## Features
6
+
7
+
- Loads the PWA from https://profullstack.com/pdf
8
+
- Native desktop integration
9
+
- Cross-platform support (Windows, macOS, Linux)
10
+
- Custom application menu
11
+
- External link handling
12
+
- Offline capabilities (when the PWA supports it)
13
+
14
+
## Development Requirements
15
+
16
+
- Node.js 16.x or later
17
+
- npm or yarn
18
+
19
+
## Getting Started
20
+
21
+
1. Install dependencies:
22
+
```
23
+
cd desktop
24
+
npm install
25
+
```
26
+
27
+
2. Run the app in development mode:
28
+
```
29
+
npm start
30
+
```
31
+
32
+
## Building for Production
33
+
34
+
### All Platforms
35
+
36
+
To build for all platforms (that your current OS supports):
37
+
38
+
```
39
+
npm run build
40
+
```
41
+
42
+
### Platform-Specific Builds
43
+
44
+
#### Windows
45
+
46
+
```
47
+
npm run build:win
48
+
```
49
+
50
+
This will generate:
51
+
- NSIS installer (.exe)
52
+
- Portable executable (.exe)
53
+
54
+
#### macOS
55
+
56
+
```
57
+
npm run build:mac
58
+
```
59
+
60
+
This will generate:
61
+
- DMG installer (.dmg)
62
+
- ZIP archive (.zip)
63
+
64
+
#### Linux
65
+
66
+
```
67
+
npm run build:linux
68
+
```
69
+
70
+
This will generate:
71
+
- AppImage (.AppImage)
72
+
- Debian package (.deb)
73
+
- RPM package (.rpm)
74
+
75
+
## Customization
76
+
77
+
### PWA URL
78
+
79
+
To change the URL of the PWA, modify the `pwaUrl` variable in `src/main.js`:
80
+
81
+
```javascript
82
+
// URL of the PWA
83
+
constpwaUrl='https://profullstack.com/pdf';
84
+
```
85
+
86
+
### Application Icons
87
+
88
+
Replace the placeholder icon files in the `assets` directory with your own icons:
89
+
-`icon.png` (512x512 PNG for Linux)
90
+
-`icon.ico` (Windows icon)
91
+
-`icon.icns` (macOS icon)
92
+
93
+
## Project Structure
94
+
95
+
-`src/main.js`: Main process script
96
+
-`src/preload.js`: Preload script for secure renderer process
97
+
-`assets/`: Application icons and resources
98
+
-`package.json`: Project configuration and dependencies
99
+
100
+
## Packaging and Distribution
101
+
102
+
The app is configured to be packaged using electron-builder. The configuration in `package.json` specifies the build targets for each platform.
0 commit comments