688750f835 | ||
---|---|---|
.. | ||
www | ||
README.md | ||
config.xml | ||
package-lock.json | ||
package.json |
README.md
Sample application
This is a sample application that demonstrates some of capabilities of App Center for Cordova
To run application and test those capabilities please follow the instructions below:
-
Configure Application Secrets for both iOS and Android
In
config.xml
findAPP_SECRET
preference for both iOS and Android platforms and set it's value to application secret as displayed in App Center portal -
Change other plugins preferences if required
Change
APPCENTER_ANALYTICS_ENABLE_IN_JS
andAPPCENTER_CRASHES_ALWAYS_SEND
values if you want. By default application is configured to not send analytics automatically to demonstrate/test scenario with programmatic switching App Center Analytics functionality on and off; Crashes plugin is also configured to process crashes in JS rather than send them automatically to demonstrate crashes processing and reports events handling. -
Configure Google FCM
Download
google-services.json
from Firebase portal and put it nearconfig.xml
to enable receiving push notifications on Android and then find and uncomment the following section inconfig.xml
:<!-- <resource-file src="google-services.json" target="google-services.json" /> -->
For iOS no additional configuration is required.
-
Install dependencies
Run
npm install
in console to install Cordova CLI locally -
Run app on Android/iOS
In console type
cordova run android
orcordova run ios
to launch application on either Android of iOS device or emulator. The command will run application on device if connected or start an emulator and launch app on emulator.Hint: If you want to pass some additional arguments to underlying
cordova
command, add them after double dash--
, for example to run application on iPhone 7 simulator usecordova run ios --target=iPhone-7