Pronto-AG / Pronto-MIA-App

MIT License
0 stars 0 forks source link

Pronto-MIA App

This is the repository for the app component of the Pronto-MIA application. The application is used by the Pronto AG to deliver information to it's employees and handle business processes within the company.

Settings

All available settings for the application can be defined within four JSON files in the folder pronto_mia/assets/cfg.

Available Options

Name Type Description
pushMessageServerVapidPublicKey String Public vapid key used to check if the sending server signed with the corresponding private key. How to generate
apiPath String Path to the GraphQL endpoint of the server component
enforceValidCertificate bool If false, enables communication with the server component without a valid TLS certificate. This option might compromise security, so please use with caution.
logLevel string String representation of the log level which should be used. For example the value info would result in would result in Level.INFOand above messages being printed to console. All possible log levels are described here.

Setup

Development

Prerequisites

General
iOS

Installation Steps

  1. Clone this repository
  2. Install dependencies with flutter pub get
  3. Create the required settings files.
  4. If you want to run on web:
    1. Create or import pronto_mia/web/firebase-config.js, which exposes the object fireBaseConfig with the following properties:
      • apiKey
      • authDomain
      • projectId
      • storageBucket
      • messagingSenderId
      • appId
    2. Run the application either through your IDE or with flutter run -d chrome
  5. If you want to run on Android in debug mode:
    1. Create or import pronto_mia/android/app/google-services.json with the following properties:
      • project_info
      • client
      • configuration_version
    2. Run the application either through your IDE or alternatively build it with flutter build apk --debug or flutter build appbundle --debug
  6. If you want to test Android in release mode or upload a version to the play store:
    1. Create or import pronto_mia/android/app/google-services.json with the following properties:
      • project_info
      • client
      • configuration_version
    2. In order to sign the release apk/appbundle you will need to create the file pronto_mia/android/key.properties with the following contents (see also this tutorial):
      storePassword=<password of your upload keystore>
      keyPassword=<password of your upload key>
      keyAlias=<alias of your upload key (normally upload)>
      storeFile=<path to your keystore file>
    3. Build the application either through your IDE or with flutter build apk or flutter build appbundle
  7. If you want to run on iOS in debug mode:
    1. Create or import pronto_mia/ios/Runner/GoogleService-Info.plist with the following properties:
      • CLIENT_ID
      • REVERSED_CLIENT_ID
      • API_KEY
      • GCM_SENDER_ID
      • PLIST_VERSION
      • BUNDLE_ID
      • PROJECT_ID
      • STORAGE_BUCKET
      • IS_ADS_ENABLED
      • IS_ANALYTICS_ENABLED
      • IS_APPINVITE_ENABLED
      • IS_GCM_ENABLED
      • IS_SIGNIN_ENABLED
      • GOOGLE_APP_ID
    2. Open the runner workspace in Xcode with open pronto_mia/ios/Runner.xcworkspace
    3. Plug in and select your iOS device in Xcode
    4. On your iOS device choose to trust the current computer when prompted.
    5. Sign in with your Apple ID in Xcode.
    6. In Runner.xcodeproj under the Targets/Runner tab, navigate to Signing & Capabilities and choose the Pronto AG Development Team
    7. On your iOS device in Settings/General/Device Management choose to trust the development certificate.
    8. Run the application either through your IDE, Xcode or with flutter run.

Special Dependencies

When updating one of the following dependencies, additional steps are required: