<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ Swift Programming - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ Swift Programming - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Tue, 26 May 2026 04:44:26 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/swift-programming/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ Optional Types in Swift – How to Use and Unwrap Optionals ]]>
                </title>
                <description>
                    <![CDATA[ By Prajwal Kulkarni If you're coming from Java, C++, or other object-oriented languages, chances are that you've never come across optional types or "optionals". And you might be quite surprised to know that such a concept exists in Swift. Optionals ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/optional-types-in-swift/</link>
                <guid isPermaLink="false">66d4609333b83c4378a51824</guid>
                
                    <category>
                        <![CDATA[ Swift ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Swift Programming ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Thu, 06 May 2021 16:06:35 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/05/maxwell-nelson-taiuG8CPKAQ-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Prajwal Kulkarni</p>
<p>If you're coming from Java, C++, or other object-oriented languages, chances are that you've never come across optional types or "optionals". And you might be quite surprised to know that such a concept exists in Swift.</p>
<p>Optionals are a fundamental topic that you need to thoroughly understand to code in Swift. If you're just getting started with Swift and you're learning about optional types for the first time, make sure to read this article until the end.</p>
<p>To understand what optional types are, let's quickly brush up on <strong>constants</strong> and <strong>variables.</strong></p>
<h2 id="heading-constants-and-variables-in-swift">Constants and Variables in Swift</h2>
<p>A constant is a data item whose value, once assigned, cannot be mutated (modified or changed) throughout the scope of the program. </p>
<p>On the other hand, a variable is a data item whose value can be changed limitlessly. </p>
<p>There are some nuances in how declare constants and variables in Swift. Let's look at that syntax:</p>
<p><code>&lt;data-item-type&gt; &lt;var-name&gt;:&lt;data-type&gt; = &lt;value&gt;</code></p>
<p><strong>Here's an example of a constant:</strong></p>
<p><code>let pi:Double = 3.1415</code></p>
<p><strong>And here's an example of a variable:</strong></p>
<pre><code class="lang-swift"><span class="hljs-keyword">var</span> message:<span class="hljs-type">String</span> = <span class="hljs-string">"Hello, this is prajwal"</span>
message = <span class="hljs-string">"Coding in swift is awesome"</span> <span class="hljs-comment">//variable value changed.</span>
</code></pre>
<p>Notice that of the keywords we've used here for declaring constants and variables, you use <strong>let</strong> to declare a constant, and <strong>var</strong> to declare a variable.</p>
<p>The keyword is then followed by the constant/variable name, a colon and its data type, and then the assigning value.</p>
<p>Swift is a type-safety language, which means that you can assign variables and constants values without specifying the data type. It can make appropriate assumptions based on the assigned value, for example:</p>
<p><code>let const:String = "String"</code></p>
<p>can also be written as,</p>
<p><code>let const = "String"</code></p>
<p>And,</p>
<p><code>var speed:Int = 20</code></p>
<p>can be written as,</p>
<p><code>var speed = 35</code></p>
<p>You might be wondering, if you can omit the data type then what's the need to specify it anyway? Well, you're right to wonder that – but you need to specify the data type once you're working with optional types, which are different from conventional data types.</p>
<h2 id="heading-optional-types-or-optionals-in-swift">Optional types or Optionals in Swift</h2>
<p>Coming to the main point, what are optional types in Swift?</p>
<p>Let's see what the <a target="_blank" href="https://docs.swift.org/swift-book/LanguageGuide/TheBasics.html">docs</a> have to say about it:</p>
<blockquote>
<p>You use optionals in situations where a value may be absent. An optional represents two possibilities: Either there is a value, and you can unwrap the optional to access that value, or there isn’t a value at all.</p>
</blockquote>
<p>That's a pretty straightforward definition. So optionals are basically used to handle null values at compile-time to ensure that no crashes occur at runtime.</p>
<p>Any operations on the optional variable are performed only if it contains non-null values.</p>
<p>An optional type can be of any data type, like a String, Integer, Double, Float, or any user defined non-primitive data type (object). </p>
<p>But, it is important to note that the Optional data type is not equivalent to its base data type. For instance, an Optional String is not the same as a string, an Optional integer is not the same as an integer, and so forth. This is because primitive data types cannot handle <code>nil</code> values, but Optional types can. </p>
<h2 id="heading-optional-types-syntax-and-usage-in-swift">Optional Types Syntax and Usage in Swift</h2>
<p>Here's the syntax for an optional type:</p>
<p><code>&lt;data-item&gt; &lt;var-name&gt;:&lt;data-type&gt;?</code></p>
<p>The declaration is similar to declaring regular variables, except that you add a question mark (?) beside the data type which makes it an Optional type.</p>
<p>Fire up your XCode playground and try running these snippets:</p>
<pre><code><span class="hljs-keyword">let</span> someVal:Double?
someVal = <span class="hljs-number">5.6324</span>

print(someVal)
<span class="hljs-comment">//Output : Optional(someVal)</span>

<span class="hljs-keyword">var</span> str:<span class="hljs-built_in">String</span>? = nil

str = <span class="hljs-string">"Hello, World!"</span>
print(str)
<span class="hljs-comment">//Output : Optional("Hello, World!")</span>
</code></pre><p>You can see that the outputs are not regular values. Instead, they're optional values.</p>
<h2 id="heading-how-to-unwrap-optional-types-in-swift">How to Unwrap Optional Types in Swift</h2>
<p>You won't use optional types upfront for any operations or tasks, as they should be cast in their primitives or user-defined instances before using it elsewhere (an optional string should be cast to a string, an optional integer should be cast to an integer, and so on). </p>
<p>This casting is what's known as <strong>unwrapping.</strong> You can better understand this concept by thinking about Schrödinger's cat. </p>
<p>In this thought experiment, a cat is placed in a closed box along with a vial of poison. Unless you open the box, you can't assure whether the cat is dead or alive ( nil or non-nil). This means that it is both dead and alive at the same time (nil and non-nil) according to your perception.</p>
<p>Only when you open the box (unwrapping) can you learn if the cat is alive or not (nil or not). </p>
<p>Unwrapping in Swift is essentially verifying if the Optional value is nil or not, and then it performs a task only if it's not nil.</p>
<p>You can perform unwrapping in the following ways:</p>
<ol>
    <li>Using an if else block</li>
    <li>Using Forced unwrapping</li>
    <li>Using Optional binding</li>
    <li>Using Optional chaining</li>
    <li>Using a nil coalescing operator</li>
</ol>

<h3 id="heading-unwrap-an-optional-type-with-an-if-else-block">Unwrap an optional type with an if-else block</h3>
<p>Unwrapping means to make sure that the Optional value is not nil. You can do this by using a simple if-else block like this:</p>
<pre><code class="lang-swift"><span class="hljs-keyword">var</span> variable:<span class="hljs-type">String?</span> <span class="hljs-comment">//evaluates to nil</span>

<span class="hljs-keyword">if</span> variable != <span class="hljs-literal">nil</span>{
 <span class="hljs-built_in">print</span>(<span class="hljs-string">"Not nil"</span>)
}
<span class="hljs-keyword">else</span>{
 <span class="hljs-built_in">print</span>(<span class="hljs-string">"Nil"</span>)
}
<span class="hljs-comment">//Output : Nil</span>
</code></pre>
<h3 id="heading-unwrap-an-optional-type-with-forced-unwrapping">Unwrap an optional type with forced unwrapping</h3>
<p>Forced unwrapping is quite contradictory because you're accessing the optional value regardless of its value (nil or not nil). If a nil optional is unwrapped, an error is thrown saying "<strong>Unexpectedly found nil while unwrapping an Optional value</strong>." </p>
<p>You're supposed to use forced unwrapping only in a pre-defined environment where you're certain that the optional value won't be nil.</p>
<p>You can forcefully unwrap an optional using the exclamatory(!) operator like this:</p>
<pre><code class="lang-swift"><span class="hljs-keyword">var</span> color:<span class="hljs-type">String?</span>;

<span class="hljs-built_in">print</span>(color!) <span class="hljs-comment">// Unexpectedly found nil while unwrapping an Optional value</span>

color = <span class="hljs-string">"Black"</span>;

<span class="hljs-built_in">print</span>(color!) <span class="hljs-comment">// Black</span>
</code></pre>
<h3 id="heading-unwrap-an-optional-type-with-optional-binding">Unwrap an optional type with optional binding</h3>
<p>Optional binding is similar to using an if-else block. The only subtle difference is that if the optional value is not nil, the unwrapped value is assigned to a new constant and further operations are performed on the constant. </p>
<p>You can do this using the <strong>if-let</strong> statement:</p>
<pre><code class="lang-swift"><span class="hljs-keyword">var</span> password:<span class="hljs-type">String?</span> = <span class="hljs-string">"$tr0ngp@$$w0rd"</span>

<span class="hljs-keyword">if</span> <span class="hljs-keyword">let</span> unwrappedpass = password {
    <span class="hljs-built_in">print</span>(<span class="hljs-string">"Password is \(unwrappedpass)"</span>) <span class="hljs-comment">//Password is $tr0ngp@$$w0rd</span>
}
</code></pre>
<p>An optional string <code>password</code> is assigned the value <code>$tr0ngp@$$w0rd</code>. Then in the if-let block, the optional value <code>password</code> is unwrapped and assigned to the variable <code>unwrappedpass</code> only if the optional value <code>password</code> is not nil. <code>unwrappedpass</code> now contains the unwrapped value and can be used within the block's scope.</p>
<pre><code class="lang-swift"><span class="hljs-keyword">var</span> password:<span class="hljs-type">String?</span>

<span class="hljs-keyword">if</span> <span class="hljs-keyword">let</span> unwrap = password{ <span class="hljs-comment">// Block unexecuted, as optional password is nil.</span>
    <span class="hljs-built_in">print</span>(<span class="hljs-string">"value is not nil"</span>)
}
</code></pre>
<h3 id="heading-unwrap-an-optional-type-with-optional-chaining">Unwrap an optional type with optional chaining</h3>
<p>You use optional chaining in places where you're dealing with multiple optional values at once. You use it to access and mutate or assign far-fetched attributes whose value depends on other constraints.</p>
<p>For example, we get our food from plants, which in turn get their food from sunlight and water.</p>
<p>This means that there is a chained dependency of events – we are dependent on plants for our food, and plants themselves are dependent on water and light for their food.</p>
<p>Optional chaining involves verifying at each dependency if the instance is nil or not.</p>
<p>Let's see how this works with a code example:</p>
<pre><code class="lang-swift"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">ShipmentCar</span></span>{
    <span class="hljs-keyword">var</span> seats:<span class="hljs-type">Int?</span>
    <span class="hljs-keyword">var</span> quality:<span class="hljs-type">String?</span>

    <span class="hljs-keyword">init</span>(seatQty:<span class="hljs-type">Int</span>){
        seats = seatQty
    }

    <span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">displaySeatQuality</span><span class="hljs-params">()</span></span>{
        <span class="hljs-keyword">if</span> <span class="hljs-keyword">let</span> seatQuality = quality{
            <span class="hljs-built_in">print</span>(<span class="hljs-string">"The seat covering is made of:\(seatQuality)"</span>)
        }
    }



}

<span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">CheckSeats</span></span>{
    <span class="hljs-keyword">var</span> seatExists:<span class="hljs-type">ShipmentCar?</span>

}


<span class="hljs-keyword">var</span> obj = <span class="hljs-type">ShipmentCar</span>(seatQty:<span class="hljs-number">4</span>)
<span class="hljs-keyword">var</span> obj2:<span class="hljs-type">CheckSeats?</span>
obj2 = <span class="hljs-type">CheckSeats</span>()
obj2?.seatExists = obj
obj2?.seatExists?.quality = <span class="hljs-string">"Leather"</span> <span class="hljs-comment">//Optional chaining, set leather quality of seats, only if seats exist.</span>
obj.displaySeatQuality()
<span class="hljs-comment">//Output: The seat covering is made of: Leather</span>
</code></pre>
<p>In the above example, we have two classes, <code>ShipmentCar</code> which is cargo, and <code>CheckSeats</code> to check if there are any seats in the vehicle.</p>
<p>We first create an instance of the class <code>ShipmentCar</code> and pass the argument as 4 for the number of seats – meaning that there are 4 seats in the vehicle. </p>
<p>Further, we create an optional instance of the class <code>CheckSeats</code> and instantiate it. The attribute <code>seatExists</code> of the class <code>CheckSeats</code> is of the type optional <code>ShipmentCar</code>. </p>
<p>Next, we perform optional chaining on the instance <code>obj2</code>, which we write as <code>obj2?.seatExists?.quality = "Leather"</code>. This means that we check if seats exist in the car, and if the seats exist, we define the quality of the seat cover which is <code>Leather</code>. Then we verify by calling the <code>displaySeatQuality</code> and get the desired result.</p>
<p><strong>Here's a small caveat</strong>: in the above example, if you set the value of <code>seatQty</code> as 0 instead of 4, it'd still output the same result. This implies that the seat covers are made of leather even though there are 0 seats, which would make no sense. </p>
<p>So, I'd like to mention that this is just an example and the main objective here is to emphasize that the attributes are assigned values only if the dependent attributes are not-nil.</p>
<h3 id="heading-unwrap-an-optional-type-with-the-nil-coalescing-operator">Unwrap an optional type with the nil coalescing operator</h3>
<p>The nil coalescing operator works as shorthand notation for the regular if-else block. If a nil value is found when an optional value is unwrapped, an additional default value is supplied which will be used instead.</p>
<pre><code><span class="hljs-keyword">var</span> text:<span class="hljs-built_in">String</span>?

<span class="hljs-keyword">var</span> output = text ?? <span class="hljs-string">"Default value"</span>

print(output) <span class="hljs-comment">// Default value</span>

text = <span class="hljs-string">"This is a string"</span>

output = text ?? <span class="hljs-string">"Default String"</span>

print(output) <span class="hljs-comment">// This is a string</span>
</code></pre><p>You can also write default values in terms of objects.</p>
<h2 id="heading-wrapping-up">Wrapping up</h2>
<p>There you have it! In this article, you've learned all about optional types and how to use them.</p>
<p>I'd like to thank you for reading this far and I hope this article has helped you understand optional types in Swift.</p>
<p>If you've any queries, feel free to contact me on <a target="_blank" href="https://twitter.com/prajwalinbizz">Twitter</a> and/or <a target="_blank" href="https://www.linkedin.com/in/prajwal-kulkarni">LinkedIn</a>. I'll be happy to help you. Cheers!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ The Ultimate How-to: Build a Bluetooth Swift App With Hardware in 20 Minutes ]]>
                </title>
                <description>
                    <![CDATA[ By Jared Wolff In a previous tutorial, you learned how to add Bluetooth to a Particle Xenon application. That way you could control the onboard RGB LED from a test app like nRF Connect or Light Blue Explorer. In this post, we're going to take it one ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/</link>
                <guid isPermaLink="false">66d85067f6b5e038a1bde7f9</guid>
                
                    <category>
                        <![CDATA[ Bluetooth Low Energy ]]>
                    </category>
                
                    <category>
                        <![CDATA[ iOS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ particle ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Swift ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Swift Programming ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 13 Aug 2019 14:15:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/08/main.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Jared Wolff</p>
<p>In a <a target="_blank" href="https://www.jaredwolff.com/how-to-use-particles-powerful-bluetooth-api/">previous tutorial</a>, you learned how to add Bluetooth to a Particle Xenon application. That way you could control the onboard RGB LED from a test app like nRF Connect or Light Blue Explorer.</p>
<p>In this post, we're going to take it one step further. We're going to develop a Swift app to control a Particle Mesh RGB led. If all goes well, you should have a working app in about 20 minutes!</p>
<p>Let's get started.</p>
<h3 id="heading-dont-have-time-right-now-to-read-the-full-article">Don't have time right now to read the full article?</h3>
<p><a target="_blank" href="https://www.jaredwolff.com/files/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/">Download the PDF version here.</a></p>
<h2 id="heading-getting-set-up">Getting set up</h2>
<ul>
<li>Install Xcode. <a target="_blank" href="https://developer.apple.com/xcode/resources/">You can download it from the App store here.</a></li>
<li>You'll also need an Apple login. I use my iCloud email. You can create a new account within Xcode if you don't have one yet.</li>
<li>Install the <a target="_blank" href="https://www.jaredwolff.com/how-to-use-particles-powerful-bluetooth-api/#final-code">RGB example code</a> on a Particle Mesh board.</li>
</ul>
<h2 id="heading-create-the-project">Create the project</h2>
<p>Once everything is installed, let's get to the fun stuff!</p>
<p>Open Xcode and go to <strong>File → New Project.</strong></p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Screen_Shot_2019-08-11_at_3-7ef4de80-050c-4fc3-9cf2-8581e16ffe18.10.57_PM.png" alt="Xcode New Project" width="600" height="400" loading="lazy"></p>
<p>Select <strong>Single View App.</strong></p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Screen_Shot_2019-08-11_at_3-ef953954-312b-4320-be30-5da186d0902e.11.14_PM.png" alt="New Project Info" width="600" height="400" loading="lazy"></p>
<p>Then update the <strong>Project Name</strong> to be to your liking. I've also changed my organization identifier to <code>com.jaredwolff</code>. Modify it as you see fit!</p>
<p>Select a location to save it.</p>
<p>Next find your <strong>Info.plist.</strong></p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Screen_Shot_2019-08-11_at_3-27439ca7-68c5-4890-902d-6c2ee7f31829.13.26_PM.png" alt="Info.plist in Xcocde" width="600" height="400" loading="lazy"></p>
<p>Update <code>info.plist</code> by adding <code>Privacy - Bluetooth Peripheral Usage Description</code></p>
<p>The description I ended up using was <code>App uses Bluetooth to connect to the Particle Xenon RGB Example</code></p>
<p>This allows you to use Bluetooth in your app if you ever want to release it.</p>
<p>Now, let's get everything minimally functional!</p>
<h2 id="heading-minimally-functional">Minimally functional</h2>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Copy_of_Flow-5e62bf38-b399-4bca-9b5b-c63f9716af33.jpg" alt="New section image" width="600" height="400" loading="lazy"></p>
<p>Next, we'll get a minimally functional app to connect and do a services discovery. Most of the action will happen in the <code>ViewController.swift</code>.</p>
<p>Lets first import <code>CoreBluetooth</code></p>
<pre><code class="lang-swift">    <span class="hljs-keyword">import</span> CoreBluetooth
</code></pre>
<p>This allows us to control the Bluetooth Low Energy functionality in iOS. Then let's add both the <code>CBPeripheralDelegate</code> and <code>CBCentralManagerDelegate</code> to the <code>ViewController</code> class.</p>
<pre><code class="lang-swift">    <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">ViewController</span>: <span class="hljs-title">UIViewController</span>, <span class="hljs-title">CBPeripheralDelegate</span>, <span class="hljs-title">CBCentralManagerDelegate</span> </span>{
</code></pre>
<p>Let's now create local private variables to store the actual central manager and peripheral. We'll set them up further momentarily.</p>
<pre><code class="lang-swift">    <span class="hljs-comment">// Properties</span>
    <span class="hljs-keyword">private</span> <span class="hljs-keyword">var</span> centralManager: <span class="hljs-type">CBCentralManager!</span>
    <span class="hljs-keyword">private</span> <span class="hljs-keyword">var</span> peripheral: <span class="hljs-type">CBPeripheral!</span>
</code></pre>
<p>In your <code>viewDidLoad</code> function, let's init the <code>centralManager</code></p>
<pre><code class="lang-swift">    centralManager = <span class="hljs-type">CBCentralManager</span>(delegate: <span class="hljs-keyword">self</span>, queue: <span class="hljs-literal">nil</span>)
</code></pre>
<p>Setting <code>delegate: self</code> is important. Otherwise the central state never changes on startup.</p>
<p>Before we get further, let's create a separate file and call it <code>ParticlePeripheral.swift</code>. It can be placed anywhere but I placed it in a separate 'group' called <strong>Models</strong> for later.</p>
<p>Inside we'll create some public variables which contain the UUIDs for our Particle Board. They should look familiar!</p>
<pre><code class="lang-swift">    <span class="hljs-keyword">import</span> UIKit
    <span class="hljs-keyword">import</span> CoreBluetooth

    <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">ParticlePeripheral</span>: <span class="hljs-title">NSObject</span> </span>{

        <span class="hljs-comment">/// MARK: - Particle LED services and charcteristics Identifiers</span>

        <span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">let</span> particleLEDServiceUUID     = <span class="hljs-type">CBUUID</span>.<span class="hljs-keyword">init</span>(string: <span class="hljs-string">"b4250400-fb4b-4746-b2b0-93f0e61122c6"</span>)
        <span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">let</span> redLEDCharacteristicUUID   = <span class="hljs-type">CBUUID</span>.<span class="hljs-keyword">init</span>(string: <span class="hljs-string">"b4250401-fb4b-4746-b2b0-93f0e61122c6"</span>)
        <span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">let</span> greenLEDCharacteristicUUID = <span class="hljs-type">CBUUID</span>.<span class="hljs-keyword">init</span>(string: <span class="hljs-string">"b4250402-fb4b-4746-b2b0-93f0e61122c6"</span>)
        <span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">let</span> blueLEDCharacteristicUUID  = <span class="hljs-type">CBUUID</span>.<span class="hljs-keyword">init</span>(string: <span class="hljs-string">"b4250403-fb4b-4746-b2b0-93f0e61122c6"</span>)

    }
</code></pre>
<p>Back in <code>ViewController.swift</code> let's piece together the Bluetooth bits.</p>
<h3 id="heading-bluetooth-bits">Bluetooth bits</h3>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Flow-3cb1d250-f9d5-4757-a244-be29bed9dcf6.jpg" alt="Flow diagram for Bluetooth Swift in iOS" width="600" height="400" loading="lazy"></p>
<p>Everything to do with Bluetooth is event based. We'll be defining several functions that handle these events. Here are the important ones:</p>
<p><code>centralManagerDidUpdateState</code> updates when the Bluetooth Peripheral is switched on or off. It will fire when an app first starts so you know the state of Bluetooth. We also start scanning here.</p>
<p>The <code>centralManager</code> <code>didDiscover</code> event occurs when you receive scan results. We'll use this to start a connection.</p>
<p>The <code>centralManager</code> <code>didConnect</code> event fires once the device is connected. We'll start the device discovery here. <strong>Note:</strong> Device discovery is the way we determine what services and characteristics are available. This is a good way to confirm what type of device we're connected to.</p>
<p>The <code>peripheral</code> <code>didDiscoverServices</code> event first once all the services have been discovered. Notice that we've switched from <code>centralManager</code> to <code>peripheral</code> now that we're connected. We'll start the characteristic discovery here. We'll be using the RGB service UUID as the target.</p>
<p>The <code>peripheral</code> <code>didDiscoverCharacteristicsFor</code> event will provide all the characteristics using the provided service UUID. This is the last step in the chain of doing a full device discovery. It's hairy but it only has to be done once during the connection phase!</p>
<h3 id="heading-defining-all-the-bluetooth-functions">Defining all the Bluetooth functions.</h3>
<p>Now that we know what the functions events that get triggered. We'll define them in the logical order that they happen during a connection cycle.</p>
<p>First, we'll define <code>centralManagerDidUpdateState</code> to start scanning for a device with our Particle RGB LED Service. If Bluetooth is not enabled, it will not do anything.</p>
<pre><code class="lang-swift">    <span class="hljs-comment">// If we're powered on, start scanning</span>
        <span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">centralManagerDidUpdateState</span><span class="hljs-params">(<span class="hljs-number">_</span> central: CBCentralManager)</span></span> {
            <span class="hljs-built_in">print</span>(<span class="hljs-string">"Central state update"</span>)
            <span class="hljs-keyword">if</span> central.state != .poweredOn {
                <span class="hljs-built_in">print</span>(<span class="hljs-string">"Central is not powered on"</span>)
            } <span class="hljs-keyword">else</span> {
                <span class="hljs-built_in">print</span>(<span class="hljs-string">"Central scanning for"</span>, <span class="hljs-type">ParticlePeripheral</span>.particleLEDServiceUUID);
                centralManager.scanForPeripherals(withServices: [<span class="hljs-type">ParticlePeripheral</span>.particleLEDServiceUUID],
                                                  options: [<span class="hljs-type">CBCentralManagerScanOptionAllowDuplicatesKey</span> : <span class="hljs-literal">true</span>])
            }
        }
</code></pre>
<p>Defining the <code>centralManager</code> <code>didDiscover</code> is our next step in the process. We know we've found a device if this event has occurred.</p>
<pre><code class="lang-swift">    <span class="hljs-comment">// Handles the result of the scan</span>
        <span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">centralManager</span><span class="hljs-params">(<span class="hljs-number">_</span> central: CBCentralManager, didDiscover peripheral: CBPeripheral, advertisementData: [String : <span class="hljs-keyword">Any</span>], rssi RSSI: NSNumber)</span></span> {

            <span class="hljs-comment">// We've found it so stop scan</span>
            <span class="hljs-keyword">self</span>.centralManager.stopScan()

            <span class="hljs-comment">// Copy the peripheral instance</span>
            <span class="hljs-keyword">self</span>.peripheral = peripheral
            <span class="hljs-keyword">self</span>.peripheral.delegate = <span class="hljs-keyword">self</span>

            <span class="hljs-comment">// Connect!</span>
            <span class="hljs-keyword">self</span>.centralManager.connect(<span class="hljs-keyword">self</span>.peripheral, options: <span class="hljs-literal">nil</span>)

        }
</code></pre>
<p>So, we stop scanning using <code>self.centralManager.stopScan()</code>. We set the <code>peripheral</code> so it persists through the app. Then we connect to that device using <code>self.centralManager.connect</code></p>
<p>Once connected, we need to double check if we're working with the right device.</p>
<pre><code class="lang-swift">    <span class="hljs-comment">// The handler if we do connect succesfully</span>
        <span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">centralManager</span><span class="hljs-params">(<span class="hljs-number">_</span> central: CBCentralManager, didConnect peripheral: CBPeripheral)</span></span> {
            <span class="hljs-keyword">if</span> peripheral == <span class="hljs-keyword">self</span>.peripheral {
                <span class="hljs-built_in">print</span>(<span class="hljs-string">"Connected to your Particle Board"</span>)
                peripheral.discoverServices([<span class="hljs-type">ParticlePeripheral</span>.particleLEDServiceUUID])
            }
        }
