Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between background state , InActive State & Non-running state of iOS App?

Tags:

ios

iphone

Can you please explain me

  1. What is the difference between background state , InActive State & Not-running state of iOS App?
  2. What is the difference between Main Bundle and Documents Directory? (Suppose I download a file/resource(e.g data.plist) from app ,so where can i find it? In Main Bundle or Documents directory or somewhere else?)

Thanks

like image 465
Sarthak mirajkar Avatar asked Jul 06 '16 08:07

Sarthak mirajkar


People also ask

What is inactive state in iOS?

inactive. The app is running in the foreground but isn't receiving events.

What is the relationship between the background state and suspended state?

Backgrounded: In this state, your app is not in the foreground anymore but it is still able to run code. Suspended: Your app enters this state when it's no longer able to run code.

What is foreground and background in apps?

Foreground refers to the active apps which consume data and are currently running on the mobile. Background refers to the data used when the app is doing some activity in the background, which is not active right now. This is due to the fact that whether they are active or not, apps consume data.


1 Answers

  1. Please refer this link for detailed info about iOS application states .

It says :

Non-running - The app is not running.

Inactive - The app is running in the foreground, but not receiving events. An iOS app can be placed into an inactive state, for example, when a call or SMS message is received.

Active - The app is running in the foreground, and receiving events.

Background - The app is running in the background, and executing code.

Suspended - The app is in the background, but no code is being executed.

  1. At the time of downloading at dynamic time in app , we need to give path for the detination , that will be of Documents Directory .

Main Bundle is the space where you can add the files initally and ship with the ipa.

Detailed difference you can find here

Hope this solves your Query.

like image 52
saurabh goyal Avatar answered Sep 22 '22 17:09

saurabh goyal