Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19585] iOS: Missing UIBackgroundModes "fetch" and "remote-notification"

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionInvalid
Resolution Date2015-09-29T15:07:30.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.1.0
ComponentsiOS, Tooling
Labelsn/a
ReporterChris Barber
AssigneeChris Barber
Created2015-09-25T17:53:56.000+0000
Updated2015-10-14T21:30:59.000+0000

Description

When running a Titanium app in the simulator I noticed the following in the console:
Sep 25 12:39:01 yojimbo itworks[99959]: You've implemented -[<UIApplicationDelegate> application:performFetchWithCompletionHandler:], but you still need to add "fetch" to the list of your supported UIBackgroundModes in your Info.plist.
Sep 25 12:39:01 yojimbo itworks[99959]: You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
It appears that we need to add "fetch" and "remote-notification" to the list of UIBackgroundModes.

Comments

  1. Chris Barber 2015-09-25

    Master PR: https://github.com/appcelerator/titanium_mobile/pull/7233 5_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/7234
  2. Chee Kiat Ng 2015-09-28

    Thanks for the PRs. but we cannot automatically add those properties into the plist because not everyone requires fetch and remote-notification. Those warnings appear because we have the delegates built, but they do nothing unless those properties are set. A better solution is to suppress these warnings. Notice there are the
       #ifdef USE_TI_FETCH
       #ifdef USE_TI_SILENTPUSH
       
    So it should be if "fetch" and "remote-notification" properties are set in tiapp.xml, these flags should be activated.
  3. Chris Barber 2015-09-28

    [~cng] I'm cool with suppressing these warnings. If you would, create a new ticket to suppress these warnings, link it to this ticket, close the PRs, resolve this ticket invalid. Thanks!

JSON Source