how to remove or disable ionic 5 default splash screen ionic version 5 - ionic-framework

How can I replace Ionic 5 default splash screen with a custom HTML or Lottie one?
default spash screen
My package.json is
{
"name": "safenotes",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#angular/common": "~10.0.0",
"#angular/core": "~10.0.0",
"#angular/fire": "^6.1.1",
"#angular/forms": "~10.0.0",
"#angular/platform-browser": "~10.0.0",
"#angular/platform-browser-dynamic": "~10.0.0",
"#angular/router": "~10.0.0",
"#capacitor/android": "^2.4.3",
"#capacitor/core": "2.4.3",
"#ionic-native/core": "^5.0.0",
"#ionic-native/splash-screen": "^5.0.0",
"#ionic-native/status-bar": "^5.0.0",
"#ionic/angular": "^5.0.0",
"#ionic/storage": "^2.3.1",
"firebase": "^8.1.1",
"rxjs": "~6.5.5",
"tslib": "^2.0.0",
"zone.js": "~0.10.3"
},
"devDependencies": {
"#angular-devkit/build-angular": "~0.1000.0",
"#angular/cli": "~10.0.5",
"#angular/compiler": "~10.0.0",
"#angular/compiler-cli": "~10.0.0",
"#angular/language-service": "~10.0.0",
"#capacitor/cli": "2.4.3",
"#ionic/angular-toolkit": "^2.3.0",
"#types/jasmine": "~3.5.0",
"#types/jasminewd2": "~2.0.3",
"#types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~3.9.5"
},
"description": "An Ionic project"
}

Unfortunately it looks like only png files are supported at the moment.
You need to use Capacitor Assets (formerly known as cordova-res).
Install it globally:
$ npm install -g cordova-res
Than prepare the following files in the resources folder:
resources/
├── android
| ├── icon-background.png (1)
| └── icon-foreground.png (1)
├── icon.png
└── splash.png
config.xml (2)
Then generate all the required icons and splash screens with:
$ cordova-res
You can also use the --copyoption to automatically copy the files into the android/ios projects, e.g.:
$ cordova-res ios --skip-config --copy
$ cordova-res android --skip-config --copy
(1) These icons are only necessary if you want adaptive icons for android to be generated. They must be present if your android project already uses default adaptive icons from capacitor.
(2) Config file is optional as well, check the docs for updated instructions and many more details.

Related

ionic cordova run browser errors