</code></pre>
<p>By comparing the two peripherals we'll know its the device we found earlier. We'll kick off a services discovery using <code>peripheral.discoverService</code>. We can use <code>ParticlePeripheral.particleLEDServiceUUID</code> as a parameter. That way we don't pick up any services we don't care about.</p>
<p>Once we finish the discovering services, we'll get a <code>didDiscoverServices</code> event. We iterate through all the "available" services. (Though there will only be one!)</p>
<pre><code class="lang-swift">    <span class="hljs-comment">// Handles discovery event</span>
        <span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">peripheral</span><span class="hljs-params">(<span class="hljs-number">_</span> peripheral: CBPeripheral, didDiscoverServices error: Error?)</span></span> {
            <span class="hljs-keyword">if</span> <span class="hljs-keyword">let</span> services = peripheral.services {
                <span class="hljs-keyword">for</span> service <span class="hljs-keyword">in</span> services {
                    <span class="hljs-keyword">if</span> service.uuid == <span class="hljs-type">ParticlePeripheral</span>.particleLEDServiceUUID {
                        <span class="hljs-built_in">print</span>(<span class="hljs-string">"LED service found"</span>)
                        <span class="hljs-comment">//Now kick off discovery of characteristics</span>
                        peripheral.discoverCharacteristics([<span class="hljs-type">ParticlePeripheral</span>.redLEDCharacteristicUUID,
                                                                 <span class="hljs-type">ParticlePeripheral</span>.greenLEDCharacteristicUUID,
                                                                 <span class="hljs-type">ParticlePeripheral</span>.blueLEDCharacteristicUUID], <span class="hljs-keyword">for</span>: service)
                        <span class="hljs-keyword">return</span>
                    }
                }
            }
        }
