<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How to maintain the stable connection always, foreground as well as background</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/106718/how-to-maintain-the-stable-connection-always-foreground-as-well-as-background</link><description>Hello, I am developing an iOS app with an nRF52832 based sensor. Everything works fine when the app is in the foreground, but we are experiencing connection issues sometimes when the app is in background such as when the screen is locked. It seems that</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 18 Dec 2023 13:55:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/106718/how-to-maintain-the-stable-connection-always-foreground-as-well-as-background" /><item><title>RE: How to maintain the stable connection always, foreground as well as background</title><link>https://devzone.nordicsemi.com/thread/460842?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2023 13:55:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aae17b87-11c1-4ee7-a42f-40ea7ef8f0df</guid><dc:creator>Nick Kibysh</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can&amp;nbsp;try to use &lt;a href="https://developer.apple.com/documentation/xcode/configuring-background-execution-modes"&gt;background execution modes&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Select your Target -&amp;gt; Signin &amp;amp; Capabilities -&amp;gt; + Capability.&lt;/p&gt;
&lt;p&gt;Add background modes and enable &amp;quot;Use Bluetooth LE accessories&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2023_2D00_12_2D00_18-at-14.51.27.png" /&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2023_2D00_12_2D00_18-at-14.53.06.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to maintain the stable connection always, foreground as well as background</title><link>https://devzone.nordicsemi.com/thread/460813?ContentTypeID=1</link><pubDate>Mon, 18 Dec 2023 12:58:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a44ba5fb-1d6c-41b3-b9a5-25cfd89e7f56</guid><dc:creator>Aleksander Nowakowski</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Unfortunately, we don&amp;#39;t have much experience with background mode, yet. So far, mobile apps by Nordic just work in the foreground only. We&amp;#39;re not aware of any possible crashes coming from the system. Which iOS version are you testing on?&lt;/p&gt;
&lt;p&gt;However, based on purely theoretical knowledge, the connection should be stable. There are few restrictions, like that an app in the fg when scanning has to scan for at least one UUID, or that&amp;nbsp;&lt;span&gt;CBCentralManagerScanOptionAllowDuplicatesKey is ignored and defaults to false, but I&amp;#39;m sure you already know all of that. Connecting to a&amp;nbsp;previously scanned device, or to a scanned one, should work fine.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;We are planning to add&amp;nbsp;an app demonstrating background operations, but this needs to wait. For now, I would recommend checking StackOverflow. Sorry that I can&amp;#39;t help more.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>