I am trying to run a live reload in the browser as i need to be able to see the camera working but i'm just running into one issue after another.
Command: ionic cordova run browser --livereload
The current error is this:
[ng] An unhandled exception occurred: Job name "..getProjectMetadata"
does not exist.
These errors don't even state where it's coming from, but here is my package... it seems to be related to the build-angular package but no matter what i do it either has the error above or the following depending on what version is used:
Schema validation failed with the following errors: Data path ""
should NOT have additional properties(project)
{
"name": "org.apache.cordova.newapp",
"displayName": "frontend",
"version": "1.0.0",
"description": "A sample Apache Cordova application that responds to the deviceready event.",
"main": "index.js",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"build-prod": "node --max_old_space_size=5048 ./node_modules/#angular/cli/bin/ng build --prod"
},
"private": true,
"dependencies": {
"#angular/animations": "^10.2.5",
"#angular/cdk": "^8.2.3",
"#angular/common": "^8.2.10",
"#angular/compiler": "^8.2.10",
"#angular/core": "^8.2.10",
"#angular/flex-layout": "^8.0.0-beta.27",
"#angular/forms": "^8.2.14",
"#angular/http": "^7.2.16",
"#angular/material": "^8.2.3",
"#angular/platform-browser": "^8.2.10",
"#angular/platform-browser-dynamic": "^8.2.10",
"#angular/router": "^8.2.10",
"#awesome-cordova-plugins/media-capture": "^5.37.3",
"#ionic/angular-toolkit": "^5.0.3",
"#ionic/core": "^5.8.4",
"#ng-bootstrap/ng-bootstrap": "^5.3.1",
"angular-calendar": "^0.28.28",
"angular-flatpickr": "^3.6.6",
"angular-linky": "^1.2.2",
"angular-password-strength-meter": "^3.0.1",
"angularx-flatpickr": "^6.6.0",
"angularx-social-login": "^3.5.7",
"date-fns": "^2.25.0",
"emoji-js": "^3.6.0",
"flatpickr": "^4.6.9",
"hammerjs": "^2.0.8",
"jquery": "^3.6.0",
"ng-recaptcha": "^7.0.2",
"ng-socket-io": "^0.2.4",
"ng2-file-upload": "^1.4.0",
"ngb-modal": "^2.0.3",
"ngx-emoji-picker": "0.0.2",
"ngx-file-drop": "^10.1.1",
"ngx-image-cropper": "^3.3.5",
"ngx-infinite-scroll": "^9.1.0",
"ngx-lightbox": "^2.5.1",
"ngx-paypal": "^6.2.0",
"ngx-toastr": "^11.3.3",
"ngx-ui-loader": "^8.0.0",
"rxjs": "^6.6.7",
"rxjs-compat": "^6.6.7",
"socket.io-client": "^2.4.0",
"tslib": "^1.14.1",
"ws": "^7.5.5",
"zone.js": "~0.9.1",
"zxcvbn3": "^0.1.1"
},
"devDependencies": {
"#angular-devkit/build-angular": "^13.1.2",
"#angular/cli": "^8.3.29",
"#angular/compiler-cli": "^8.2.10",
"#angular/language-service": "^8.2.10",
"#types/jasmine": "~3.3.8",
"#types/jasminewd2": "^2.0.10",
"#types/node": "~8.9.4",
"codelyzer": "^5.0.0",
"cordova-android": "^9.1.0",
"cordova-browser": "^6.0.0",
"cordova-plugin-device": "2.0.2",
"cordova-plugin-ionic-keyboard": "^2.0.5",
"cordova-plugin-ionic-webview": "^4.0.0",
"cordova-plugin-splashscreen": "5.0.2",
"cordova-plugin-statusbar": "2.4.2",
"cordova-plugin-whitelist": "^1.3.4",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.7.0",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.5.3"
},
"keywords": [
"ecosystem:cordova"
],
"author": "Apache Cordova Team",
"license": "Apache-2.0",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-media-capture": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {}
},
"platforms": [
"android",
"browser"
]
}
}

UNMET PEER DEPENDENCY error for ionic-paypal