</code></pre>
<p>By this point this is the third time we're checking to make sure we have the correct service. This becomes more handy later when there are many characteristics and many services.</p>
<p>We call <code>peripheral.discoverCharacteristics</code> with an array of UUIDs for the characteristics we're looking for. They're all the UUIDs that we defined in <code>ParticlePeripheral.swift</code>.</p>
<p>Finally, we handle the <code>didDiscoverCharacteriscsFor</code> event. We iterate through all the available characteristics. As we iterate we compare with the ones we're looking for.</p>
<pre><code class="lang-swift">    <span class="hljs-comment">// Handling discovery of characteristics</span>
        <span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">peripheral</span><span class="hljs-params">(<span class="hljs-number">_</span> peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?)</span></span> {
            <span class="hljs-keyword">if</span> <span class="hljs-keyword">let</span> characteristics = service.characteristics {
                <span class="hljs-keyword">for</span> characteristic <span class="hljs-keyword">in</span> characteristics {
                    <span class="hljs-keyword">if</span> characteristic.uuid == <span class="hljs-type">ParticlePeripheral</span>.redLEDCharacteristicUUID {
                        <span class="hljs-built_in">print</span>(<span class="hljs-string">"Red LED characteristic found"</span>)
                    } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> characteristic.uuid == <span class="hljs-type">ParticlePeripheral</span>.greenLEDCharacteristicUUID {
                        <span class="hljs-built_in">print</span>(<span class="hljs-string">"Green LED characteristic found"</span>)
                    } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> characteristic.uuid == <span class="hljs-type">ParticlePeripheral</span>.blueLEDCharacteristicUUID {
                        <span class="hljs-built_in">print</span>(<span class="hljs-string">"Blue LED characteristic found"</span>);
                    }
                }
            }
        }
