Olá, estou fazendo o curso de Ionic versão 3 e estou tendo problemas no build do Ionic para a plataforma IOS. O erro:
Error: Cannot read property 'toLowerCase' of undefined
[ERROR] An error occurred while running cordova build ios (exit code 1).
Já procurei em inúmeros fóruns, mas não consigo achar a resposta ou algo que me ajude. Alguém consegue me ajudar? Por favor
Vou disponibilizar arquivos que acho importante para a resolução:
package.json
"dependencies": {
"@angular/common": "4.4.4",
"@angular/compiler": "4.4.4",
"@angular/compiler-cli": "4.4.4",
"@angular/core": "4.4.4",
"@angular/forms": "4.4.4",
"@angular/http": "4.4.4",
"@angular/platform-browser": "4.4.4",
"@angular/platform-browser-dynamic": "4.4.4",
"@ionic-native/camera": "^4.5.2",
"@ionic-native/core": "4.3.2",
"@ionic-native/date-picker": "^4.5.2",
"@ionic-native/onesignal": "^4.5.2",
"@ionic-native/splash-screen": "4.3.2",
"@ionic-native/status-bar": "4.3.2",
"@ionic-native/vibration": "^4.5.2",
"@ionic/storage": "2.0.1",
"cordova-android": "^6.2.3",
"cordova-ios": "^4.4.0",
"cordova-plugin-camera": "^2.4.1",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-datepicker": "^0.9.3",
"cordova-plugin-device": "^1.1.4",
"cordova-plugin-ionic-webview": "^1.2.1",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-vibration": "^2.1.6",
"cordova-plugin-whitelist": "^1.3.1",
"ionic-angular": "3.8.0",
"ionic-plugin-keyboard": "^2.2.1",
"ionicons": "3.0.0",
"rxjs": "5.4.3",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"@ionic/app-scripts": "^3.2.4",
"typescript": "2.3.4"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-vibration": {},
"cordova-plugin-datepicker": {},
"cordova-plugin-device": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-whitelist": {},
"ionic-plugin-keyboard": {},
"cordova-plugin-camera": {
"CAMERA_USAGE_DESCRIPTION": " ",
"PHOTOLIBRARY_USAGE_DESCRIPTION": " "
}
},
"platforms": [
"android",
"ios"
]
}
}
app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';
import { MyApp } from './app.component';
import { HttpClientModule } from '@angular/common/http';
import { CarrosServiceProvider } from '../providers/carros-service/carros-service';
import { AgendamentosServiceProvider } from '../providers/agendamentos-service/agendamentos-service';
import 'rxjs/add/operator/finally';
import 'rxjs/add/operator/do';
import 'rxjs/add/operator/mergeMap';
import 'rxjs/add/observable/fromPromise';
import 'rxjs/add/observable/of';
import 'rxjs/add/operator/catch';
import { IonicStorageModule } from '@ionic/storage';
import { AgendamentoDaoProvider } from '../providers/agendamento-dao/agendamento-dao';
import { UsuariosServiceProvider } from '../providers/usuarios-service/usuarios-service';
import { UrlServiceProvider } from '../providers/url-service/url-service';
import { Vibration } from '@ionic-native/vibration';
import { DatePicker } from '@ionic-native/date-picker';
import { Camera } from '@ionic-native/camera';
//import { OneSignal } from '@ionic-native/onesignal';
@NgModule({
declarations: [
MyApp
],
imports: [
BrowserModule,
HttpClientModule,
IonicModule.forRoot(MyApp),
IonicStorageModule.forRoot({
name: 'aluracar',
storeName: 'agendamentos',
driverOrder: ['indexeddb']
})
],
providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler},
CarrosServiceProvider,
AgendamentosServiceProvider,
AgendamentoDaoProvider,
UsuariosServiceProvider,
UrlServiceProvider,
Vibration,
DatePicker,
Camera,