Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test background to foreground on ios with xcode?

after read some of your comments in other post about background/foreground task, I need to view the returned values when my app comes back from background to foreground. The problem is when I send the app to background (clicking home button on the iphone, or clicking Simulate Background Fetch on XCODE->Debug) the xcode stops the running (including the log). So, I can't continue showing NSLog messages.

I don't know If I explained me well.

like image 921
Víctor Martín Avatar asked Dec 18 '25 09:12

Víctor Martín


1 Answers

Mine does not stop to debug, it still continues when it goes to background(clicking home button) and comes to foreground when clicked in app icon. I think this should be default setting but if its not happening in yours then try this

Steps

  1. Select your project's target

  2. Select info tab

  3. Under the custom iOS target properties, if you can see the key named "Application does not run in background" then set is value to NO otherwise do Step 4.

  4. ADD a key= "Application does not run in background", type= "bolean", value= "NO"

  5. Run your project

enter image description here

like image 131
Bishow Gurung Avatar answered Dec 19 '25 21:12

Bishow Gurung



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!