Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15752] iOS: Backgrounding - BACKGROUNDFETCHINTERVAL_MIN and BACKGROUNDFETCHINTERVAL_NEVER returns undefined

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-11-20T22:19:48.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsqe-3.2.0, qe-nfc
ReporterWilson Luu
AssigneeSabil Rahim
Created2013-11-20T02:48:57.000+0000
Updated2014-06-19T12:43:54.000+0000

Description

*Details:* Ti.App.iOS.BACKGROUNDFETCHINTERVAL_MIN and Ti.App.iOS.BACKGROUNDFETCHINTERVAL_NEVER returns 'undefined' which are used by Ti.App.iOS.setMinimumBackgroundFetchInterval(); the function accepts only number type arguments. Note: You can still pass a literal number parameter to setMinimumBackgroundFetchInterval function e.g. Ti.App.iOS.setMinimumBackgroundFetchInterval(12). *Steps to reproduce:* 1. Create default app 2. In app.js, add these two line of codes:
Ti.API.info('min  : ' + Ti.App.iOS.BACKGROUNDFETCHINTERVAL_MIN);
Ti.API.info('never: ' + Ti.App.iOS.BACKGROUNDFETCHINTERVAL_NEVER);
3. Launch app in either device or simulator 4. Check xcode console *Actual:* The above code returns 'undefined' values.
Nov 19 18:36:15 Europa monkey15749[833] <Warning>: [INFO] min  : undefined
Nov 19 18:36:15 Europa monkey15749[833] <Warning>: [INFO] never: undefined
*Expected:* The above code should return a number values.

Comments

  1. Sabil Rahim 2013-11-20

    Master PR https://github.com/appcelerator/titanium_mobile/pull/5000
  2. Wilson Luu 2013-11-20

    Closing ticket as fixed. Verified both Ti.App.iOS.BACKGROUNDFETCHINTERVAL_MIN and Ti.App.iOS.BACKGROUNDFETCHINTERVAL_NEVER return a number:
       [INFO] :   min  : 0
       [INFO] :   never: 1.7976931348623157e+308
       
    Tested on: Titanium Studio, build: 3.2.0.201311200322 SDK build: 3.2.0.v20131120142443 CLI: 3.2.0-alpha Alloy: 1.3.0 (git://github.com/appcelerator/alloy.git#1_3_X) Xcode: 5.0.2 Device: iphone 4 (7.0.2), iphone simulator (7.0.3)

JSON Source