A cross-platform mobile application built for the Islamic Society of Denton using the Ionic Framework (v7) and Angular (v17). This project leverages Capacitor for seamless deployment to iOS, Android, and Web platforms. Additionally, it integrates with Firebase Cloud Messaging (FCM) for push notifications and utilizes various Cordova/Capacitor plugins for enhanced native capabilities.
- Features
- Technologies Used
- Prerequisites
- Installation & Setup
- Running Locally (Browser)
- Building & Simulating (Android / iOS)
- Project Scripts
- Environment Configuration
- Cross-Platform Compatibility: Write once, run anywhere (iOS, Android, PWA).
- Push Notifications: Integrated with Firebase Cloud Messaging (FCM).
- Native Device Features: File management, social sharing, haptics, and custom splash screens.
- Modern Architecture: Built on Angular 17+ with standalone and modular paradigms.
- Frontend Framework: Angular 17
- UI Toolkit: Ionic Framework 7
- Native Runtime: Capacitor 5/6
- Backend / Services: Firebase
- Languages: TypeScript, HTML, SCSS
Ensure you have the following installed on your local machine before setting up the project:
- Node.js: Recommended to use latest LTS version.
- npm: Comes bundled with Node.js.
- Ionic CLI: Must be installed globally.
npm install -g @ionic/cli
- Platform Specifics:
- Android: Android Studio installed and environment variables configured.
- iOS: A Mac computer with Xcode installed.
-
Extract or Clone the Repository: Download and extract the zip file, or clone the repository to your local machine.
-
Open the Project in your IDE: Open the root project directory in Visual Studio Code (or your preferred editor).
-
Open the Terminal: Open an integrated terminal in your preferred IDE pointing to the root of the project directory.
-
Install Dependencies: Install project dependencies and force-install the Angular dev-kit as required for local building.
npm install --save-dev @angular-devkit/build-angular --force
To launch the app in a web browser for rapid development and testing:
ionic serveThis will start a local development server, usually on http://localhost:8100/. The server provides live-reload so changes will immediately reflect in the browser.
Note: If the
ioniccommand is not recognized, ensure you have successfully installed the CLI globally usingnpm install -g @ionic/cli.
Capacitor relies on the native IDEs (Android Studio and Xcode) to compile and run mobile platforms.
First, sync your web code (builds the Angular app and copies it to native platforms) and sync Capacitor plugins. You can sync all platforms at once, or target a specific platform:
ionic cap sync # Syncs both iOS and Android
ionic cap sync android # Syncs only Android
ionic cap sync ios # Syncs only iOS- Define the necessary System Environment Variables for Android so that the Ionic CLI can recognize the Android SDK and Android Studio locations.
- Open Android Studio from the project:
ionic cap open android
- Once Android Studio launches, allow necessary permissions. You can now build an
.apkfile or run the app on a connected physical device or a virtual Android emulator.
Note: iOS simulation and build process require a macOS environment.
- Open Xcode from the project:
ionic cap open ios
- In Xcode, configure your developer team signing profile.
- Select your target device (physical iPhone or iOS Simulator) and click "Run".
Standard scripts defined in package.json:
npm start- Shorthand to serve the application locally.npm run build- Builds a production output package.npm test- Executes unit tests using Karma/Jasmine.npm run lint- Lints the project codebase using ESLint.
- Make sure to add any secure Firebase environment keys to
src/environments/environment.tsandsrc/environments/environment.prod.tslocally (if omitted from the repository). - Confirm that
.envor related environment settings for Android/iOS builds are appropriately set natively inside Xcode or Android Studio.
Built for the Islamic Society of Denton.