<?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" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Danilo Casillo on Medium]]></title>
        <description><![CDATA[Stories by Danilo Casillo on Medium]]></description>
        <link>https://medium.com/@danilo.casillo00?source=rss-a63ac70bd6bc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ahzIScC_uEMBX_GC.jpg</url>
            <title>Stories by Danilo Casillo on Medium</title>
            <link>https://medium.com/@danilo.casillo00?source=rss-a63ac70bd6bc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 02:15:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@danilo.casillo00/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[MultiPeer Connectivity: what is it?]]></title>
            <link>https://medium.com/@danilo.casillo00/multipeer-connectivity-what-is-it-6b56b091dad1?source=rss-a63ac70bd6bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b56b091dad1</guid>
            <dc:creator><![CDATA[Danilo Casillo]]></dc:creator>
            <pubDate>Mon, 22 Jun 2020 22:21:19 GMT</pubDate>
            <atom:updated>2020-06-22T22:27:14.031Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi guys, we are ArCaDi, a small but powerful team of three young guys with a common passion…videogames!</p><p>Everybody loves videogames, and, sometimes, the most passionates want to know what’s behind a videogame: structure, code, game logic and much more…maybe with the will to develop their own game one day!</p><p>So, in order to success in our BackEnd app challenge, we thought : why don’t we match our passion for videogames with an app’s aspect that many players/developers underestimate, but that could hide many difficulties… we are talking about MultiPeer Connectivity.</p><p>So, for the joy of all Apple game developers around the world we will show how to implement this powerful framework provided by Apple in your iOS app, letting you to meet your nearby friends devices throughout BLUETOOTH (but not only) technology, accepting or sending invitations to devices!</p><p>We want not only to explain you how to reach this goal, but also we want to make you sure that it works! How? With a simple but exciting game that many of you could already know…we are talking about CONNECT 4!</p><p>For the few who don’t know it, Connect4 is a 1vs1 game which lasts a maximum of 10 minutes, the aim is to line up 4 checkers, the first one who succeeds wins.</p><p>You Are already excited, yeah? But wait…first the hard work and after the pleasure, so…let’s get started with MultiPeer Connectivity framework.</p><p>To start, open your Xcode project, and <em>import</em> the framework</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*99AmstofQp-jZajpAMj00Q.png" /></figure><p>For using it, we have to declare principally three variables:</p><ul><li>MCPeerID, the user identifier;</li><li>MCSession, the session used for the connectivity.</li><li>MCAdvertiserAssistant, the handler of the invitations .</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*6xNLLbPO75ORihPTIZjXGg.png" /></figure><p>Next, we have to setup our multipeer session; for doing that, define a new function, <em>multipeerSetup </em>, with the following body:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6E549zbW9NKujO0x_W-YwA.png" /></figure><p>and call it where you want (f.e. in the <em>viewDidLoad</em> method)</p><p>Through the delegate assignment, you will say that the View Controller is responsable of say what your app do when certain events occure. Surely, when you try to assign ViewController to MCSessions’ delegate, Xcode shows you that he cannot assigne value of type “View Controller” to type “MCSessionDelegate”. This problems is dued by an inconsistence of type: for fixing it, you must make ViewController inherits also from MCSessionDelegate. So, go to class definition and add to inherited class “MCSessionDelegate”, as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cq3tt2Nafb82U3lt-BUwuQ.png" /></figure><p>Don’t think about the MCBrowserViewControllerDelegate, we talk about it later.</p><p>As MCSessionDelegate, View Controller class has access to some function. In this tutorial, we use principally the following function:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UqiZeLWFqGTqQcB-VVo4vQ.png" /></figure><p>that allows the delegate to manage the state changing of a peer and say what must be done when the data is received.</p><p>Mmmh, okay? But now? How two peers can connect each other?</p><p>Define now two function, <em>hostSession </em>e <em>joinSession</em>, as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TXE0EIP7fToA2lUN1bLUNw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EGU3BzJXE7zkrUWIetnDvw.png" /></figure><p>The MCBrowserViewController is a particular ViewController that shows you the active invitations and allows you to choose which invitation accept. Also here you must assign ViewController as MCBrowserViewController’s delegate, so (for the same previous reasons) add “MCBrowserViewControllerDelegate” to inherited classes list. So, two new function is added: they are responsable to manage the browserViewController events (didFinish and didCancelled) .</p><p>The presented view controller is like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*bwciOF2f1OrvjkPoiKnXQg.png" /></figure><p>where appears all the hosting peers.</p><p>For sending data, we have to use the <em>send</em> method of mcSession, that send a particular data to the connected peers, using a particular option.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EL-uMCzqrvaShvHRyM_JbQ.png" /></figure><p>This functions is called when a counter is inserted in a certain index. The <em>NSKeyedArchiver.archivedData </em>is needed because the MCSession can send only a <em>Data </em>object. Standard types are able to be converted to <em>Data</em>, so if you want send a particular data, you have to define in its class an encode function for encoding every parts of it. In our example, it’s needed only pass the index of the cell that is changing its state.</p><p>For managing the received data, we have to use the related method of the MCSessionDelegate, as following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OE5sL6Dh1S4z4jJNq6-CcA.png" /></figure><p>The <em>NSKeyedUnarchiver</em> is used now for decoding the Data received. So, for the same reasons, our class must have a decode function for decoding the object previously encoded.</p><p>Before to launch, go in AppDelegate and insert a UIWindow object. At the end, AppDelegate will appear like following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TbZA7dXT6ocXnmGc3Prefw.png" /></figure><p>In the info.plist, delete the APPLICATION SCENE MANIFEST section.</p><p>Now, we have all for managing, in the best way, the connection between 2 different devices. But why not testing it? Download our project and build it on your iPhone, and try to <em>connect4</em>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*JYPb8z_MoUx4MaG_lCMm7A.png" /></figure><p>Link to git repo. : <a href="https://gitlab.com/DanCasillo/connect4online">https://gitlab.com/DanCasillo/connect4online</a></p><p>© by ArCaDi, formed by: <br>Francesco Aroldo, Danilo Casillo, Simone Di Guida.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b56b091dad1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BeCraft]]></title>
            <link>https://medium.com/apple-developer-academy-federico-ii/becraft-7d258d54a64e?source=rss-a63ac70bd6bc------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d258d54a64e</guid>
            <dc:creator><![CDATA[Danilo Casillo]]></dc:creator>
            <pubDate>Wed, 18 Mar 2020 16:23:09 GMT</pubDate>
            <atom:updated>2020-03-18T16:23:09.926Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Guys, we want to talk you about our story…</p><p>Imagine the following situation: a group of friends is chilling out, like every Friday, after an hard day of developing at the ADA, in their most favorite brewery in Naples, Mosto.</p><p>Everyone was relaxing, tasting their most preferred craft beer…except one guy, Michele: his favorite beer was finished.</p><p>We tried to convince him in tasting other craft beers, but he didn’t want to listen us…he had to have his beer!</p><p>So, an idea came to our minds: why don’t we make our most favorite craft beers at home?</p><p>Every one was excited for the idea, but , here come the problems...</p><p>no-one nearby could help us to start with this new experience, and online there are infinite sources, different ingredients, formula and so on.</p><p>We had to talk to someone who tried this experience, or maybe who wanted</p><p>to get engaged in the world of homemade beer, in order to understand what beer lovers expect from a digital support….</p><p>Thanks to an investigation we find out that:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YudArOWKxHZ5YCBVEUIrtw.jpeg" /></figure><p>The most common issues that affect a beer lover who wants to begin this home crafting experience are: the length of the process, the difficulty of the process and also he doesn’t know where to start.</p><p>But also was necessary the compare with someone much more expert, for a much more technical support, so it was time to go to talk door by door to all breweries possible….many didn’t even want to talk with us, but finally the luck begun to turn by our side! The help arrived right from where everything started…Mosto’s owner decided to support us in all the process, ingredients and with many suggestion about design.</p><p>So after many days of investigate and act, the solution is arrived…BeCraft!</p><p>BeCraft is an app that helps whoever in doing their homemade beer step-by-step in a perfect way.</p><p>BeCraft gives you the possibility of choosing between a lot of beer recipes and starting a new process, but also, for who doesn’t know with which kind of beer starting this homemade experience, BeCraft will help you to “find your taste” with a filtering mode which is not available by the time, but it will be coming soon.</p><p>By the way, I don’t know if you know that the making of a beer can last at least 30–40 days but it can last something like 3 months, for example the making of a Stout lasts something like 7 million of seconds.</p><p>With BeCraft the user will be notified whenever a phase has come to, explaining you all the ingredients and how to act in each phase to reach your beer goal.</p><p>So, it’s finally time to let your friend taste your homemade beer , surprising them with incredible tastes, like honey, pepper, lemon and much more..</p><p>So, what are you waiting for…Craft your taste!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nMEnEEueppAea6PdhHTbXg.jpeg" /></figure><p>Test Flight Link: <a href="https://testflight.apple.com/join/9INnBf8V">https://testflight.apple.com/join/9INnBf8V</a></p><p>Demo: <a href="https://www.dropbox.com/s/xt1lfjrdv3egfkw/BeCraftDemo.mov?dl=0">https://www.dropbox.com/s/xt1lfjrdv3egfkw/BeCraftDemo.mov?dl=0</a></p><p>Credits:</p><p>iSaponaros</p><p>Formed by:</p><p>Danilo Casillo</p><p>Simone Di Guida</p><p>Paolo Di Stasio</p><p>Francesco Aroldo</p><p>Carmine Pio D’Antuono</p><p>Michele Garofalo</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d258d54a64e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/apple-developer-academy-federico-ii/becraft-7d258d54a64e">BeCraft</a> was originally published in <a href="https://medium.com/apple-developer-academy-federico-ii">Apple Developer Academy | Federico II</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>