</code></pre>
<p>At this point we're ready to do a full device discovery of our Particle Mesh device. In the next section we'll test what we have to make sure things are working ok.</p>
<h2 id="heading-testing-our-minimal-example">Testing our minimal example</h2>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Flow-6-744bf855-fd7c-403b-b07f-dfc0c191b6af.jpg" alt="Section image about testing" width="600" height="400" loading="lazy"></p>
<p>Before we get started, if you run into trouble I've put some troubleshooting steps in the <a target="_blank" href="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/#troubleshooting">footnotes</a>.</p>
<p><strong>To test, you'll have to have an iPhone with Bluetooth Low Energy.</strong> Most modern iPhones have it. The last iPhone not to have it I believe was either the iPhone 4 or 3Gs. (so you're likely good)</p>
<p>First, plug it into your computer.</p>
<p>Go to the top by the play and stop buttons. Select your target device. In my case I chose my phone (<strong>Jared's iPhone</strong>). You can also use an iPad.</p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Screen_Shot_2019-08-09_at_4-d04de709-6000-4161-bd12-7347a70d6e1e.37.27_PM.png" alt="Select device type" width="600" height="400" loading="lazy"></p>
<p>Then you can hit <strong>Command + R</strong> or hit that <strong>Play button</strong> to load the app to your phone.</p>
<p>Make sure you have your log tab open. Enable it by clicking the bottom pane button in the top right corner.</p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Screen_Shot_2019-08-09_at_4-8b83ea0a-274f-4a41-a5ff-e80717b41977.38.57_PM.png" alt="Bottom pane in Xcode for logs" width="600" height="400" loading="lazy"></p>
<p>Make sure you have a mesh device setup and running the example code. You can go to <a target="_blank" href="https://www.jaredwolff.com/how-to-use-particles-powerful-bluetooth-api/#final-code">this post</a> to get it. Remember your Particle Mesh board needs to be running device OS 1.3.0 or greater for Bluetooth to work!</p>
<p>Once both the firmware and app is loaded, let's check the log output.</p>
<p>It should look something like this:</p>
<pre><code>View loaded
Central state update
Central scanning <span class="hljs-keyword">for</span> B4250400-FB4B<span class="hljs-number">-4746</span>-B2B0<span class="hljs-number">-93</span>F0E61122C6
Connected to your Particle Board
LED service found
Red LED characteristic found
Green LED characteristic found
Blue LED characteristic found
</code></pre><p>This means that your Phone has connected, found the LED service! The characteristics also being discovered is important here. Without those we wouldn't be able to send data to the mesh device.</p>
<p>Next step is to create some sliders so we can update the RGB values on the fly.</p>
<h2 id="heading-slide-to-the-left-slide-to-the-right">Slide to the left. Slide to the right.</h2>
<p>Next we're going to add some elements to our <code>Main.storyboard</code>. Open <code>Main.storyboard</code> and click on the <strong>View</strong> underneath <strong>View Controller.</strong></p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Screen_Shot_2019-08-11_at_1-7919e3c2-cb72-4297-b9e0-06139a064fec.57.37_PM.png" alt="Updating view in Xcode" width="600" height="400" loading="lazy"></p>
<p>Then click on the <strong>Library</strong> button. (It looks like the old art Apple used for the home button)</p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Screen_Shot_2019-08-11_at_1-895d247a-6706-4c39-be04-0bda41195ca6.58.02_PM.png" alt="Library button in Xcode" width="600" height="400" loading="lazy"></p>
<p>You'll get a pop-up with all the choices that you can insert into your app.</p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Screen_Shot_2019-08-11_at_1-8b531053-621e-4c14-8086-2ac0ef6e52de.58.31_PM.png" alt="Library pane in Xcode" width="600" height="400" loading="lazy"></p>
<p>Drag three <strong>Labels</strong> and copy three <strong>Sliders</strong> to your view.</p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Screen_Shot_2019-08-11_at_1-9c8c6167-2279-4cb7-a37b-c24b8cdd275d.59.39_PM.png" alt="Dragging Labels to Xcode View" width="600" height="400" loading="lazy"></p>
<p>You can double click on the labels and rename them as you go.</p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Screen_Shot_2019-08-11_at_1-72573a66-1201-4d08-902d-ea905c91b2bb.59.57_PM.png" alt="Dragging Slider to Xcode View" width="600" height="400" loading="lazy"></p>
<p>If you click and hold, some handy alignment tools will popup. They'll even snap to center!</p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Screen_Shot_2019-08-11_at_2-4c7b1627-c55e-4eba-b29a-32915ba41867.00.17_PM.png" alt="Alignment tools in Xcode" width="600" height="400" loading="lazy"></p>
<p>You can also select them all and move them together. We'll align them vertically and horizontally.</p>
<p>In order for them to stay in the middle, let's remove the autoresizing property. Click the <strong>Ruler icon</strong> on the top right. Then click each of the <strong>red bars</strong>. This will ensure that your labels and sliders stay on the screen!</p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Screen_Shot_2019-08-11_at_2-f207fae8-7292-4e38-9985-c97444ab4e55.09.39_PM.png" alt="Ruler pane in Xcode" width="600" height="400" loading="lazy"></p>
<p>Next let's click the <strong>Show Assistant Editor</strong> button. (Looks like a Venn diagram)</p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Screen_Shot_2019-08-11_at_2-c52c52b8-70b3-426b-9cbe-9df1042f5fb1.00.59_PM.png" alt="Show Assistant Editor button in Xcode" width="600" height="400" loading="lazy"></p>
<p><strong>Note:</strong> make sure that <strong>ViewController.swift</strong> is open in your Assistant Editor.</p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Screen_Shot_2019-08-11_at_2-655a4468-4da8-4841-a2dc-1cf8706592e7.17.35_PM.png" alt="Automatic option in Assistant Editor" width="600" height="400" loading="lazy"></p>
<p>Then underneath the <code>/properties</code> section, <strong>Control-click and drag</strong> <strong>the Red Slider</strong> into your code.</p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Screen_Shot_2019-08-11_at_2-39480e58-fd92-4ec7-a2db-9e8524019755.01.43_PM.png" alt="Drag slider to code" width="600" height="400" loading="lazy"></p>
<p>Repeat with all the other ones. Make sure you name them something different. Your code should look like this when you're done:</p>
<pre><code class="lang-swift">        <span class="hljs-comment">// Properties</span>
        <span class="hljs-keyword">private</span> <span class="hljs-keyword">var</span> centralManager: <span class="hljs-type">CBCentralManager!</span>
        <span class="hljs-keyword">private</span> <span class="hljs-keyword">var</span> peripheral: <span class="hljs-type">CBPeripheral!</span>

        <span class="hljs-comment">// Sliders</span>
        <span class="hljs-meta">@IBOutlet</span> <span class="hljs-keyword">weak</span> <span class="hljs-keyword">var</span> redSlider: <span class="hljs-type">UISlider!</span>
        <span class="hljs-meta">@IBOutlet</span> <span class="hljs-keyword">weak</span> <span class="hljs-keyword">var</span> greenSlider: <span class="hljs-type">UISlider!</span>
        <span class="hljs-meta">@IBOutlet</span> <span class="hljs-keyword">weak</span> <span class="hljs-keyword">var</span> blueSlider: <span class="hljs-type">UISlider!</span>
</code></pre>
<p>This allow us to access the value of the sliders.</p>
<p>Next, let's attach the <strong>Value Changed</strong> event to each of the sliders. <strong>Right click</strong> on the <strong>Red Slider in the folder view.</strong></p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Screen_Shot_2019-08-11_at_2-b2ffe0a6-709e-433d-9d4c-0f8028bd096c.03.44_PM.png" alt="Drag value changed event to code" width="600" height="400" loading="lazy"></p>
<p>It should give you some options for events. Click and drag the <strong>Value Changed</strong> event to your code. Make sure you name it something that makes sense. I used <strong>RedSliderChanged</strong> for the Red Slider.</p>
<p>Repeat two more times. Your code should look like this at the end of this step:</p>
<pre><code class="lang-swift">        <span class="hljs-meta">@IBAction</span> <span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">RedSliderChanged</span><span class="hljs-params">(<span class="hljs-number">_</span> sender: <span class="hljs-keyword">Any</span>)</span></span> {
        }

        <span class="hljs-meta">@IBAction</span> <span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">GreenSliderChanged</span><span class="hljs-params">(<span class="hljs-number">_</span> sender: <span class="hljs-keyword">Any</span>)</span></span> {
        }

        <span class="hljs-meta">@IBAction</span> <span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">BlueSliderChanged</span><span class="hljs-params">(<span class="hljs-number">_</span> sender: <span class="hljs-keyword">Any</span>)</span></span> {
        }
