Skip to main content

Example of Awesome Cordova Library from Joazco

Project for test @awesome-cordova-library.

Online documentation

This project is initialize from Cordova ReactJS project.

Installation

git clone https://github.com/joazco/awesome-cordova-library.git
cd example
npm install
npm start

Configuration

Edit config.ts

ParameterTypeDescription
namestringRequired. Your application name
build.versionstringRequired. Your application name
build.idstringRequired. Full version number expressed in major/minor/patch notation.
build.versionstringRequired. Specifies the app's identifier. The id should be in a reverse-DNS format however, only alphanumeric and dot characters are allowed. e.g: com.example.myapp
build.android.versionCodestringRequired. Alternative version for Android. Sets the version code for the application. See the Android guide for information on how this attribute may be modified.
build.ios.CFBundleVersionstringRequired. Alternative version for iOS. For further details, see iOS versioning.
author.emailstringAuthor email
author.linkstringAuthor link
author.namestringAuthor name
fullscreenbooleanDefault: false. Set application fullscreen
statusbar.showbooleanDefault: true. Shows the statusbar.
statusbar.backgroundColorstringDefault: #ffffff. Set the background color of the statusbar by a hex string (#RRGGBB) at startup
statusbar.overlaysWebViewbooleanDefault: true. Make the statusbar overlay or not overlay the WebView at startup
statusbar.contentStyledefault lightContentDefault: default. Set the status bar style (e.g. text color)
screenOrientationany landscape landscape-primary landscape-secondary portrait portrait-primary portrait-secondaryDefault: any. Set screen orientation
splashscreen.splashscreenDelaynumberDefault: 3000. Amount of time in milliseconds to wait before automatically hide splash screen.
splashscreen.fadeSplashscreenbooleanDefault: true. Set to false to prevent the splash screen from fading in and out when its display state changes.
splashscreen.fadeSplashscreenDurationnumberDefault: 500. Specifies the number of milliseconds for the splash screen fade effect to execute.

Ios

Installation

cordova platform add ios
cordova platform prepare ios

Open file platform/ios/*.xcworkspace with XCode

Icon and Splashscreen

Icon and splashscreen will be generated at prepare command. Based on files resources/icon.png and resources/splash.png. Icon image needs to be 1024x1024 pixel and Splashscreen image needs to be 2732x2732 pixel.

Android

Installation

cordova platform add android@11 # Version 11 is minimal version to push store
cordova prepare android

Open folder platform/android with Android Studio

Icon

Icon will be generated at prepare command. Based on files resources/android/icon-background.png resources/android/icon-foreground.png. They needs to be 432x432 pixels.

Splashscreen

Android need an xml at resources/splash.xml see more. You can change background color at resources/colors.xml.

Browser

cordova platform add browser
cordova build browser

Upload platform/browser/www on your server.

Electron

If you can build a website, you can build a desktop app. Electron is a framework for creating native applications see documentation

cordova platform add electron
cordova run electron --nobuild
cordova build electron --release

Other documentations