Questions regarding the lifecycle of iOS apps (e.g. when are applicationDidBecomeActive or applicationWillTerminate called, or when is the best time to do certain initialisations or actions).
Questions tagged [ios-lifecycle]
33 questions
5
votes
1 answer
does the async operation in flutter still running even when the app is closed or killed off
I want to do some async operations that involve writing to local database
only when the state of the app is InActive or Paused
but what if the async operation while it is running and suddenly the app is closed
does that operation still working until…

Karrar
- 1,273
- 3
- 14
- 30
5
votes
1 answer
Lifecycle of iOS App During Update
I would like to know what state is the app in when an app updates.
For example:
Lets say we have an app running (called Le Music) that is playing music in background mode.
Now we go to the store and see there is an update available and we tap…

Bhavik P.
- 905
- 3
- 10
- 28
3
votes
3 answers
Observing notifications from ViewController
When data is updated in database, I post a notification to NotificationCenter from client with new data. A ViewController will be observing this notification so UI can be updated accordingly. Will the app crash if view controller observes a new…
user6354073
3
votes
1 answer
where to update constraint in view controller life cycle
I would like to update constraitn constants and multiplier and I would like to update these constraints in right view controller life cycle event
loadView
viewDidLoad
viewWillAppear
viewWillLayoutSubviews
viewDidLayoutSubviews
viewDidAppear
There…

Shankar Naik
- 401
- 5
- 16
2
votes
2 answers
does loadView get called even if we don't override it in viewcontroller like the other ViewController lifecycle methods?
Does loadView get called even if we don't override it in view controller like the other ViewController lifecycle methods?
Even if we don't override the ViewDidLoad method, we know this lifecycle method will get called internally by ios. Does the…

pravir
- 342
- 2
- 13
2
votes
3 answers
Populating UICollectionView from Online Database
I'm creating a simple chat app, it has a loading screen with a segue to either the login screen if the user is not logged in or directly to his chats if he is. The chats are displayed in a UICollectionView. When I was first testing, I populated it…

Alk
- 5,215
- 8
- 47
- 116
2
votes
2 answers
Show (local) notification when user closes app from task switcher
I'd like to show a (local) notification to the user when my app is terminated, be it by iOS itself or by the user via the task switcher.
When iOS kills the app because of memory pressure the applicationWillTerminate function is called on my…

TheEye
- 9,280
- 2
- 42
- 58
1
vote
2 answers
When does the SpriteKit game loop run for the first time?
I'm trying to understand when a SpriteKit scene's frame cycle runs within the main iOS run loop. Specifically, I am concerned about the AppDelegate's applicationDidBecomeActive(_:) method. I always thought that method was called after the app…

peacetype
- 1,928
- 3
- 29
- 49
1
vote
1 answer
Call Flutter Methods or functions from the native code base
I want to make a few flutter function calls for leaving or closing the resources acquired by the flutter app in an event of app crash or moving into the background.
These life cycle methods are available in the SceneDelegate.swift and…

Akash g krishnan
- 469
- 5
- 16
1
vote
1 answer
Xamarin MvvmCross: iOS how to monitor the app has move to foreground/background
I have an MvvmCross application, and I am using the MvvmCross ViewModel Lifecycle functions to realize
certain actions when the view appears, moves to background, and moves to foreground:
public override async void ViewAppeared()
public override…

Art
- 163
- 1
- 8
1
vote
1 answer
Black screen when opening app after background state
I'm tasked to debug why some users sometimes experience getting stuck at a black screen when opening the app. I'm new to this particular app so I don't know the entire flow, but I can tell that the app has background-capabilities. There are certain…

Sti
- 8,275
- 9
- 62
- 124
1
vote
1 answer
React Native lifecycle and restarts
Firstly, apologies for the slightly open ended questions but I can't find the info I'm looking for in other questions.
I'm trying to understand the lifecycle of a RN app on both iOS and Android. I understand the app bootstraps when you first start…

jonhobbs
- 26,684
- 35
- 115
- 170
1
vote
2 answers
When do ViewControllers call deinit? During move to background? During move to suspended?
I know that a ViewController will have its deinit method called once it is no longer needed (e.g. after an unwind segue and subsequent dismissal).
But I was wondering what the behavior of deinit was in the context of the application lifecycle.
My…

AlanSTACK
- 5,525
- 3
- 40
- 99
1
vote
0 answers
How to detect when an iOS app is terminated by the user from the multi-tasking UI without using 'Location updates' capability
How to detect when an iOS app is terminated by the user from the multi-tasking UI without using 'Location updates' capability. I know from the Apple's documentation that 'applicationWillTerminate' function in AppDelegate is not called in such a…

Rahul Racha
- 19
- 1
- 4
1
vote
1 answer
Getting the values of data stored in firebase
I'm trying to get access to the values stored in firebase dashboard to use them in different functions and methods in the class.
I used this method in this question
I have tried to print their values, the whole app has crashed and it gave me that…

Mariah
- 573
- 3
- 10
- 26