</code></pre>
<p>I've also selected each of the sliders to and <strong>un-checked Enabled</strong>. That way you can't move them. We'll enable them later on in code.</p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Screen_Shot_2019-08-11_at_2-e7e0aca9-224c-4bfb-b482-1d9e58b37947.21.21_PM.png" alt="Disable slider by default" width="600" height="400" loading="lazy"></p>
<p>Also, this is a great time to change the <strong>maximum value to 255</strong>. Also set the default <strong>value from 0.5 to 0.</strong></p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Screen_Shot_2019-08-11_at_2-9bf5618b-f6ac-4aea-9888-7f93a8c75414.55.38_PM.png" alt="Set default value and max value of slider" width="600" height="400" loading="lazy"></p>
<p>Back at the top of the file. Let's create some local variables for each of the characteristics. We'll use these so we can write the slider variables to the Particle Mesh board.</p>
<pre><code class="lang-swift">        <span class="hljs-comment">// Characteristics</span>
        <span class="hljs-keyword">private</span> <span class="hljs-keyword">var</span> redChar: <span class="hljs-type">CBCharacteristic?</span>
        <span class="hljs-keyword">private</span> <span class="hljs-keyword">var</span> greenChar: <span class="hljs-type">CBCharacteristic?</span>
        <span class="hljs-keyword">private</span> <span class="hljs-keyword">var</span> blueChar: <span class="hljs-type">CBCharacteristic?</span>
