Questions tagged [uibackgroundtask]
69 questions
1
vote
0 answers
Swift Stop Background Task
I built my application with the management of the background task in this way:
var updateTimer: NSTimer?
var backgroundTask: UIBackgroundTaskIdentifier = UIBackgroundTaskInvalid
override func viewDidLoad() {
super.viewDidLoad()
// listen…

Milena
- 29
- 1
- 8
1
vote
0 answers
persistent uploads to s3 with pause/resumeAll when app is backgrounded?
I'm using this method to upload images/videos to S3 (see code below)
I'm wondering if a user backgrounds the app and much later opens it back up can the pause/resume be used to resume all those uploads? It looks like maybe it's persistently caching…

tettoffensive
- 664
- 7
- 24
1
vote
1 answer
How to make network call when the app is in background too
I have an app if it goes background it has to make network API call every 1 minute.
So far what I studied suggests it's not possible.
Is there any way or workaround to do it But I couldn't find any so far ?
Thanks

King
- 3,457
- 3
- 12
- 22
1
vote
1 answer
UIBackgroundTask not ending
I am using UIBackgroundtaskIdentifier to create background task of uploading images to server.
NSLog(@"Time left = %.1f seconds", [UIApplication sharedApplication].backgroundTimeRemaining);
When I take the application in to background, it show…

am1991
- 41
- 2
1
vote
1 answer
IOS:Call method when local notification is received in background
I know this question looks duplicate but i did not found the exact answer as per my requirement.Doing app related to medical events with Below steps followed
1) connected the app to smart watch.
2) schedule the local notifications i. e when user…

dev
- 65
- 1
- 1
- 7
1
vote
1 answer
Execute background task after local notification was received in didReceiveLocalNotification:
Is it possible to execute a background task with [application beginBackgroundTaskWithName:@"LOG_STUFF" expirationHandler:^{}]; in the AppDelegate's method application:didReceiveLocalNotification:

nburk
- 22,409
- 18
- 87
- 132
1
vote
0 answers
Alternative to NSTimer in Background Mode
I am creating an app that needs to send the user's location to the server every 15 minutes regardless of whether it is in the Foreground or in the Background. I have been able to do this using an NSTimer that runs for 15 minutes and sends the…

SleepNot
- 2,982
- 10
- 43
- 72
1
vote
1 answer
iBeacon Region monitoring: Not resumed when rebooting the phone EXCEPT if I set location background mode?
all day I tested the monitoring of beacons my app does. in general it works ok:
notifications in foreground work
notifications in background work
BUT
after a reboot it doesn't work until I launch ANY app that uses BluetoothLE
after I do that it…

Daij-Djan
- 49,552
- 17
- 113
- 135
1
vote
1 answer
Running the application in background for 10 mins
I am working on streams.
I want the stream should be open for 10 minutes in background and after 10 minutes I want to close it.
I have done like this...
`__block UIBackgroundTaskIdentifier bgTask;
bgTask = [application…

AMohan
- 534
- 1
- 6
- 15
1
vote
1 answer
Upload image using AFNetworking when App is in Background.
I want to upload an image, using AFnetworking, which I have done successfully, now I want that to be uploaded even if it the app is in background execution , Is that possible?
I have tried this code:
-…

Harsh Thakur
- 293
- 2
- 11
0
votes
0 answers
UIBGTaskScheduler will work if app is killed?
I am working on app in which I want to schedule an alarm like in Android Alarm service.
I know there is UIBGTaskScheduler in iOS 13 but I am unable to identify if this can work when app is killed?
I have searched a lot but couldn’t find about the…

Manthan
- 3,856
- 1
- 27
- 58
0
votes
0 answers
Call RESTful API while application in background state for indefinite time
I want to call a post method every 60 seconds later while application is in background mode.My objective is to store user location and send it to my server.So far, for test purpose I have used beginBackgroundTaskWithExpirationHandler and NSTime for…

Emon
- 452
- 3
- 11
- 21
0
votes
0 answers
How to detect the lock button action?
How to detect the lock button action when the application is on background mode.So that when ever the user unlock the phone i want the open my application in foreground.
Please help ..

Thobio
- 57
- 2
- 7
0
votes
0 answers
didReceive and willPresent not called while app is in the background
inside AppDelegate I create a UNNotificationRequest with a trigger for 23:58:58pm (midnight)
The notification is received and is seen on the notification center screen. so I know it triggers
The app at that time is in the background, but didReceive…

TheBearF8
- 375
- 1
- 3
- 14
0
votes
1 answer
iOS: Run app in background with location updates
I have the intention to develop an iOS app which works on geo-fencing enter/exit events.
I need to run my app while app is running in background or when invoked by OS for about 5 minutes. Like when receive notification for event monitoring.
I have…

Surjeet Singh
- 11,691
- 2
- 37
- 54