Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-23960] iOS: Application crashes from background-notifications when delegate method is not implemented

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2016-09-28T16:51:16.000+0000
Affected Version/sn/a
Fix Version/sRelease 6.1.0
ComponentsiOS
Labelsn/a
ReporterHans Knöchel
AssigneeHans Knöchel
Created2016-09-28T16:47:18.000+0000
Updated2017-05-16T22:22:18.000+0000

Description

Thanks to @rlepinski on Github: {quote} If you enable background notifications in iOS it crashes the application when a push is received. It looks like TiApp never implements the method that its forwarding on, so I am guessing its relying on a module to swizzle that method into place. {quote} The PR will check if the delegate is actually implemented and only calls it then. Community PR: https://github.com/appcelerator/titanium_mobile/pull/8437 Testing steps: 1. Create a new app 2. Follow [this steps](http://docs.appcelerator.com/platform/latest/#!/guide/iOS_Background_Services-section-37539664_iOSBackgroundServices-SilentPush) to implement silent-push (aka background-notifications) 3. Trigger a notification from the server / arrow dashboard Expected behavior: The app does not crash

Comments

  1. Eric Wieber 2017-05-16

    Verified fixed, using: MacOS 10.12 (16A323) Studio 4.8.1.201612050850 Ti SDK 6.1.0.v20170510094004 Appc NPM 4.2.9 Appc CLI 6.2.2-master.7 Alloy 1.9.11 Xcode 8.3.2 (8E2002) Able to send and receive silent push notifications without error or crash. Tested using the silent push code in the Appcelerator documentation as well as modified code from other push notification tests to include silent push support.

JSON Source