</code></pre>
<p>Now, let's tie everything together!</p>
<p>In the <code>didDiscoverCharacteristicsFor</code> callback function. Let's assign those characteristics. For example</p>
<pre><code class="lang-swift">    <span class="hljs-keyword">if</span> characteristic.uuid == <span class="hljs-type">ParticlePeripheral</span>.redLEDCharacteristicUUID {
        <span class="hljs-built_in">print</span>(<span class="hljs-string">"Red LED characteristic found"</span>)
        redChar = characteristic
</code></pre>
<p>As we find each characteristic, we can also enable each of the sliders in the same spot.</p>
<pre><code class="lang-swift">            <span class="hljs-comment">// Unmask red slider</span>
            redSlider.isEnabled = <span class="hljs-literal">true</span>
</code></pre>
<p>In the end your <code>didDiscoverCharacteristicsFor</code> should look like:</p>
<pre><code class="lang-swift">    <span class="hljs-comment">// Handling discovery of characteristics</span>
        <span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">peripheral</span><span class="hljs-params">(<span class="hljs-number">_</span> peripheral: CBPeripheral, didDiscoverCharacteristicsFor service: CBService, error: Error?)</span></span> {
            <span class="hljs-keyword">if</span> <span class="hljs-keyword">let</span> characteristics = service.characteristics {
                <span class="hljs-keyword">for</span> characteristic <span class="hljs-keyword">in</span> characteristics {
                    <span class="hljs-keyword">if</span> characteristic.uuid == <span class="hljs-type">ParticlePeripheral</span>.redLEDCharacteristicUUID {
                        <span class="hljs-built_in">print</span>(<span class="hljs-string">"Red LED characteristic found"</span>)

                        redChar = characteristic
                        redSlider.isEnabled = <span class="hljs-literal">true</span>
                    } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> characteristic.uuid == <span class="hljs-type">ParticlePeripheral</span>.greenLEDCharacteristicUUID {
                        <span class="hljs-built_in">print</span>(<span class="hljs-string">"Green LED characteristic found"</span>)

                        greenChar = characteristic
                        greenSlider.isEnabled = <span class="hljs-literal">true</span>
                    } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> characteristic.uuid == <span class="hljs-type">ParticlePeripheral</span>.blueLEDCharacteristicUUID {
                        <span class="hljs-built_in">print</span>(<span class="hljs-string">"Blue LED characteristic found"</span>);

                        blueChar = characteristic
                        blueSlider.isEnabled = <span class="hljs-literal">true</span>
                    }
                }
            }
        }
</code></pre>
<p>Now, let's update the <code>RedSliderChanged</code> <code>GreenSliderChanged</code> and <code>BlueSliderChanged</code> functions. What we want to do here is update the characteristic associated with the <code>Changed</code> function. I created a separate function called <code>writeLEDValueToChar</code>. We'll pass in the characteristic and the data.</p>
<pre><code class="lang-swift">    <span class="hljs-keyword">private</span> <span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">writeLEDValueToChar</span><span class="hljs-params">( withCharacteristic characteristic: CBCharacteristic, withValue value: Data)</span></span> {

            <span class="hljs-comment">// Check if it has the write property</span>
            <span class="hljs-keyword">if</span> characteristic.properties.<span class="hljs-built_in">contains</span>(.writeWithoutResponse) &amp;&amp; peripheral != <span class="hljs-literal">nil</span> {

                peripheral.writeValue(value, <span class="hljs-keyword">for</span>: characteristic, type: .withoutResponse)

            }

        }
</code></pre>
<p>Now add a call to <code>writeLEDValueToChar</code> to each of the <code>Changed</code> functions. You will have to cast the value to a <code>Uint8</code>. (The Particle Mesh device expects an unsigned 8-bit number.)</p>
<pre><code class="lang-swift">            <span class="hljs-meta">@IBAction</span> <span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">RedSliderChanged</span><span class="hljs-params">(<span class="hljs-number">_</span> sender: <span class="hljs-keyword">Any</span>)</span></span> {
            <span class="hljs-built_in">print</span>(<span class="hljs-string">"red:"</span>,redSlider.value);
            <span class="hljs-keyword">let</span> slider:<span class="hljs-type">UInt8</span> = <span class="hljs-type">UInt8</span>(redSlider.value)
            writeLEDValueToChar( withCharacteristic: redChar!, withValue: <span class="hljs-type">Data</span>([slider]))

        }
</code></pre>
<p>Repeat this for <code>GreenSliderChanged</code> and <code>BlueSliderChanged</code>. Make sure you changed <code>red</code> to <code>green</code> and <code>blue</code> for each!</p>
<p>Finally, to keep things clean, i've also added a function that handles Bluetooth disconnects.</p>
<pre><code class="lang-swift">    <span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">centralManager</span><span class="hljs-params">(<span class="hljs-number">_</span> central: CBCentralManager, didDisconnectPeripheral peripheral: CBPeripheral, error: Error?)</span></span> {
</code></pre>
<p>Inside, we should reset the state of the sliders to 0 and disable them.</p>
<pre><code class="lang-swift">            <span class="hljs-keyword">if</span> peripheral == <span class="hljs-keyword">self</span>.peripheral {
                <span class="hljs-built_in">print</span>(<span class="hljs-string">"Disconnected"</span>)

                redSlider.isEnabled = <span class="hljs-literal">false</span>
                greenSlider.isEnabled = <span class="hljs-literal">false</span>
                blueSlider.isEnabled = <span class="hljs-literal">false</span>

                redSlider.value = <span class="hljs-number">0</span>
                greenSlider.value = <span class="hljs-number">0</span>
                blueSlider.value = <span class="hljs-number">0</span>
</code></pre>
<p>It's a good idea to reset <code>self.peripheral</code> to nil that way we're not ever trying to write to a phantom device.</p>
<pre><code class="lang-swift">                <span class="hljs-keyword">self</span>.peripheral = <span class="hljs-literal">nil</span>
</code></pre>
<p>Finally, because we've disconnected, start scanning again!</p>
<pre><code class="lang-swift">                <span class="hljs-comment">// Start scanning again</span>
                <span class="hljs-built_in">print</span>(<span class="hljs-string">"Central scanning for"</span>, <span class="hljs-type">ParticlePeripheral</span>.particleLEDServiceUUID);
                centralManager.scanForPeripherals(withServices: [<span class="hljs-type">ParticlePeripheral</span>.particleLEDServiceUUID],
                                                  options: [<span class="hljs-type">CBCentralManagerScanOptionAllowDuplicatesKey</span> : <span class="hljs-literal">true</span>])
            }
