<?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 Joseph Razon on Medium]]></title>
        <description><![CDATA[Stories by Joseph Razon on Medium]]></description>
        <link>https://medium.com/@joseph.razon_81347?source=rss-98ad837dccb2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*w5N5N9NUe19HicZI.jpg</url>
            <title>Stories by Joseph Razon on Medium</title>
            <link>https://medium.com/@joseph.razon_81347?source=rss-98ad837dccb2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 13:22:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@joseph.razon_81347/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[Sign in with Apple — Storyboard version]]></title>
            <link>https://medium.com/justeattakeaway-tech/sign-in-with-apple-storyboard-version-698c650956e7?source=rss-98ad837dccb2------2</link>
            <guid isPermaLink="false">https://medium.com/p/698c650956e7</guid>
            <category><![CDATA[ios-development]]></category>
            <category><![CDATA[sign-in-with-apple]]></category>
            <category><![CDATA[mobile-development]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[storyboard]]></category>
            <dc:creator><![CDATA[Joseph Razon]]></dc:creator>
            <pubDate>Tue, 01 Sep 2020 09:43:13 GMT</pubDate>
            <atom:updated>2020-09-01T09:43:13.382Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to sign in with Apple<strong> — Storyboard Version</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*28B0JAsV3eRjAjIt_ujdlQ.png" /></figure><p>If you have tried to upload your build since June 30, 2020, and you have a third-party sign-in (such as Facebook i.e) included in your project, you probably got into an error saying <strong>“We noticed that your app uses a third-party login service but does not offer Sign in with Apple.</strong>“ and your app is no longer eligible to be distributed in the AppStore anymore.</p><p>According to <a href="https://developer.apple.com/">developer.apple.com</a>, sign in with Apple provides a fast, private way to sign into apps and websites, giving people a consistent experience they can trust and the convenience of not having to remember multiple accounts and passwords.</p><p>In order to get it done, you need to follow few simple steps in order to include Apple sign in into the project.</p><h4><strong>Apple Developer Configuration</strong></h4><ol><li>Go to <a href="https://developer.apple.com/"><strong>developer.apple.com</strong></a><strong>, </strong>select <strong>Certificates, Identifiers &amp; Profiles</strong>, and then select <strong>keys.</strong></li><li>Click on the <strong>+ </strong>button (next to the <strong>keys </strong>title).</li><li>Choose a name you would like to identify your key with, choose the <strong>Sign in with Apple </strong>option and hit continue.</li></ol><h4><strong>Xcode Configuration</strong></h4><ol><li>Go to the project pane, and select your target.</li><li>Choose <strong>Signing &amp; Capabilities.</strong></li><li>Click on the <strong>+ </strong>sign and select the <strong>Sign in with Apple </strong>option.</li></ol><p>Now we are ready for some coding &amp; design.</p><ol><li>Create a property of a <strong>ASAuthorizationAppleIDButton</strong> and give it your desired name (appleSignInButton i.e).</li><li>In your storyboard, add a view object, and set the control’s class value to <strong>ASAuthorizationAppleIDButton</strong> in <strong>Xcode’s</strong> <strong>Identity Inspector</strong>.</li><li>Connect the view to its property in the <strong>connections inspector</strong>.</li></ol><p>After the UI is done, all we need to do is create the logic to make this magic work.</p><p>Go to your viewController and do the following steps:</p><ol><li>Add a target to the view we have just created</li></ol><pre><strong>appleSignInButton.addTarget(self, action: #selector(handleAppleSignInButtonPress), for: .touchUpInside)</strong></pre><p>2. Create the handler function</p><pre><strong>@objc</strong></pre><pre><strong>func handleAppleSignInButtonPress() {</strong></pre><pre><strong>  let request = ASAuthorizationAppleIDProvider().createRequest()</strong></pre><pre><strong>  request.requestedScopes = [.fullName, .email]</strong></pre><pre><strong>  let authorizationController = ASAuthorizationController(authorizationRequests: [request])</strong></pre><pre><strong>  authorizationController.delegate = self</strong></pre><pre><strong>  authorizationController.presentationContextProvider = self</strong></pre><pre><strong>  authorizationController.performRequests()</strong></pre><pre><strong>}</strong></pre><p>As you can see in the example above, we ask for a full name + email address, which is currently the only information we can request.</p><p><strong>Disclaimer: </strong>The user must enable Two-Factor Authentication to use Sign in with Apple so that access to the account is secure.</p><h4><strong>Delegates methods</strong></h4><p>Now it is the time to add the delegate function which will be called after the user has finished the sign in flow and granted access.</p><p>(Note that you will get the full information only when you first sign in with a specific AppleID &amp; AppID)</p><pre><strong>func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) {</strong></pre><pre><strong>   if let appleIDCredential = authorization.credential as? ASAuthorizationAppleIDCredential {</strong></pre><pre><strong>    let userID = appleIDCredential.user</strong></pre><pre><strong>    let email = appleIDCredential.email</strong></pre><pre><strong>    let fullName = “\(appleIDCredential.fullName?.givenName ?? “”) \(appleIDCredential.fullName?.familyName ?? “”)”</strong></pre><pre><strong>  }</strong></pre><pre><strong>}</strong></pre><p>If the authentication fails, the authorization controller invokes the <strong>authorizationController(controller:didCompleteWithError:) delegate</strong> function to handle the error as follows:</p><pre><strong>func authorizationController(controller: ASAuthorizationController, didCompleteWithError error: Error) {</strong></pre><pre><strong>  // Handle error.</strong></pre><pre><strong>}</strong></pre><p>This is the result you should get:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*jXJUIVpmQBciGs-laR4yng.png" /></figure><p>And this is it, you made it! You now can sign in with Apple within your app.</p><p>I hope this tutorial was clear and easy to understand, if not, feel free to leave a comment below.</p><p>In the next articles, we discuss the button types and the guidelines on how we can create our custom Apple sign-in button, and some different approaches.</p><p>Make sure to check out our <a href="https://jobs.takeaway.com/">careers page</a> to discover tech jobs at Takeaway.com!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=698c650956e7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/justeattakeaway-tech/sign-in-with-apple-storyboard-version-698c650956e7">Sign in with Apple — Storyboard version</a> was originally published in <a href="https://medium.com/justeattakeaway-tech">Just Eat Takeaway-tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Get Rid of Object-Oriented Programming For Good (Part 1)]]></title>
            <link>https://medium.com/justeattakeaway-tech/get-rid-of-object-oriented-programming-for-good-part-1-cfd0bc325513?source=rss-98ad837dccb2------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfd0bc325513</guid>
            <category><![CDATA[pop]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[better-programming]]></category>
            <category><![CDATA[oop]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Joseph Razon]]></dc:creator>
            <pubDate>Sun, 14 Jun 2020 07:14:49 GMT</pubDate>
            <atom:updated>2020-06-30T08:46:13.338Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Get Rid of OOP For Good (Part 1)</strong></h3><figure><img alt="Get Rid of Object-Oriented Programming For Good" src="https://cdn-images-1.medium.com/max/1024/1*2db8F59LEiO6VfX0fJDpgA.jpeg" /></figure><p>In this article, we will discuss one of the main principles of OOP (Object Oriented Programming), versus one of the main principles of POP (Protocol-Oriented Programming), and why you should consider adopting POP over OOP.</p><p>If you are familiar with programming, you are probably familiar also with the OOP concept, and if not, here is a small brief to catch up.</p><p><strong><em>Object-Oriented Programming (OOP)</em></strong><em> is a programming paradigm based on the concept of </em><strong><em>objects</em></strong><em>, which can contain data (known as properties) and procedures (known as functions or methods).</em></p><p><strong>OOP</strong> is a way of writing computer programs that are using the idea of objects to represent data (variables) and functions (also called methods), instead of just a list of commands. The way objects are separated depends on one subject or another, thus the functions and data it contains must be related to the same subject or flow.</p><p>Enough theory. Ready to begin? Let’s break it down and see how it works.</p><p>Think of a <strong>Volkswagen Golf car, </strong>how would you describe it?</p><p>The term can be divided into 3 three parts: <strong>Car</strong>,<strong> Volkswagen</strong>, and<strong> Golf.</strong></p><p>The following diagram will simplify things:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JrhTp1rSBmypxJkn" /></figure><p>As you can see, <strong>Golf </strong>is a kind of <strong>Volkswagen, </strong>which is a kind of a <strong>car, </strong>which is a kind of a <strong>vehicle.</strong> Each one is of the objects related to the object it’s made of.</p><p>You can think of it as a derivation, or how we call it in programming languages — inheritance.</p><p>In simpler terms, it means that <strong>car </strong>contains all <strong>vehicle</strong>’s properties and functionality, <strong>Volkswagen</strong> contains all <strong>car’s and vehicle’s</strong> properties and functionality, and <strong>Golf </strong>contains all <strong>Volkswagen’s, car’s and vehicle’s</strong> properties and functionality.</p><p>Let’s complicate it a bit. What will happen if we have more than one car manufacturer?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DjXhUIiNpoA0BioH" /></figure><p>Looks simple right? Now instead of another car manufacturer, we will add another <strong>vehicle</strong> type. How would it look like?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1nOCY9rG9Jdy75YJ" /></figure><p>The diagram can keep dividing until it gets to the pyramid’s top. And as you can see all these diagrams represent the same idea — an object that is a part of a group, which is also a part of a group, etc.</p><p>Here is a code example of OOP implementation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9YVIZlkoYIeiH2IS" /></figure><p>As shown, the <strong>Vehicle </strong>class contains two methods: <strong>ignite()</strong> and <strong>accelerate()</strong>, and the <strong>Car </strong>class inherits the <strong>Vehicle </strong>class and contains only one method — <strong>startDriving()</strong>.</p><p>Although the car class does not declare the <strong>ignite()</strong> nor the <strong>accelerate()</strong> method, according to its inheritance to the <strong>Vehicle </strong>class — it can use its “father” methods.</p><p>Now that we know OOP, we can move forward to POP. But before that, we will discuss the basics of it: the <strong>protocol</strong> itself. What is a <strong>protocol</strong>?</p><p>A <strong>protocol</strong> is also called an <strong>interface, </strong>and the most simple way to describe it is: <em>A </em><strong><em>protocol</em></strong><em> is a set of rules to follow, known as abstraction as well</em>.</p><p><strong>So what does it mean in programming?</strong></p><p>Given the previous example, let’s say we have a car. What is the main purpose of a car? To drive. In that case, the car is <strong>driveable</strong>, therefore our protocol will be named <strong>driveable</strong>, and will contain at least one primary function called <strong>drive</strong>. The protocol can contain as many variables and functions as we need when the only rule is — <strong>it has to be related to the main subject of the protocol</strong>.</p><p>An object can conform to more than one protocol. The reason for that is to give the ability to a certain object to do as many actions as needed.</p><p>Let’s take our car as an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qzEDEW-9erKuelaF" /></figure><p><strong>How does that come to action in real-life coding?</strong></p><p>Assuming we have popups in our app and we know that all of our popups need to have a <strong>close</strong> button, we will create a dedicated <strong>protocol</strong> and call it <strong>Closeable.</strong> The purpose of this <strong>protocol</strong> will be to grant a closing action(functionality) to every object who conforms to it. To be more precise, at this point the protocol enforces this ability, which means that every popup that will conform to it will have to implement the <strong>close</strong> action we previously declared.</p><p><strong>** Keep in mind that protocols can only declare variables and functions but not implement them. **</strong></p><p>Here is a code example of POP implementation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*JQDB1118lUyIZ-5q" /></figure><p><strong>Conclusions:</strong></p><p>In OOP we concentrate on creating objects, our program will be based on objects and what needs to be inherited. All of our planning will be done according to that. When we create an object, we need to consider what will be the parent / child objects we will inherit from / to.</p><p>POP is a bit different. The main consideration is the sets of rules and using them to enrich or limit the object’s functionality. In POP we also create objects but the objects conform to one (or more) protocol instead of one to another.</p><p>It is essential to remember that the main difference between those two approaches is that when using <strong>OOP</strong> we are <strong>limited to inherit only from one object</strong>, while in <strong>POP</strong> we can <strong>conform to as many protocols as we need</strong>. Therefore, in my opinion, POP is much more preferable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfd0bc325513" width="1" height="1" alt=""><hr><p><a href="https://medium.com/justeattakeaway-tech/get-rid-of-object-oriented-programming-for-good-part-1-cfd0bc325513">Get Rid of Object-Oriented Programming For Good (Part 1)</a> was originally published in <a href="https://medium.com/justeattakeaway-tech">Just Eat Takeaway-tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>