I'm following this Ionic SDK Setup link. I'm setting up the push notification on my app.
It's working, I can get the notification. Here's my code.
this.platform.ready().then(() => {
let OneSignal = window["plugins"].OneSignal;
OneSignal
.startInit(AppSettings.ONESIGNAL_APP_ID)
.inFocusDisplaying(OneSignal.OSInFocusDisplayOption.Notification)
.handleNotificationOpened(function(jsonData) {
console.log('OPENED');
})
.handleNotificationReceived(function(jsonData) {
console.log('RECEIVED');
})
.endInit();
OneSignal.getIds(notificationsCallBack.getIdReceived.bind(this));
});
However, the function handleNotificationReceived is only called if the app is open. I need to execute some code (I need an in-app badge), even if the app is closed. I'm setting the content_available to true on my OneSignal API, I also tested directly on the OneSignal website and I couldn't make it works. The function handleNotificationOpened works as expected.
How can I handle the notification received event when my app is not open?
I'm testing on iPhone 6+, iOS 11.0.3
My env:
Ionic 3.12.0
Cordova 7.0.1
My package.json
{
"name": "XXX",
"author": "XXXX XX",
"homepage": "XXX",
"private": true,
"scripts": {
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"#angular/common": "4.2.2",
"#angular/compiler": "4.2.2",
"#angular/compiler-cli": "4.2.2",
"#angular/core": "4.2.2",
"#angular/forms": "4.2.2",
"#angular/http": "4.2.2",
"#angular/platform-browser": "4.2.2",
"#angular/platform-browser-dynamic": "4.2.2",
"#angular/platform-server": "4.2.2",
"#angular/router": "^4.2.2",
"#ionic-native/camera": "^3.4.4",
"#ionic-native/core": "^3.10.3",
"#ionic-native/facebook": "^4.3.1",
"#ionic-native/geolocation": "^3.2.2",
"#ionic-native/google-maps": "^3.4.4",
"#ionic-native/google-plus": "^3.4.4",
"#ionic-native/image-picker": "^3.2.2",
"#ionic-native/native-storage": "^3.4.4",
"#ionic-native/splash-screen": "^3.12.1",
"#ionic-native/status-bar": "^3.12.1",
"#ionic-native/toast": "^3.10.3",
"#ionic-native/transfer": "^3.2.2",
"#ionic/storage": "^2.0.0",
"bourbon": "^4.2.7",
"cordova-ios": "^4.5.1",
"cordova-plugin-camera": "^2.4.1",
"cordova-plugin-compat": "^1.2.0",
"cordova-plugin-console": "^1.0.7",
"cordova-plugin-crop": "^0.3.1",
"cordova-plugin-device": "^1.1.6",
"cordova-plugin-facebook4": "^1.7.4",
"cordova-plugin-googlemaps": "^2.0.11",
"cordova-plugin-googlemaps-sdk": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git",
"cordova-plugin-googleplus": "^5.1.1",
"cordova-plugin-nativestorage": "^2.2.2",
"cordova-plugin-splashscreen": "^4.0.3",
"cordova-plugin-statusbar": "^2.2.3",
"cordova-plugin-whitelist": "^1.3.2",
"cordova-plugin-x-toast": "^2.6.0",
"cordova-sqlite-storage": "^2.0.4",
"cropperjs": "^1.1.0",
"font-awesome": "^4.7.0",
"ionic-angular": "3.3.0",
"ionic-native": "2.9.0",
"ionic-plugin-keyboard": "^2.2.1",
"ionic2-auto-complete": "^1.5.0-beta",
"ionicons": "3.0.0",
"ios-sim": "^6.1.2",
"ng2-cookies": "^1.0.4",
"onesignal-cordova-plugin": "^2.0.11",
"rxjs": "5.4.0",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.12"
},
"devDependencies": {
"#ionic/app-scripts": "1.3.7",
"typescript": "2.3.4"
},
"cordovaPlugins": [
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"ionic-plugin-keyboard",
"cordova-plugin-geolocation",
"cordova-plugin-compat",
"cordova-plugin-file-transfer",
"cordova-plugin-file"
],
"cordovaPlatforms": [
{
"platform": "ios",
"version": "",
"locator": "ios"
},
{
"platform": "android",
"version": "",
"locator": "android"
}
],
"description": "ion2-FullApp: The Best Ionic 2 Starter app",
"config": {
"ionic_sass": "./config/sass.config.js",
"ionic_copy": "./config/copy.config.js"
},
"cordova": {
"platforms": [
"ios"
],
"plugins": {
"cordova-plugin-camera": {
"CAMERA_USAGE_DESCRIPTION": " ",
"PHOTOLIBRARY_USAGE_DESCRIPTION": " "
},
"cordova-plugin-console": {},
"cordova-plugin-crop": {},
"cordova-plugin-device": {},
"cordova-plugin-facebook4": {
"APP_ID": "XX",
"APP_NAME": "XXX"
},
"cordova-plugin-googleplus": {
"REVERSED_CLIENT_ID": "XX"
},
"cordova-plugin-nativestorage": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-x-toast": {},
"cordova-sqlite-storage": {},
"ionic-plugin-keyboard": {},
"onesignal-cordova-plugin": {},
"cordova-plugin-googlemaps": {
"API_KEY_FOR_ANDROID": "XX",
"API_KEY_FOR_IOS": "XX",
"LOCATION_WHEN_IN_USE_DESCRIPTION": "Show your location on the map",
"LOCATION_ALWAYS_USAGE_DESCRIPTION": "Trace your location on the map",
"key": "XX"
}
}
}
}
The notification opened event was fixed in the OneSignal Cordova SDK 2.2.0. It was only an issue for iOS 11 devices.
you need to check this. Let me know if it works for you.
You need to set content_available and mutable_content in true in the body of the POST request.
Related
I found issues from cordova-plugin-local-notification in ionic 5.
https://ionicframework.com/docs/native/local-notifications
I want to use multiple notifications in ionic ios
import { LocalNotifications } from '#ionic-native/local-notifications/ngx';
...
constructor(private localNotifications: LocalNotifications) { }
sendNoti() {
let scheduleList = [];
const currentDate = moment().add(1, 'minutes');
const currentDate2 = moment().add(2, 'minutes');
scheduleList.push({
id: 1,
text: 'alert',
foreground: true,
vibrate: true,
led: { color: '#FF00FF', on: 500, off: 500 },
});
scheduleList.push({
id: 2,
text: 'noti 1 min',
foreground: true,
vibrate: true,
trigger: { at: new Date(currentDate.toDate()) },
led: { color: '#FF00FF', on: 500, off: 500 },
});
scheduleList.push({
id: 3,
text: 'noti 2 min',
foreground: true,
vibrate: true,
trigger: { at: new Date(currentDate2.toDate()) },
led: { color: '#FF00FF', on: 500, off: 500 },
});
this.localNotifications.requestPermission().then((permission) => {
this.localNotifications.schedule(scheduleList);
});
}
but I receive local notification id 1, I did not receive local notification id 2 and id 3. I found error in output xcode
2021-02-13 16:35:15.446376+0700 MyApp[231:3780] 4
2021-02-13 16:35:15.495124+0700 MyApp[231:4162] [local-notification] Next trigger at: (null)
2021-02-13 16:35:15.525587+0700 MyApp[231:4162] [local-notification] Next trigger at: (null)
my package.json
{
"name": "moblie_local_notification",
"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/forms": "~10.0.0",
"#angular/platform-browser": "~10.0.0",
"#angular/platform-browser-dynamic": "~10.0.0",
"#angular/router": "~10.0.0",
"#ionic-native/core": "^5.0.0",
"#ionic-native/local-notifications": "^5.31.1",
"#ionic-native/splash-screen": "^5.0.0",
"#ionic-native/status-bar": "^5.0.0",
"#ionic/angular": "^5.0.0",
"cordova-ios": "^5.1.1",
"cordova-plugin-badge": "^0.8.8",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-local-notification": "^0.9.0-beta.3",
"firebase": "^7.21.0",
"moment": "^2.29.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",
"#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",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.2.1",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"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",
"cordova": {
"plugins": {
"cordova-plugin-local-notification": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {}
},
"platforms": [
"ios"
]
}
}
ionic info
Ionic:
Ionic CLI : 5.4.16 (/usr/local/lib/node_modules/ionic)
Ionic Framework : #ionic/angular 5.3.2
#angular-devkit/build-angular : 0.1000.8
#angular-devkit/schematics : 10.0.8
#angular/cli : 10.0.8
#ionic/angular-toolkit : 2.3.3
Cordova:
Cordova CLI : 9.0.0 (cordova-lib#9.0.1)
Cordova Platforms : ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0,
cordova-plugin-ionic-webview 4.2.1, (and 6 other plugins)
Anyone have a solution to fix this issue or not?
Or have any suggestion plugin?
Error Description:
I built the project on VsCode using "ionic cordova build ios --prod", opened it in XCode (project.xcworkspace) and deployed it to an iPhone. However, when I open the app it gets stuck on a blank page. I debugged it using safari's development tool and I got the following error on console: "Error: cannot find module "." ".
What I've tried:
I researched the error and tried a couple solution, but no luck.
Changed typescript version to "~2.6.2", "2.6.2", "2.8.3"
Removed "^" from typescript version;
Changed app-script version to "3.1.9", "3.2.1", "3.2.2", "3.2.3"
Went through my imports to see if any of them had "/udm", but none of them do;
Also tried different XCode versions: 8, 9, 10 and 12;
Tried adding different versions of ios platform: 4.5.0, 4.5.5, 5.0.1, 5.1.0 and the latest;
Here are some links I visited, had no luck with their solutions though:
https://forum.ionicframework.com/t/build-in-prod-mode-cannot-find-module/132231/7
Ionic 3: Build in “prod” mode: Cannot find module “.”
https://forum.ionicframework.com/t/runtime-error-cannot-find-module/93967/3
How can I resolve Ionic Uncaught Error: Cannot find module "." when adding new page?
Info:
ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 10.0.0
local packages:
#ionic/app-scripts : 3.2.4
Cordova Platforms : ios 5.1.0
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.11.3
Node : v14.15.0
npm : 6.14.8
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b
Package.json:
{
"name": "name",
"version": "0.0.1",
"author": "author",
"homepage": "https://homepage.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.11",
"#angular/common": "5.2.11",
"#angular/compiler": "5.2.11",
"#angular/compiler-cli": "5.2.11",
"#angular/core": "5.2.11",
"#angular/forms": "5.2.11",
"#angular/http": "^7.2.10",
"#angular/platform-browser": "5.2.11",
"#angular/platform-browser-dynamic": "5.2.11",
"#grpc/grpc-js": "^1.1.7",
"#ionic-native/app-availability": "^4.20.0",
"#ionic-native/app-version": "^4.15.0",
"#ionic-native/barcode-scanner": "^4.9.0",
"#ionic-native/camera": "^4.7.0",
"#ionic-native/core": "4.7.0",
"#ionic-native/file": "^4.20.0",
"#ionic-native/file-path": "^4.7.0",
"#ionic-native/fingerprint-aio": "^4.20.0",
"#ionic-native/firebase": "^4.20.0",
"#ionic-native/firebase-crashlytics": "^5.30.0",
"#ionic-native/header-color": "^4.17.0",
"#ionic-native/http": "^4.20.0",
"#ionic-native/in-app-browser": "^3.1.0",
"#ionic-native/ionic-webview": "^5.0.0",
"#ionic-native/pin-dialog": "^4.20.0",
"#ionic-native/push": "^3.14.0",
"#ionic-native/social-sharing": "^4.15.0",
"#ionic-native/splash-screen": "4.7.0",
"#ionic-native/status-bar": "^4.7.0",
"#ionic-native/vibration": "^4.8.0",
"#ionic/storage": "2.1.3",
"angularfire2": "^5.4.2",
"brmasker-ionic-3": "^1.5.3",
"cordova-ios": "4.5.5",
"cordova-plugin-appavailability": "^0.4.2",
"cordova-plugin-headercolor": "^1.0.0",
"cordova-plugin-inappbrowser": "^3.1.0",
"cordova-plugin-ionic-webview": "^4.1.3",
"cordova-plugin-pin-dialog": "^0.1.3",
"cordova-plugin-splashscreen": "6.0.0",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-vibration": "^3.1.1",
"cordova-plugin-whitelist": "1.3.4",
"crypto-js": "^3.1.9-1",
"firebase": "^7.2.4",
"ionic-angular": "3.9.2",
"ionic-stepper": "^1.1.0",
"ionicons": "3.0.0",
"ngx-barcode": "^0.2.4",
"ngx-qrcode2": "0.0.9",
"onesignal-cordova-plugin": "^2.11.1",
"rxjs": "^6.4.0",
"rxjs-compat": "^6.4.0",
"semver": "^7.3.2",
"sw-toolbox": "^3.6.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"#ionic/app-scripts": "3.2.4",
"#types/node": "7.0.7",
"cordova-android": "^8.0.0",
"cordova-plugin-advanced-http": "^3.1.0",
"cordova-plugin-androidx": "^3.0.0",
"cordova-plugin-androidx-adapter": "^1.1.1",
"cordova-plugin-app-version": "^0.1.12",
"cordova-plugin-camera": "^4.1.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-filepath": "^1.5.6",
"cordova-plugin-fingerprint-aio": "git+https://github.com/NiklasMerz/cordova-plugin-fingerprint-aio.git#f8e5588011506b4a386cbfa16346cd6b5ab85349",
"cordova-plugin-firebase-lib": "^5.1.1",
"cordova-plugin-ionic-keyboard": "2.0.5",
"cordova-plugin-x-socialsharing": "^5.4.1",
"es6-promise-plugin": "^4.2.2",
"phonegap-plugin-barcodescanner": "^8.0.0",
"typescript": "3.2.4"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-vibration": {},
"cordova-plugin-headercolor": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-pin-dialog": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-appavailability": {},
"onesignal-cordova-plugin": {},
"cordova-plugin-camera": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-filepath": {},
"cordova-plugin-file": {},
"cordova-plugin-advanced-http": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-fingerprint-aio": {
"FACEID_USAGE_DESCRIPTION": "Confirme sua digital"
},
"cordova-plugin-firebase-lib": {},
"cordova-plugin-androidx": {},
"cordova-plugin-androidx-adapter": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-app-version": {},
"cordova-plugin-ionic-keyboard": {},
"phonegap-plugin-barcodescanner": {},
"cordova-plugin-x-socialsharing": {
"PHOTO_LIBRARY_ADD_USAGE_DESCRIPTION": "This app requires photo library access to function properly.",
"PHOTO_LIBRARY_USAGE_DESCRIPTION": "This app requires photo library access to function properly."
},
"cordova-plugin-splashscreen": {}
},
"platforms": [
"ios"
]
}
}
i have a ionic 3 app that works with emulator android ios and it is publish on google store but when i tryed to upload on apple store it give me back "your app contains non-public api usage"
I'm trying to check all plugin list that may have caused the problem; different from an app I published several days ago are:
barcodescanner
call-number
email-composer
geolocation
leaflet
this is my package.json:
{
"name": "Nome App",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"start": "ionic-app-scripts serve",
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint"
},
"dependencies": {
"#angular/animations": "5.2.11",
"#angular/common": "5.2.11",
"#angular/compiler": "5.2.11",
"#angular/compiler-cli": "5.2.11",
"#angular/core": "5.2.11",
"#angular/forms": "5.2.11",
"#angular/http": "5.2.11",
"#angular/platform-browser": "5.2.11",
"#angular/platform-browser-dynamic": "5.2.11",
"#ionic-native/barcode-scanner": "^4.20.0",
"#ionic-native/call-number": "^4.18.0",
"#ionic-native/core": "~4.18.0",
"#ionic-native/email-composer": "^4.18.0",
"#ionic-native/geolocation": "^4.20.0",
"#ionic-native/in-app-browser": "^4.18.0",
"#ionic-native/network": "^4.20.0",
"#ionic-native/splash-screen": "~4.18.0",
"#ionic-native/status-bar": "~4.18.0",
"#ionic/storage": "2.2.0",
"call-number": "1.0.1",
"cordova-android": "7.1.4",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-email-composer": "0.9.2",
"cordova-plugin-geolocation": "4.0.1",
"cordova-plugin-inappbrowser": "3.0.0",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^3.1.2",
"cordova-plugin-network-information": "2.0.1",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"ionic-angular": "3.9.3",
"ionicons": "3.0.0",
"leaflet": "^1.5.1",
"phonegap-plugin-barcodescanner": "8.0.1",
"rxjs": "5.5.11",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.29"
},
"devDependencies": {
"#ionic/app-scripts": "3.2.1",
"typescript": "~2.6.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-network-information": {},
"phonegap-plugin-barcodescanner": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {},
"mx.ferreyra.callnumber": {},
"cordova-plugin-email-composer": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-geolocation": {}
},
"platforms": [
"android"
]
}
}
What version of cordova-ios are you using? I had the same error, after trying different things for a couple of days I deleted the plugins folder, then compiled for cordova-ios#4.5.5 and it worked.
ionic cordova platform add ios#4.5.5
I have used this CLI:
ionic cordova build ios --prod -- --buildFlag="-UseModernBuildSystem=0"
I have tried a lot of workarounds. But none of them worked. Any help would be a great help here.
** ARCHIVE FAILED **
The following build commands failed: Ld
/Users/sampath/Library/Developer/Xcode/DerivedData/You_are_a_CEO-gfwfhmbrnyncfrdrmuirefpabjjv/Build/Intermediates.noindex/ArchiveIntermediates/You\
are\ a\
CEO/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Branch.build/Objects-normal/armv7/Branch
normal armv7 Ld
/Users/sampath/Library/Developer/Xcode/DerivedData/You_are_a_CEO-gfwfhmbrnyncfrdrmuirefpabjjv/Build/Intermediates.noindex/ArchiveIntermediates/You\
are\ a\
CEO/IntermediateBuildFilesPath/Pods.build/Debug-iphoneos/Branch.build/Objects-normal/arm64/Branch
normal arm64 (2 failures)
Ionic info:
Ionic:
ionic (Ionic CLI) : 4.5.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
#ionic/app-scripts : 3.1.11
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : ios 4.5.4
Cordova Plugins : cordova-plugin-ionic-webview 1.2.1, (and 29 other plugins)
System:
ios-deploy : 1.9.4
NodeJS : v8.11.3 (/usr/local/bin/node)
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 10.1 Build version 10B61
package.json
{
"name": "ambassador",
"version": "3.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"config": {
"ionic_copy": "./config/copy.config.js"
},
"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"
},
"optionalDependencies": {
"ios-deploy": "^1.9.4"
},
"dependencies": {
"#agm/core": "^1.0.0-beta.2",
"#angular/common": "5.0.3",
"#angular/compiler": "5.0.3",
"#angular/compiler-cli": "5.0.3",
"#angular/core": "5.0.3",
"#angular/forms": "5.0.3",
"#angular/http": "5.0.3",
"#angular/platform-browser": "5.0.3",
"#angular/platform-browser-dynamic": "5.0.3",
"#ionic-native/app-version": "^4.11.0",
"#ionic-native/background-geolocation": "^4.15.0",
"#ionic-native/background-mode": "^4.8.0",
"#ionic-native/branch-io": "^4.15.0",
"#ionic-native/camera": "^4.5.2",
"#ionic-native/clipboard": "^4.9.1",
"#ionic-native/contacts": "^4.7.0",
"#ionic-native/core": "^4.14.0",
"#ionic-native/diagnostic": "^4.15.0",
"#ionic-native/document-viewer": "^4.15.0",
"#ionic-native/facebook": "^4.12.2",
"#ionic-native/file": "^4.5.2",
"#ionic-native/file-opener": "^4.11.0",
"#ionic-native/file-transfer": "^4.11.0",
"#ionic-native/geolocation": "^4.5.2",
"#ionic-native/google-maps": "^4.14.0",
"#ionic-native/image-resizer": "^4.7.0",
"#ionic-native/in-app-browser": "^4.12.0",
"#ionic-native/keyboard": "^4.11.0",
"#ionic-native/location-accuracy": "^4.5.2",
"#ionic-native/mixpanel": "^4.15.0",
"#ionic-native/music-controls": "^4.8.0",
"#ionic-native/onesignal": "^4.15.0",
"#ionic-native/screen-orientation": "^4.11.0",
"#ionic-native/sms": "^4.15.0",
"#ionic-native/social-sharing": "^4.9.1",
"#ionic-native/splash-screen": "4.4.0",
"#ionic-native/status-bar": "4.4.0",
"#ionic/pro": "^1.0.20",
"#ionic/storage": "2.1.3",
"#vimeo/player": "^2.6.3",
"angular-progress-bar": "^1.0.3",
"angular-svg-round-progressbar": "^2.0.0",
"angular2-google-place": "^2.0.2",
"angular2-jwt": "^0.2.3",
"angularfire2": "5.0.0-rc.6",
"animate.css": "^3.5.2",
"branch-cordova-sdk": "^3.1.3",
"com.synconset.imagepicker": "^2.1.10",
"cordova-android": "6.4.0",
"cordova-clipboard": "^1.2.1",
"cordova-custom-config": "^5.0.2",
"cordova-ios": "4.5.4",
"cordova-plugin-add-swift-support": "^1.7.1",
"cordova-plugin-app-version": "^0.1.9",
"cordova-plugin-background-mode": "git+https://github.com/katzer/cordova-plugin-background-mode.git",
"cordova-plugin-camera": "^4.0.3",
"cordova-plugin-cocoapod-support": "^1.6.0",
"cordova-plugin-contacts": "^3.0.1",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-document-viewer": "^0.9.10",
"cordova-plugin-facebook4": "^2.5.0",
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-file-opener2": "^2.0.19",
"cordova-plugin-file-transfer": "^1.7.1",
"cordova-plugin-geolocation": "^4.0.1",
"cordova-plugin-googlemaps": "^2.4.6",
"cordova-plugin-googlemaps-sdk": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git#2.6.0",
"cordova-plugin-inappbrowser": "^3.0.0",
"cordova-plugin-ionic-webview": "^1.2.1",
"cordova-plugin-mauron85-background-geolocation": "^2.3.6",
"cordova-plugin-mixpanel": "^4.5.0",
"cordova-plugin-music-controls": "^2.1.4",
"cordova-plugin-nativegeocoder": "^3.1.2",
"cordova-plugin-request-location-accuracy": "^2.2.3",
"cordova-plugin-screen-orientation": "^3.0.1",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-x-socialsharing": "^5.4.3",
"cordova-sms-plugin": "^0.1.13",
"cordova-sqlite-storage": "^2.5.2",
"cordova.plugins.diagnostic": "^4.0.10",
"css-animator": "^2.3.0",
"es6-promise-plugin": "^4.2.2",
"firebase": "4.8.2",
"google-maps": "^3.2.1",
"info.protonet.imageresizer": "^0.1.1",
"ionic-angular": "3.9.2",
"ionic-plugin-keyboard": "^2.2.1",
"ionic2-auto-complete": "^1.6.2-alpha",
"ionic2-google-places-autocomplete": "^1.0.2",
"ionicons": "3.0.0",
"jwt-decode": "^2.2.0",
"list": "1.0.0",
"moment": "^2.22.2",
"ngx-slick": "^0.2.1",
"onesignal-cordova-plugin": "^2.4.5",
"promise-polyfill": "^8.0.0",
"pubnub": "^4.21.5",
"pubnub-angular2": "^1.3.1",
"rxjs": "5.5.2",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"#ionic/app-scripts": "3.1.11",
"#ionic/lab": "1.0.11",
"#types/googlemaps": "^3.30.16",
"typescript": "2.4.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"ionic-plugin-keyboard": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-camera": {
"CAMERA_USAGE_DESCRIPTION": "Upload profile pic",
"PHOTOLIBRARY_USAGE_DESCRIPTION": "Upload profile pic",
"PHOTO_LIBRARY_USAGE_DESCRIPTION": "App would like to access the library."
},
"cordova-plugin-file": {},
"cordova-plugin-file-transfer": {},
"cordova-plugin-geolocation": {
"GEOLOCATION_USAGE_DESCRIPTION": "To locate your Location"
},
"cordova-plugin-contacts": {
"CONTACTS_USAGE_DESCRIPTION": "To invite Friends"
},
"cordova-plugin-splashscreen": {},
"cordova-plugin-request-location-accuracy": {},
"cordova-plugin-statusbar": {},
"info.protonet.imageresizer": {},
"cordova-sqlite-storage": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-music-controls": {},
"cordova-plugin-background-mode": {},
"cordova-clipboard": {},
"cordova-plugin-x-socialsharing": {},
"cordova-plugin-screen-orientation": {},
"cordova-plugin-file-opener2": {},
"cordova-plugin-app-version": {},
"cordova-plugin-inappbrowser": {},
"com.synconset.imagepicker": {
"PHOTOLIBRARY_USAGE_DESCRIPTION": "App would like to access the library.",
"PHOTO_LIBRARY_USAGE_DESCRIPTION": "App would like to access the library."
},
"cordova-plugin-facebook4": {
"APP_ID": "2178440625814934",
"APP_NAME": "You Are a CEO",
"FACEBOOK_ANDROID_SDK_VERSION": "4.+"
},
"cordova-plugin-mixpanel": {
"PLAY_SERVICES_VERSION": "+"
},
"cordova-plugin-document-viewer": {},
"cordova-plugin-googlemaps": {
"API_KEY_FOR_ANDROID": "xxxx",
"API_KEY_FOR_IOS": "xxxxx",
"PLAY_SERVICES_VERSION": "15.0.1",
"ANDROID_SUPPORT_V4_VERSION": "27.+",
"LOCATION_WHEN_IN_USE_DESCRIPTION": "This app wants to get your location while this app runs only.",
"LOCATION_ALWAYS_USAGE_DESCRIPTION": "This app wants to get your location always, even this app runs in background."
},
"branch-cordova-sdk": {},
"cordova-plugin-mauron85-background-geolocation": {
"GOOGLE_PLAY_SERVICES_VERSION": "11+",
"ANDROID_SUPPORT_LIBRARY_VERSION": "23+",
"ICON": "#mipmap/icon",
"SMALL_ICON": "#mipmap/icon",
"ACCOUNT_NAME": "#string/app_name",
"ACCOUNT_LABEL": "#string/app_name",
"ACCOUNT_TYPE": "$PACKAGE_NAME.account",
"CONTENT_AUTHORITY": "$PACKAGE_NAME",
"ALWAYS_USAGE_DESCRIPTION": "This app always requires location tracking"
},
"cordova.plugins.diagnostic": {},
"cordova-sms-plugin": {},
"cordova-plugin-nativegeocoder": {
"LOCATION_WHEN_IN_USE_DESCRIPTION": "Use geocoder service"
},
"onesignal-cordova-plugin": {},
"cordova-custom-config": {}
},
"cordova-plugin-ionic": {
"APP_ID": "xxxx",
"CHANNEL_NAME": "Production",
"UPDATE_METHOD": "background",
"MAX_STORE": "2"
},
"cordova-plugin-ionic-webview": {},
"platforms": [
"android"
]
},
"platforms": [
"android",
"ios"
]
}
Cordova does not support Xcode 10 at the moment. You will be able to make debug builds, but production builds and archiving a build aren't guaranteed. You will have to downgrade Xcode to version 9.x to archive until the next version of cordova ios is released with support for Xcode 10.
Steps to downgrade xcode :
Download an older version of xcode from the Developer site
Unzip the content of the download Replace the xcode folder under
Applications directory with the downloaded folder.
Cordova announcement: https://github.com/apache/cordova-ios/issues/407
Branch.io team has fixed this issue on version 3.1.5.
Fix iOS dependency issue.
Currently, I am working on a project, which is Ionic 3. I need to deploy the app on iOS devices. But the app is very slow in iOS devices. I tried to run this cmd ionic cordova build ios --prod --aot. But it resulted in a bunch of Ionic components error.
Screenshot of error when taking prod and aot app build:
package.json
{
"name": "Demo",
"private": true,
"scripts": {
"build": "ionic-app-scripts build",
"watch": "ionic-app-scripts watch",
"serve:before": "watch",
"emulate:before": "build",
"deploy:before": "build",
"build:before": "build",
"run:before": "build",
"test": "ng test --code-coverage",
"e2e": "protractor",
"postinstall": "webdriver-manager update"
},
"dependencies": {
"#angular/animations": "^5.1.3",
"#angular/common": "^5.1.3",
"#angular/compiler": "^5.1.3",
"#angular/compiler-cli": "^5.1.3",
"#angular/core": "^5.1.3",
"#angular/forms": "^5.1.3",
"#angular/http": "^5.1.3",
"#angular/platform-browser": "^5.1.3",
"#angular/platform-browser-dynamic": "^5.1.3",
"#angular/platform-server": "^5.1.3",
"#ionic-native/android-permissions": "*",
"#ionic-native/badge": "*",
"#ionic-native/camera": "*",
"#ionic-native/core": "*",
"#ionic-native/file": "*",
"#ionic-native/file-chooser": "*",
"#ionic-native/file-path": "*",
"#ionic-native/file-transfer": "*",
"#ionic-native/in-app-browser": "*",
"#ionic-native/keyboard": "*",
"#ionic-native/media": "*",
"#ionic-native/network": "*",
"#ionic-native/push": "^4.5.2",
"#ionic-native/splash-screen": "*",
"#ionic-native/status-bar": "*",
"#ionic-native/streaming-media": "*",
"#ionic-native/transfer": "*",
"#ionic-native/video-player": "*",
"#ionic/cloud-angular": "^0.12.0",
"#ionic/storage": "*",
"#types/googlemaps": "*",
"#types/lodash": "^4.14.92",
"accounts-password-client-side": "*",
"angular-svg-round-progressbar": "*",
"angular2-moment": "*",
"angular2-swing": "^0.14.0",
"aws-sdk": "*",
"body-parser": "*",
"braintree": "^2.4.0",
"braintree-web": "^3.27.0",
"cordova-android": "^7.0.0",
"cordova-ios": "*",
"cordova-plugin-android-permissions": "*",
"cordova-plugin-badge": "*",
"cordova-plugin-camera": "^4.0.1",
"cordova-plugin-compat": "*",
"cordova-plugin-console": "*",
"cordova-plugin-crosswalk-webview": "*",
"cordova-plugin-device": "^2.0.1",
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-file-transfer": "*",
"cordova-plugin-filechooser": "*",
"cordova-plugin-filepath": "*",
"cordova-plugin-filepicker": "*",
"cordova-plugin-geolocation": "^4.0.1",
"cordova-plugin-inappbrowser": "^2.0.1",
"cordova-plugin-media": "^5.0.1",
"cordova-plugin-network-information": "^2.0.1",
"cordova-plugin-splashscreen": "^5.0.1",
"cordova-plugin-statusbar": "*",
"cordova-plugin-whitelist": "*",
"cors": "*",
"express": "*",
"intl": "*",
"ionic-angular": "*",
"ionic-image-loader": "git+https://github.com/patricktyndall/ionic-image-loader.git",
"ionic-plugin-keyboard": "*",
"ionic2-autosize": "*",
"ionic2-rating": "*",
"ionicons": "*",
"jquery": "*",
"jssha": "^2.3.1",
"lodash": "*",
"meteor-rxjs": "*",
"meteor-tracker": "*",
"moment": "*",
"ng2-cordova-oauth": "0.0.8",
"ng2-currency-mask": "*",
"ng2-translate": "*",
"ng2-validation-manager": "^5.0.0",
"phonegap-plugin-push": "^2.1.2",
"rxjs": "*",
"stripe": "^5.4.0",
"sw-toolbox": "*",
"underscore": "*",
"zone.js": "*"
},
"devDependencies": {
"#angular/cli": "^1.6.3",
"#ionic/app-scripts": "^3.1.7",
"#types/core-js": "^0.9.44",
"#types/google-maps": "^3.2.0",
"#types/jssha": "0.0.29",
"#types/meteor": "^1.4.13",
"#types/node": "^9.3.0",
"codelyzer": "^4.0.2",
"ionic": "^3.19.0",
"ts-node": "^4.1.0",
"typescript": "^2.6.2"
},
"cordovaPlugins": [],
"cordovaPlatforms": [
"ios",
{
"platform": "ios",
"version": "",
"locator": "ios"
}
],
"cordova": {
"plugins": {
"cordova-plugin-compat": {},
"cordova-plugin-console": {},
"cordova-plugin-device": {},
"cordova-plugin-file": {},
"cordova-plugin-filechooser": {},
"cordova-plugin-filepicker": {},
"cordova-plugin-filepath": {},
"cordova-plugin-geolocation": {},
"cordova-plugin-media": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-whitelist": {},
"ionic-plugin-keyboard": {},
"phonegap-plugin-push": {
"SENDER_ID": "318310044174"
},
"cordova-plugin-network-information": {},
"cordova-plugin-camera": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-file-transfer": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-badge": {},
"cordova-plugin-android-permissions": {},
"cordova-plugin-crosswalk-webview": {
"XWALK_VERSION": "23+",
"XWALK_LITEVERSION": "xwalk_core_library_canary:17+",
"XWALK_COMMANDLINE": "--disable-pull-to-refresh-effect",
"XWALK_MODE": "embedded",
"XWALK_MULTIPLEAPK": "true"
}
},
"platforms": [
"android"
]
}
}
Ionic info file:
We have tried all the existing solutions, but none of them worked.
Please help us in solving this issue.
Thanks
Do you still have this problem?
If yes, then try uninstalling all plugins, cleaning your project, then reinstall all the previously removed plugins again. Make sure every plugin has the right dependencies installed (and in the right version).
Personally, I don't know if there's a quick way to uninstall/reinstall everything, but this - if not by much - may actually speed up your application run speed and possibly solve inconsistencies, so it's definitely worth trying (if you haven't already).
Hope to have helped!