I was trying to install paypal & onesignal plugin from official website with the help of official documentations and I got this error:
+-- UNMET PEER DEPENDENCY #ionic-native/core#4.3.2
`-- #ionic-native/paypal#5.30.0
Here is my Package.json
{
"name": "ionic-hello-world",
"version": "0.0.0",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"#angular/common": "5.0.0",
"#angular/compiler": "5.0.0",
"#angular/compiler-cli": "5.0.0",
"#angular/core": "5.0.0",
"#angular/forms": "5.0.0",
"#angular/http": "5.0.0",
"#angular/platform-browser": "5.0.0",
"#angular/platform-browser-dynamic": "5.0.0",
"#ionic-native/core": "4.3.2",
"#ionic-native/onesignal": "^5.30.0",
"#ionic-native/paypal": "^5.30.0",
"#ionic-native/splash-screen": "4.3.2",
"#ionic-native/status-bar": "4.3.2",
"#ionic/storage": "2.1.3",
"ionic-angular": "3.9.2",
"ionicons": "3.0.0",
"rxjs": "5.5.2",
"sw-toolbox": "3.6.0",
"woocommerce-api": "^1.5.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"#ionic/app-scripts": "^3.2.4",
"typescript": "2.4.2"
},
"cordovaPlugins": [
"ionic-plugin-keyboard",
"cordova-plugin-whitelist",
"cordova-plugin-statusbar",
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-splashscreen"
],
"cordovaPlatforms": [],
"description": "ClickThrough: An Ionic project"
}
The PayPal service used by ionic-native/paypal has been deprecated for years and is end of life on December 7.
You should instead integrate the v2/checkout/orders API from a server, with or without the JS front end for the approval flow.
Approval requires a full mobile browser or SFSafariViewController/Chrome Custom Tabs. Approval cannot be given in a WKWebView or similar.

Error: “Unresolved function or method present()” when using LoadingController

ISSUE:
When I use the LoadingController in my project, I see the following error: "Unresolved function or method present()"
Here is the screenshot code that I have in my file:
As we can see from the screenshot, there are 2 pieces of code that show the same error. The code from lines: 51-61 are a direct copy of the code from the ionic documentation that can be seen under Usage
The code from lines: 63-69 are the trimmed down and basic version of the code and for testing purposes await is removed in front of the loading.present();. Yet it throws the same error as the original code above.
GOAL:
What can we do to fix the issue so that Intellij Idea (IDE) stops complaining about the same?
Following is the info from my package.json:
{
"name": "gf",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"#angular/common": "~8.1.2",
"#angular/compiler": "~8.1.2",
"#angular/core": "~8.1.2",
"#angular/forms": "~8.1.2",
"#angular/platform-browser": "~8.1.2",
"#angular/platform-browser-dynamic": "~8.1.2",
"#angular/router": "~8.1.2",
"#ionic-native/core": "^5.0.0",
"#ionic-native/splash-screen": "^5.0.0",
"#ionic-native/status-bar": "^5.0.0",
"#ionic/angular": "^4.7.1",
"#ionic/storage": "^2.2.0",
"cordova-sqlite-storage": "^3.2.1",
"core-js": "^2.5.4",
"rxjs": "~6.5.1",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"#angular-devkit/architect": "~0.801.2",
"#angular-devkit/build-angular": "~0.801.2",
"#angular-devkit/core": "~8.1.2",
"#angular-devkit/schematics": "~8.1.2",
"#angular/cli": "~8.1.2",
"#angular/compiler": "~8.1.2",
"#angular/compiler-cli": "~8.1.2",
"#angular/language-service": "~8.1.2",
"#ionic/angular-toolkit": "~2.0.0",
"#types/jasmine": "~3.3.8",
"#types/jasminewd2": "~2.0.3",
"#types/node": "~8.9.4",
"codelyzer": "^5.0.0",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.4.3"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-sqlite-storage": {}
}
}
}
No sure it is the right way to do it but i managed to Intellij to stop whining
return (<any>loading).present();

Ionic 3: ios-file-picker crashing app on device running iOS 10.x, not 11

I'm using the plugin here: iOSFilePicker to access iCloud from my app to grab a file.
It works in debug on my machine, built through ionic command line with:
ionic cordova build ios --prod --release
However, when I actually archive the build in Xcode and release through the store beta channel for testing, the app crashes when I invoke the iOSFilePicker on an iOS 10.x device (iPhone 5).
Has anyone got an idea why?
Things to note:
working fine on iOS 11.x (iPhone 6 + 6s)
No errors, just a complete crash back to the home-screen iOS 10.x
I enabled capabilities for iCloud in Xcode, see screenshot below...
...despite the containers checkboxes not being ticked, it works when I run it on ios 11.x devices.
For reference, here's my package.json:
{
"name": "mycompany-web-ionic",
"version": "0.0.1",
"author": "MyCompany Ltd",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"#angular/animations": "5.2.9",
"#angular/common": "5.2.9",
"#angular/compiler": "5.2.9",
"#angular/compiler-cli": "5.2.9",
"#angular/core": "5.2.9",
"#angular/forms": "5.2.9",
"#angular/http": "5.2.9",
"#angular/platform-browser": "5.2.9",
"#angular/platform-browser-dynamic": "5.2.9",
"#ionic-native/app-version": "^4.7.0",
"#ionic-native/core": "4.7.0",
"#ionic-native/device": "4.7.0",
"#ionic-native/file": "4.7.0",
"#ionic-native/file-chooser": "4.7.0",
"#ionic-native/file-picker": "^4.7.0",
"#ionic-native/file-transfer": "4.7.0",
"#ionic-native/keyboard": "4.7.0",
"#ionic-native/network": "4.7.0",
"#ionic-native/splash-screen": "4.7.0",
"#ionic-native/status-bar": "4.7.0",
"#ionic/pro": "^1.0.20",
"#ionic/storage": "2.1.3",
"angular2-fusioncharts": "^1.0.2-rc.5",
"highcharts": "^6.1.0",
"ionic-angular": "3.9.2",
"ionicons": "3.0.0",
"moment": "^2.22.1",
"rxjs": "5.5.7",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.20"
},
"devDependencies": {
"#ionic/app-scripts": "^3.1.9",
"typescript": "~2.6.2"
},
"description": "An Ionic project"
}

Type 'promise.Promise<string>' is not assignable to type 'Promise<string>'

I am facing some strange issue with the protractor tests. I have used the following piece of code to get the text of the element.
getTitleElementValue(): Promise<string> {
return this.getTitleElement().getAttribute('value')
}
all went good till I pushed my code to git. Immediately I pulled the latest code and from then I am getting the error
Type 'promise.Promise<string>' is not assignable to type 'Promise<string>'
I am confused with the output and need some some inputs from you regarding the issue. would like to provide any other details. below is the package.json
{
"name": "ris-beta",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"generate:proxy": "node config/proxy.js",
"start": "npm run generate:proxy && ng serve --ssl true --ssl-key config/ssl/localhost.key --ssl-cert config/ssl/localhost.crt --proxy-config proxy.conf.json --host=0.0.0.0",
"start:http": "npm run generate:proxy && ng serve --proxy-config proxy.conf.json --host=0.0.0.0",
"test": "ng test --watch=false",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor",
"lint": "ng lint --type-check",
"deploy": "npm run test && npm run clean-build && npm run deploy-only",
"rimraf": "rimraf",
"clean:dist": "npm run rimraf -- dist",
"clean-build": "npm run clean:dist && ng build -prod --aot=false --sourcemaps",
"deploy-only": "node config/deploy.js",
"compodoc": "./node_modules/.bin/compodoc -p src/tsconfig.app.json"
},
"private": true,
"dependencies": {
"#angular/animations": "^5.0.0-rc.6",
"#angular/cdk": "^5.2.3",
"#angular/common": "^5.2.7",
"#angular/compiler": "^5.2.7",
"#angular/core": "^5.2.7",
"#angular/forms": "^5.2.7",
"#angular/http": "^5.2.7",
"#angular/material": "^5.2.3",
"#angular/platform-browser": "^5.2.7",
"#angular/platform-browser-dynamic": "^5.2.7",
"#angular/router": "^5.2.7",
"#ngrx/effects": "^4.1.0",
"#ngrx/store": "^4.1.0",
"#ngrx/store-devtools": "^4.0.0",
"angular-split": "^0.2.7",
"angular-tree-component": "^5.2.0",
"bootstrap": "4.0.0-alpha.6",
"core-js": "^2.4.1",
"font-awesome": "^4.7.0",
"ngx-clipboard": "^9.0.0",
"normalize.css": "^7.0.0",
"primeng": "^5.0.0",
"rxjs": "=5.5.2",
"tinymce": "4.7.4",
"zone.js": "^0.8.14"
},
"devDependencies": {
"#angular/cli": "1.5.0-rc.3",
"#angular/compiler-cli": "^5.2.7",
"#angular/language-service": "^5.2.7",
"#compodoc/compodoc": "^1.0.8",
"#types/jasmine": "~2.5.53",
"#types/jasminewd2": "~2.0.2",
"#types/node": "^6.0.101",
"archiver": "2.0.0",
"codelyzer": "~3.2.0",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-phantomjs-launcher": "^1.0.4",
"karma-remap-istanbul": "^0.6.0",
"ngx-clipboard": "^9.0.0",
"normalize.css": "^7.0.0",
"phantomjs-polyfill": "0.0.2",
"protractor": "~5.1.2",
"quill": "^1.3.4",
"sync-request": "4.0.3",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.4.2"
}
}
Thanks in advance.
Because Protractor has self Promise implement and currently Protractor still use self Promise implement, not use Nodejs native Promise.
You declared the result value using Nodejs native Promise, should use the Protractor self Promise implement.
import { browser, by, protractor, promise, ElementFinder } from 'protractor'
getTitleElementValue(): promise.Promise<string> {
return this.getTitleElement().getAttribute('value')
}
FYI, Protractor switch to use Nodejs native Promise is going on and plan to happen at 2018/10.