question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LocalNotification crashes on iOS

See original GitHub issue

I am not sure whether I am doing something wrong or whether I have found a bug. Anyway, here it goes: I am trying out the API for Local Notifications with the following code:

   async scheduleNow() {
      this.notifs = await Plugins.LocalNotifications.schedule({
         notifications: [{
            title: 'Test',
            body: 'Swipe now to learn more',
            id: Math.floor(Math.random() * 10),
            actionTypeId: 'OPEN_PRODUCT',
            extra: {
               productId: 'PRODUCT-1'
            }
         }]
      })
   }

When invoking this method from a buttom, this causes a crash in CAPUNUserNotificationCenterDelegate, line 47:

screenshot 2018-10-30 at 00 32 37

My package.json:

   "dependencies": {
      "@angular/common": "6.1.10",
      "@angular/core": "6.1.10",
      "@angular/forms": "6.1.10",
      "@angular/http": "6.1.10",
      "@angular/platform-browser": "6.1.10",
      "@angular/platform-browser-dynamic": "6.1.10",
      "@angular/router": "6.1.10",
      "@capacitor/cli": "^1.0.0-beta.3",
      "@capacitor/core": "^1.0.0-beta.3",
      "@capacitor/ios": "^1.0.0-beta.8",
      "@ionic-native/core": "5.0.0-beta.14",
      "@ionic-native/splash-screen": "5.0.0-beta.14",
      "@ionic-native/status-bar": "5.0.0-beta.14",
      "@ionic/angular": "4.0.0-beta.7",
      "@ionic/ng-toolkit": "1.1.0",
      "@ionic/pro": "2.0.3",
      "@ionic/schematics-angular": "1.0.7",
      "@ngx-translate/core": "^10.0.2",
      "@ngx-translate/http-loader": "^3.0.1",
      "@types/leaflet": "^1.2.9",
      "@types/leaflet.markercluster": "^1.0.3",
      "cordova-background-geolocation-lt": "^2.13.2",
      "cordova-plugin-background-fetch": "^5.4.1",
      "cordova-plugin-cocoalumberjack": "0.0.4",
      "core-js": "^2.5.3",
      "ionic-logging-service": "^5.1.0",
      "leaflet": "^1.3.3",
      "leaflet-pulse-icon": "^0.1.0",
      "leaflet.markercluster": "^1.3.0",
      "rxjs": "6.3.3",
      "zone.js": "^0.8.26"
   },
   "devDependencies": {
      "@angular-devkit/architect": "0.9.0-beta.3",
      "@angular-devkit/build-angular": "0.9.0-beta.3",
      "@angular-devkit/core": "0.9.0-beta.3",
      "@angular-devkit/schematics": "0.9.0-beta.3",
      "@angular/cli": "6.2.5",
      "@angular/compiler": "6.1.10",
      "@angular/compiler-cli": "6.1.10",
      "@angular/language-service": "6.1.10",
      "@types/jasmine": "~2.8.6",
      "@types/jasminewd2": "~2.0.3",
      "@types/node": "~10.11.7",
      "codelyzer": "~4.5.0",
      "jasmine-core": "~3.2.1",
      "jasmine-spec-reporter": "~4.2.1",
      "karma": "~3.0.0",
      "karma-chrome-launcher": "~2.2.0",
      "karma-coverage-istanbul-reporter": "~2.0.0",
      "karma-jasmine": "~1.1.1",
      "karma-jasmine-html-reporter": "^1.3.1",
      "protractor": "~5.4.0",
      "ts-node": "~7.0.0",
      "tslint": "~5.11.0",
      "typescript": "^2.9.2"
   },
   "config": {
      "ionic_source_map": "source-map"
   }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
drtomatocommented, Nov 4, 2018

@peterpeterparker thanks for all your help and comments regarding this issue, I will close the ticket.

1reaction
drtomatocommented, Oct 31, 2018

Thanks @peterpeterparker ! I’ll try it out and report back within a day or two.

Read more comments on GitHub >

github_iconTop Results From Across the Web

IOS 10 crashes caused by Local Notification - Apple Developer
I noticed that once the "reloqd" routine has been called a few times (e.g. : few users added or switch between apps and...
Read more >
iOS App crashes when launched from local notification
For local notification,you need to add following things in : - (void)applicationDidFinishLaunchingWithOptions:(UIApplication *)application ...
Read more >
[Solved]-iOS App crashes when launched from local notification
iOS app crashes with EXC_CRASH (SIGKILL) when launched via TestFlight, but runs fine from Xcode · Official Facebook iOS app always crashes when...
Read more >
Local notification crashes the iOS app - cordova - Ionic Forum
When i schedule the notification it crashes the app in iOS. is shows error in APPLocalNotification.m - (id) ...
Read more >
PhoneGap / iOS LocalNotification App Crashes on tapping “View” : r ...
3.7M subscribers in the apple community. An unofficial community to discuss Apple devices and software, including news, rumors, opinions and analysis…
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found