</code></pre>
<p>Alright! We just about ready to test. Let's move on to the next (and final) step.</p>
<h2 id="heading-test-the-sliders">Test the sliders.</h2>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/Flow-5-3af7db2e-8bf7-4561-98c2-a1b7ab0c685b.jpg" alt="Next section test!" width="600" height="400" loading="lazy"></p>
<p>The hard work is done. Now it's time to play!</p>
<p>The easiest way to test everything is to <strong>click the Play button</strong> in the top left or the <strong>Command + R</strong> keyboard shortcut. Xcode will load the app to your phone. You should see a white screen proceeded by a screen with your sliders!</p>
<p>The sliders should stay greyed out until connected to your Particle Mesh board. You can check your log output if the connection has been established.</p>
<pre><code>View loaded
Central state update
Central scanning <span class="hljs-keyword">for</span> B4250400-FB4B<span class="hljs-number">-4746</span>-B2B0<span class="hljs-number">-93</span>F0E61122C6
Connected to your Particle Board
LED service found
Red LED characteristic found
Green LED characteristic found
Blue LED characteristic found
</code></pre><p>(Look familiar? We're connected!)</p>
<p>If you followed everything perfectly, you should be able to move the sliders. Better yet, the RGB LED on the Particle Mesh board should change color.</p>
<p><img src="https://www.jaredwolff.com/the-ultimate-how-to-bluetooth-swift-with-hardware-in-20-minutes/images/DSC01556-1fda5018-f1f5-4855-8705-f7d344ce3d78.jpeg" alt="Final test results" width="600" height="400" loading="lazy"></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In this article you've learned how to connect your Particle Mesh board and iOS device over Bluetooth. We've learned how to connect to each of the available characteristics. Plus, on top of it all, make a clean interface to do it all in.</p>
<p>As you can imagine, you can go down the rabbit hole with Bluetooth on iOS. There's more coming in my upcoming guide: <strong>The Ultimate Guide to Particle Mesh.</strong> Subscribers to my list get access to pre-launch content and a discount when it comes out! <a target="_blank" href="https://www.jaredwolff.com/the-ultimate-guide-to-particle-mesh/">Click here to get signed up.</a></p>
<h2 id="heading-code">Code</h2>
<p>The full source code is available on <a target="_blank" href="https://github.com/jaredwolff/swift-bluetooth-particle-rgb">Github.</a> If you find it useful, hit the star button. ⭐️</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ DevRel Down the Stack: Containers, Kubernetes and DevOps Engineers ]]>
                </title>
                <description>
                    <![CDATA[ By David Nugent IBM’s $34B acquisition of Red Hat closed last week, underscoring the huge and growing importance of  hybrid cloud infrastructure. My colleague Marek Sadowski has become a  subject matter expert in containers, Kubernetes and server-sid... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/devrel-down-the-stack-containers-kubernetes-and-devops-engineers/</link>
                <guid isPermaLink="false">66d45e043dce891ac3a967cc</guid>
                
                    <category>
                        <![CDATA[ containers ]]>
                    </category>
                
                    <category>
                        <![CDATA[ developer-advocacy ]]>
                    </category>
                
                    <category>
                        <![CDATA[ developer relations ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Kubernetes ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Swift ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Swift Programming ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Thu, 18 Jul 2019 10:30:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2019/07/marek-devrel-banner.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By David Nugent</p>
<p>IBM’s <a target="_blank" href="https://newsroom.ibm.com/2019-07-09-IBM-Closes-Landmark-Acquisition-of-Red-Hat-for-34-Billion-Defines-Open-Hybrid-Cloud-Future">$34B acquisition of Red Hat</a> closed last week, underscoring the huge and growing importance of  hybrid cloud infrastructure. My colleague Marek Sadowski has become a  subject matter expert in containers, Kubernetes and server-side Swift,  although he started out as a full stack developer advocate, a robotics  startup founder and an entrepreneur.</p>
<p><img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LGWhCAWn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/gr6qrvfie9qrbx21gy4o.jpg" alt="Marek lecturing" width="600" height="400" loading="lazy"></p>
<p>Marek has 20 years of enterprise consulting experience throughout the  USA, Europe, Japan, Middle East and Africa, and he pioneered in  research on VR goggles for the virtual reality system to control robots  on Mars during his time at NASA. After founding a robotics startup,  Marek came to work at IBM. I talked to him about his experience in  DevOps advocacy.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ul>
<li>How DevOps advocacy different from API/app advocacy?</li>
<li>How do you focus on the DevRel community?</li>
<li>What have you changed when moving to DevOps DevRel?</li>
<li>How do you get developers to see Swift as server-side?</li>
<li>How did you get into DevRel?</li>
</ul>
<p><img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OCVtuwPo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/x0ccbjsy1k941giianl7.jpg" alt="Marek lecturing" width="600" height="400" loading="lazy"></p>
<h3 id="heading-q-one-of-your-focus-areas-in-devrel-is-containers-how-is-advocating-for-a-devops-technology-different-than-advocating-for-an-api-or-application">Q: One of your focus areas in DevRel is containers. How is advocating  for a DevOps technology different than advocating for an API or  application?</h3>
<p>Good question. When working with containers, engineers think more in  terms of the plumbing and ideas of DevOps and the ease of expanding your  infrastructure footprint. In contrast, when you talk about APIs, you  try to make application development the center of gravity for the  discussion.</p>
<p>When discussing APIs with developers, you talk about how one could -- in a robust way -- consume the API. Let’s take the <a target="_blank" href="https://ibm.biz/BdzKG5">IBM Watson API</a> as an example: our team will talk about how you can create and run SDKs  for developers to consume APIs in their own language, for example,  Swift (for mobile) or Java (for enterprise.) You’d look at the consumer  of your API and discuss how you can produce the API, protect yourself  and do the billing.</p>
<p>Getting back to containers: when discussing container technology, you speak more about <em>plumbing</em> of the cloud. How do you manage containers? Expand them? Manage their workloads? Deliver and test new versions?</p>
<p>It quickly becomes apparent that these are two separate concepts.  Containerization deals with how your backend is working and proper  maintenance of your application, which attracts people from a DevOps  background. When you talk about APIs, that’s a completely different  story. Your thought paradigm changes to the point of view of the  consumer: How does the consumer find the API? How can developers consume  the API?</p>
<p>I speak at conferences on both subjects areas. I’ve found that people  who develop applications are more interested in the look and feel and  developer experience of the application, whereas with containers it’s  more about backend, load balancing, and seeing issues from a system  administrator’s perspective.</p>
<h3 id="heading-q-many-people-are-familiar-with-devrel-with-a-focus-on-software-engineers-but-devops-is-a-different-community-entirely-how-do-you-focus-on-that-community">Q: Many people are familiar with DevRel with a focus on software  engineers, but DevOps is a different community entirely. How do you  focus on that community?</h3>
<p>There is a division — everybody is interested in new things like  Kubernetes and Docker, but not too many will want to perfect their  skills to the point that it’s their daily job. So many developers want  to know how to spin up a container and a service inside the container,  put it in their resume and be done with it. Developers may be interested  because it’s fashionable or it’s a buzzword. However, you can find a  lot of people who are running services in containers and have specific  questions: sysadmins who want to monitor containers and assure security,  load balancing, and other aspects of administration. It’s a completely  different audience from developers who consume APIs and create a cool  web application. They are two different communities, and you have to  give each community different content.</p>
<p>For example, in a hackathon it’s very difficult to create large  deployments in containers. It’s an optimization of development and  operations more than application coding.</p>
<p><img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eA1r0etR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/9sh0o5no0f09pjbj31qk.jpg" alt="The IBM SF City Team staffing a booth" width="600" height="400" loading="lazy"></p>
<h3 id="heading-q-how-have-you-had-to-change-your-approach-to-devrel-when-moving-to-devops-advocacy">Q: How have you had to change your approach to DevRel when moving to DevOps advocacy?</h3>
<p>Previously when I ran workshops focused on application developers,  they’ll usually have a few goals: understand our API, consume data from  API endpoints and create a simple “Hello World” types of applications.  Developers in these workshops will ask questions about high-level ways  of architecting applications, e.g. with Watson, in mobile applications  or web applications, or a chain of processes.</p>
<p>On the contrary, when I speak about DevOps and containers, developers  in the audience want to spin up the services, see how they scale up and  scale down, investigate how the services behaving when something is  failing and how to ameliorate security issues. It’s a completely  different approach. They are not interested in building something new,  they want to perfect their approach to deployment.</p>
<p>An analogy I can give to people new to this field: it’s like inviting  a painter and a plumber to a party. They both do similar things, yet  the painter wants to make a painting that you can hang on the wall, and  the plumber will rarely speak about the type of piping he’s using inside  your walls. Both are doing something in your house, but the painter is  thinking about the people they will attract and the paint (our APIs) to  ensure a pleasant viewing experience, while the plumber just wants to  get the job done and never touch it again. The plumbers want to make  changes as rarely as possible and focus on stability, the painter wants  to create more new paintings. They have different approaches based on  their different goals.</p>
<h3 id="heading-q-you-also-give-talks-on-swift-specifically-on-the-server-side-most-people-know-swift-from-the-ios-development-side-but-why-is-it-useful-on-the-server-how-do-you-get-developers-to-think-of-it-as-a-server-language">Q: You also give talks on Swift, specifically on the server side. Most  people know Swift from the iOS development side, but why is it useful  on the server? How do you get developers to think of it as a server  language?</h3>
<p>Server-side Swift is a relatively new development. I compare the  current state of server-side Swift to where Java was twenty-four years  ago. In 1996 I started writing a server-side application using Java --  it was a novel concept at that time! The same thing is happening now  with Swift, as developers are moving the Swift language to the server.  There are a lot of reasons why; one of the simplest is that you write in  the same language on the server as you do for your mobile app, and in  that way you can use the same data constructs, thought processes and  personnel resources on both systems. You don’t need different systems or  frameworks to talk to the database or the cloud.</p>
<p>Every mobile app nowadays asks you to connect to the internet for AI,  messaging and social media. Even simple games allow you to exchange  information or have a conversation with people all over the world. If  your app and back-end are written in one language like Swift, it makes  these data exchanges simple and transparent.</p>
<p>Some people are saying <em>Swift is a fashionable language to learn</em>.  Since you have the option to write apps in Java or JavaScript, you can  also write them in Swift. Swift has now been open-sourced by Apple,  similar to the way Sun opened up Java. You can now write applications in  the cloud or on any platform. For example, OpenWhisk allows you to  write event-based Swift functions in the cloud without any DevOps code.</p>
<p>With Swift, developers are attracted to the beauty of the language  and the ability to write one language from mobile to cloud to make your  application better and easier to maintain. You can enjoy writing in your  language of choice and expand the capabilities of the environment you  love. If you are an iOS developer, maybe you can become a full-stack  developer, and developers love the story that they can become something  more and participate in the full stack development process.</p>
<p><img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SlcpOzfS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/chlb5mirpmyo4jher7bp.jpg" alt="Marek" width="600" height="400" loading="lazy"></p>
<h3 id="heading-q-how-did-you-get-into-developer-relations">Q: How did you get into developer relations?</h3>
<p>I had just come to the United States from Poland as the founder of a  startup, and the purpose of the move was to expand my company. They say  that 99% of startups don’t succeed right away, and founders often need  to bootstrap while in an existing job. I was told that working in the  cloud is the key factor in a lot of industries, but I had little  exposure to those technologies. On the other hand, I had built up skills  talking to investors, and as an entrepreneur, I was able to understand  what was important to startups. I also had a robust background in Java  development and different IT technologies — I had a career as an  architect supporting banks and other enterprises EMEA as a Java  professional, demonstrating systems to customers.</p>
<p>There was an opening for a mobile-first developer advocate, and  despite having no mobile or cloud experience, I convinced the  interviewer that I was the perfect candidate due to my ease of speaking  with developers and presenting technical subjects in an accessible  manner. I enjoy explaining complex topics in a simple way through demos  and example projects.</p>
<p>My hiring manager asked me to build a small mobile app as an employment test, which connected to <a target="_blank" href="https://ibm.biz/BdzKGU">IBM Cloud</a> to exchange information between the user and a backend. I enjoyed the  task and found I was good at it! After two years, I migrated to more  cloud technologies and more and more IBM APIs. Eventually I started to  find interest in Kubernetes and containers, and I realized containers  are a field with amazing growth potential.</p>
<p>I must say, the thing that attracted me the most to DevRel was the  opportunity to learn and convey new technologies to developers out  there, and use my talent for explaining complex things in a  straightforward manner.</p>
<p><img src="https://res.cloudinary.com/practicaldev/image/fetch/s--q3yO1Vrc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/eccad3abeiluyjgz8i8b.jpg" alt="Marek snowboarding" width="600" height="400" loading="lazy"></p>
<h3 id="heading-httpsdevtodrnugentdevrel-down-the-stack-containers-kubernetes-and-talking-to-devops-engineers-hm7next-steps-next-steps"><a target="_blank" href="https://dev.to/drnugent/devrel-down-the-stack-containers-kubernetes-and-talking-to-devops-engineers-hm7#next-steps"></a>    Next Steps:</h3>
<ul>
<li><a target="_blank" href="https://twitter.com/blumareks">Follow Marek on Twitter</a></li>
<li>See Marek speak at an upcoming <a target="_blank" href="https://www.meetup.com/IBM-Developer-SF-Bay-Area-Meetup">IBM Developer SF Meetup</a></li>
</ul>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Best Gitter channels for: iOS Developers ]]>
                </title>
                <description>
                    <![CDATA[ By Gitter Today we have something for you, iOS developers! Whether you are riding your Swift knowledge outside of iOS or keeping things steady with some battle-hardened Objective-C, there’s a community of developers just like you on Gitter. And, if y... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/best-gitter-channels-for-ios-developers-173b32627ce1/</link>
                <guid isPermaLink="false">66c345935ced6d98e4bd32a4</guid>
                
                    <category>
                        <![CDATA[ Swift Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ iOS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Swift ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 29 Feb 2016 15:54:00 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*4ZIJAn1D3T4PHArLCtYsFg.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Gitter</p>
<p>Today we have something for you, iOS developers! Whether you are riding your Swift knowledge outside of iOS or keeping things steady with some battle-hardened Objective-C, there’s a community of developers just like you on <a target="_blank" href="https://gitter.im">Gitter</a>. And, if you’re looking to get up to speed or to help the next generation, then there are plenty of learning resources to get involved with as well.</p>
<ul>
<li><a target="_blank" href="https://gitter.im/PerfectlySoft/Perfect?utm_source=blog&amp;utm_medium=content&amp;utm_campaign=ios"><strong>PerfectlySoft/Perfect</strong></a> — Perfect is an application server which provides a framework for developing web and other REST services in the Swift programming language. The Perfect library, server, connectors and example apps.</li>
<li><a target="_blank" href="https://gitter.im/mxcl/PromiseKit?utm_source=blog&amp;utm_medium=content&amp;utm_campaign=ios"><strong>PromiseKit</strong></a> — Promises is a thoughtful and complete implementation of promises for iOS and OS X with first-class support for both Objective-C <em>and</em> Swift.</li>
<li><a target="_blank" href="https://gitter.im/IBM-Swift/Kitura?utm_source=blog&amp;utm_medium=content&amp;utm_campaign=ios"><strong>IBM-Swift/Kitura</strong></a> — Kitura is a web framework and web server that is created for web services written in Swift.</li>
<li><a target="_blank" href="https://gitter.im/CocoaPods/CocoaPods?utm_source=blog&amp;utm_medium=content&amp;utm_campaign=ios"><strong>CocoaPods</strong></a> — CocoaPods manages dependencies for your Xcode projects.</li>
<li><a target="_blank" href="https://gitter.im/appium/appium?utm_source=blog&amp;utm_medium=content&amp;utm_campaign=ios"><strong>Appium</strong></a> <strong>—</strong> Appium is an open source, cross-platform test automation tool for native, hybrid and mobile web apps, tested on simulators (iOS, FirefoxOS), emulators (Android), and real devices (iOS, Android, FirefoxOS).</li>
<li><a target="_blank" href="https://gitter.im/Boris-Em/BEMSimpleLineGraph?utm_source=blog&amp;utm_medium=content&amp;utm_campaign=ios"><strong>BEMSimpleLineGraph</strong></a> — iOS library to create simple line graphs/charts (charting library).</li>
<li><a target="_blank" href="https://gitter.im/ankurp/Dollar?utm_source=blog&amp;utm_medium=content&amp;utm_campaign=ios"><strong>Ankurp/Dollar</strong></a> — A functional tool-belt for Swift Language similar to Lo-Dash or Underscore.js in Javascript</li>
<li><a target="_blank" href="https://gitter.im/alcatraz/Alcatraz?utm_source=blog&amp;utm_medium=content&amp;utm_campaign=ios"><strong>Alcatraz</strong></a> — Open-source package manager for Xcode 5+. It lets you discover and install plugins, templates and color schemes without the need for manually cloning or copying files.</li>
<li><a target="_blank" href="https://gitter.im/matiassingers/grunt-xcode?utm_source=blog&amp;utm_medium=content&amp;utm_campaign=ios"><strong>Grunt-xcode</strong></a> — Build and export Xcode projects with Grunt</li>
<li><a target="_blank" href="https://gitter.im/linitix/nzero-push?utm_source=blog&amp;utm_medium=content&amp;utm_campaign=ios"><strong>Zero-push</strong></a> — ZeroPush is a simple service for sending Apple Push Notifications. This library wraps the API requests for use in NodeJS.</li>
<li><a target="_blank" href="https://gitter.im/codefellows/sea-c24-iOS-F2?utm_source=blog&amp;utm_medium=content&amp;utm_campaign=ios"><strong>Codefellows/sea-c24-iOS-F2</strong></a> — Official repository for the iOS Foundations II course.</li>
<li><a target="_blank" href="https://gitter.im/mixi-inc/iOSTraining?utm_source=blog&amp;utm_medium=content&amp;utm_campaign=ios"><strong>mixi-inc/iOSTraining</strong></a> — Training course repository for iOS app development.</li>
</ul>
<p>Are you looking for something else? Check out our <a target="_blank" href="https://gitter.im/explore/tags/javascript,php,ruby">Explore</a> section or easily <a target="_blank" href="https://gitter.im/home#createroom">start your own channel here.</a></p>
<p>Did we miss an channel that you think should be featured? Drop us a line in the <a target="_blank" href="https://gitter.im/gitterHQ/gitter">Gitter HQ</a> and we will add it to the list.</p>
<p>Happy coding!</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
