Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6274] iOS: Foreground task still appearing inside the background service

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Do
Resolution Date2020-01-09T19:33:31.000+0000
Affected Version/sRelease 1.7.5, Release 1.8.0.1, Release 3.1.0, Release 3.2.0
Fix Version/sn/a
ComponentsiOS
Labelsreprod, supportTeam
ReporterKarol Pomaski
AssigneeEric Merriman
Created2011-11-22T11:07:50.000+0000
Updated2020-01-09T19:33:31.000+0000

Description

Description

Foreground task still appearing inside the background mode.

Reproducible Steps

1. Run the sample code 2. Press the Home button (will switch the app to the background mode) - keep checking the logs

Sample Code

app.js
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');


var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});


win1.open();

Ti.App.addEventListener("foreground",function(e){
	Ti.API.info("event received by foreground");
});

Ti.App.addEventListener('resumed',function(e){
		Ti.API.info("app has resumed from the background");
	});
	
		Ti.App.addEventListener('resume',function(e){
		Ti.API.info("app has resumeed from the background");
	});
	
	Ti.App.addEventListener('pause',function(e){
		Ti.API.info("app was turned to background");
	});

	
	

	
	function fgfunc() { 
    	
	    Ti.API.info("Still working");
	}
	
	var timer = setInterval(function(){
	    fgfunc();
	}, 1000);
	
Ti.App.service = Ti.App.iOS.registerBackgroundService({url:'bg.js'});

	




bg.js
Ti.API.info("we are in the background%- $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$");

Associated HelpDesk Ticket

http://appc.me/c/APP-232299

Comments

  1. jithinpv 2013-05-08

    issue reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 iOS iPhone Simulator: iOS SDK version: 6.0
  2. Lee Morris 2017-08-17

    This is still occurring with the following environment; iPhone 6 (10.2) Studio 4.9.1.201707200100 Ti SDK 6.1.2 GA Appc CLI 6.2.3 Ti CLI 5.0.14 Alloy 1.9.13 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131
  3. Alan Hutton 2020-01-09

    It has been decided that this issue should be closed as “Won’t do.” This issue is out of date with our current supported SDK release (7.5.2.GA as of the date of closure), and out of date with mobile OS versions. If community members feel that the issue is still valid, please create a new ticket. Please reference this closed ticket number, include SDK used, comments, and code that demonstrates/reproduces the issue.

JSON Source