<?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 Arif Luthfiansyah on Medium]]></title>
        <description><![CDATA[Stories by Arif Luthfiansyah on Medium]]></description>
        <link>https://medium.com/@lutluthfi?source=rss-dc3dfcb02ac8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GNepLOw2p6JQZBF4BRUo9Q.jpeg</url>
            <title>Stories by Arif Luthfiansyah on Medium</title>
            <link>https://medium.com/@lutluthfi?source=rss-dc3dfcb02ac8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 08 Apr 2026 04:20:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lutluthfi/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[Playing with Subscript keyword to access Array safely]]></title>
            <link>https://medium.com/geekculture/playing-with-subscript-keyword-to-access-array-safely-4e935d9b8ee0?source=rss-dc3dfcb02ac8------2</link>
            <guid isPermaLink="false">https://medium.com/p/4e935d9b8ee0</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Arif Luthfiansyah]]></dc:creator>
            <pubDate>Thu, 22 Jul 2021 06:01:08 GMT</pubDate>
            <atom:updated>2021-07-25T13:49:56.324Z</atom:updated>
            <content:encoded><![CDATA[<h3>🙂 Introduction</h3><p>Hi everyone, I hope you all are safe and healthy. Hi iOS developers, have you ever fear while accessing an array? If you have, then you are in the right playground to control your fear.</p><h3>😵‍💫 Problem</h3><p>Have you ever get an error Fatal Error: Index out of range while trying to get value at a specific index? This error is trivial but dangerous because it will lead crash to your app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ovgqCb35rkH2c89f56Ed4Q.png" /><figcaption>Index out of range while accessing the index that has never been set</figcaption></figure><h3>💡 Idea</h3><p>We could avoid that error with thesubscript keyword in Swift, yeay 🥳. Let’s get in touch with the subscript keyword. What is the subscript keyword? and how does it works?</p><h4>What is subscript keyword?</h4><p>subscript is a shortcut for accessing the member elements of a collection, list, or sequence. But in another context, you can use subscript like computed getter and setter of your struct or class. You can click <a href="https://docs.swift.org/swift-book/LanguageGuide/Subscripts.html">here</a> to know more about subscript .</p><h4>How does it work?</h4><p>subscript is like computed getter and setter . You can write your incredible code for getter and setter . Here is the default syntax of using the subscript keyword.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KpktzESB2BwwEjU_joE4qw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QLYICEToLGDRcM7f_HrKjg.png" /><figcaption>the subscript syntax is written in two ways</figcaption></figure><h3>🎯 Action</h3><p>Let’s back to the problem. We could take advantage after we know a glimpse of subscript keywords in Swift. So, here is the code for accessing your array safely.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vEKbA7l8vpjjxTz3tyfMUQ.png" /><figcaption>the solution</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c-3jgif-RFAeoeEdlaqvsw.png" /><figcaption>how to use the solution</figcaption></figure><h3>✨ Summary</h3><p>You can take advantage of using the subscript keyword to access your object or collection.</p><h4>Pros</h4><ul><li>You can save your time complexity by using this way instead of using both contains() and contains(where:) .</li><li>Safely access the value at a specific index.</li></ul><h4>Cons</h4><ul><li>This approach is suitable if you just know the index and don’t know the value inside your collection.</li><li>It will be good to have a checker in our compiler because you can’t give nil as the new value.</li></ul><h3>👋🏻 Closing</h3><p>Thank you! I hope this helps you. Please let me know if you have any trouble or any discussion about this. Never stop learning! 🔥</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4e935d9b8ee0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/playing-with-subscript-keyword-to-access-array-safely-4e935d9b8ee0">Playing with Subscript keyword to access Array safely</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Playing with XcodeGen to avoid pbxproj file conflicts ⚠️]]></title>
            <link>https://medium.com/geekculture/play-with-xcodegen-to-avoid-pbxproj-file-conflicts-%EF%B8%8F-7e658443fee7?source=rss-dc3dfcb02ac8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e658443fee7</guid>
            <category><![CDATA[conflict]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[xcodeproj]]></category>
            <category><![CDATA[xcodegen]]></category>
            <dc:creator><![CDATA[Arif Luthfiansyah]]></dc:creator>
            <pubDate>Wed, 21 Jul 2021 03:07:46 GMT</pubDate>
            <atom:updated>2021-07-21T07:37:50.001Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*giGthUKjawmGIRxNxFlnvA.png" /></figure><h3>🙂 Introduction</h3><p>Hi everyone, I hope you all are safe and healthy. Hi iOS developers, do you work in a team? Have you had a conflict with the pbxproj file? If yes, this time I want to invite you to play with XcodeGen to avoid pbxproj file conflicts.</p><h3>😵‍💫 Problem</h3><p>Have you had a conflict with the pbxproj file? For example, you and your teammates both add files in the same directory location. When you want to merge your working branch into a development branch or feature branch, then the conflict happens 💥🤯.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ebQHcc1UdPULUU26IkppsQ.png" /></figure><h3>💡 Idea</h3><p>We could avoid the pbxproj file conflict by using supporting tools. Here I recommend you guys to use <a href="https://github.com/yonaskolb/XcodeGen">XcodeGen</a>.</p><h4>Why?</h4><ul><li>It’s easy to use to operate. It means when your project configuration is ready, you only need to open your terminal and run xcodegen.</li><li>It supports to create Info.plist</li><li>It supports customizing your project Build Setting and Build Phase . Yes, it also supports entitlement configurations.</li><li>Allow you to run any commands before generating the xcodeproj file.</li><li>Allow you to run any commands after generating the xcodeproj file.</li><li>No longer need to push xcodeproj and xcworkspace , Info.plist is optional.</li></ul><h4>Why not?</h4><ul><li>It’s a bit of a hassle to customize the project Build Settings and Build Phase . Because you need to know the key of configuration that the value you want to set. My way is you need to open the pbxproj file with another editor application to see the complete key.</li></ul><h3>🎯 Action</h3><p>I will share my personal project configuration that already implements <a href="https://github.com/yonaskolb/XcodeGen">XcodeGen</a>. The project configuration will be written in a project.yml file. You can make mine as your reference in making your project configuration.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/86f1213e4ce24e16406c80ce6a12db07/href">https://medium.com/media/86f1213e4ce24e16406c80ce6a12db07/href</a></iframe><h3>🎉 Summary</h3><p>There are several ways to avoid pbxproj file conflict. But for me, this is the best way and might be your answer to avoiding conflict and your worry when you want to merge.</p><p>Probably the hard part is when you want to set Build Setting or Build Phase , there will be a question in your head, “is it possible or not ?”. Take action to try will helps you. Good luck 👍🏻</p><h3>👋🏻 Closing</h3><p>Thank you! I hope this helps you. Please let me know if you have any trouble or any discussion about this. Never stop learning! 🔥</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e658443fee7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/play-with-xcodegen-to-avoid-pbxproj-file-conflicts-%EF%B8%8F-7e658443fee7">Playing with XcodeGen to avoid pbxproj file conflicts ⚠️</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Playing With Build Configuration in XCode to Separate Environment]]></title>
            <link>https://medium.com/swlh/playing-with-build-configuration-in-xcode-to-separate-environment-855d4397bcda?source=rss-dc3dfcb02ac8------2</link>
            <guid isPermaLink="false">https://medium.com/p/855d4397bcda</guid>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[environment]]></category>
            <category><![CDATA[staging]]></category>
            <category><![CDATA[production]]></category>
            <dc:creator><![CDATA[Arif Luthfiansyah]]></dc:creator>
            <pubDate>Sat, 12 Dec 2020 14:22:49 GMT</pubDate>
            <atom:updated>2020-12-14T16:18:07.869Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rQ1IdjBNluwaK3Jm4FN4uQ.png" /></figure><h3>🙂 Introduction</h3><p>Hi everyone, I hope you all are safe and healthy. This time I want to invite you to playing with Build Configuration in XCode to separate environment.</p><h3>🎯 Challenge</h3><p>So, maybe in your current project you are <strong>starting to need to separate which environment</strong> is for development, QA, staging or maybe production. If yes, you are playing on the correct ground.</p><h3>🏃🏻 Steps</h3><p><strong>First,</strong> open your project with XCode and then go to project navigator, select your project, and choose Info.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bfx1Dr6Ng1Sq1vvIufSNtQ.png" /><figcaption>Project Navigator &gt; Your Project &gt; Info</figcaption></figure><p><strong>Second,</strong> focus with the Configuration section and then <strong>let’s duplicate Debug and Release as many environments as you need in your project</strong>.</p><p><strong>Debug</strong> is a configuration that XCode use when you run in simulator or iPhone.</p><p><strong>Release</strong> is a configuration that XCode use when you want to export your app as an ipa file or publish to App Store Connect</p><p>So, for now, let’s create three environments, development, staging, and production.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hStNKtqtxMceQEDtbUBFpA.png" /><figcaption>Select Debug in Configurations section &gt; Tap +</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*5f6t8U8Ey7KEEky-lmWRYA.png" /><figcaption>Select Duplicate “Debug” Configuration</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s2d1CN72GYF0sawZ7gVQ_g.png" /><figcaption>Select Debug copy &gt; Rename to Dev Debug</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5wxwGx1vG9RcE0HYWiLyVQ.png" /><figcaption>Do repeatedly until your Configurations section looks like this</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b02BQJ23x1NpAUX6aaBrJg.png" /><figcaption>And if you go to your project Targets and Signing &amp; Capabilities. Your XCode will looks like this</figcaption></figure><p><strong>Third,</strong> let’s create scheme for each environment configuration that we have created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*9UtRZwTJm-Wna2H4hlpoxw.png" /><figcaption>Tap on the left of target device &gt; Select Manage Schemes</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PB5173YD2rtKl4itLfd9uA.png" /><figcaption>Choose a schema with the same name as your project name &gt; Add prefix Dev/STA/Prod</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KqXVjDZlRkjM_cgz3Jw4sw.png" /><figcaption>Do repeatedly until your schemes looks like this</figcaption></figure><p><strong>Fourth,</strong> we will edit each scheme that we have created in previous step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TuyqYrLoNbgz-xr3B_kJTA.png" /><figcaption>Select scheme that you want to edit &gt; Tap Edit button on the left bottom of XCode panel</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fUKSxKddv-DC2Gzt4tMVbQ.png" /><figcaption>Select Run &gt; Info &gt; Change Build Configuration to Dev Debug</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3GbroqfMRmDxSivfYFFwrA.png" /><figcaption>Select Test &gt; Info &gt; Change Build Configuration to Dev Debug</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SkPoIVZmj-YiS9O7ySAyUQ.png" /><figcaption>Select Profile &gt; Info &gt; Change Build Configuration to Dev Release</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AliPWrjYUoWF3nqMIIzUlg.png" /><figcaption>Select Analyze &gt; Change Build Configuration to Dev Debug</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FVfNz2Rx377l9UqOGO1l5g.png" /><figcaption>Select Archieve &gt; Change Build Configuration to Dev Release</figcaption></figure><p><strong>Run</strong> section is about your XCode will build and run the target on the selected device or simulator.</p><p><strong>Test</strong> section is about your XCode will build your target and run Unit and UI tests.</p><p><strong>Profile </strong>section is about your XCode will build and run your target on the selected device or simulator with an Instruments tool of your choosing (Leaks, Allocations, etc.). That’s why we need Debug for this Build Configuration.</p><p><strong>Analyze</strong> section is about your XCode will build your target using the static analyzer and let you know of certain types of bugs in your code. That’s why we need Debug for this Build Configuration.</p><p><strong>Archive</strong> section is about your XCode will build and make it your project as archive file or ipa file. That’s why we need Release for this Build Configuration.</p><p>That’s why we need Debug for Build Configuration in Run, Test, and Analyze sections. Also that’s why we need Release for Build Configuration in Profile and Archive sections.</p><p>References: <a href="https://stackoverflow.com/a/32767816">https://stackoverflow.com/a/32767816</a></p><p><strong>Fifth,</strong> this is the last step, yeay! We will add custom flag for Swift Compiler. So we can manage which code that we want to be executed for specific environment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z2B_jfKmOf-mB_1rcbeO3Q.png" /><figcaption>Project Navigator &gt; Select Target &gt; Build Settings &gt; Search for Swift Compiler &gt; Find Swift Compiler section</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZE3V1LyceEQ6jeQZPR0dmw.png" /><figcaption>Change each for configuration until your Swift Compiler looks like this</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uiDn4XKZTdS6MbAzQ3PUfA.png" /><figcaption>If you change your scheme to DEV then you will have to build your project, after that you will see the code in if statement with DEV is light up. That means the code inside the statement is executed.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KlUpWbgXSfYMOaBnCpqvRw.png" /><figcaption>If you change your scheme to STA then you will have to build your project, after that you will see the code in if statement with STA is light up. That means the code inside the statement is executed.</figcaption></figure><h3>⭐️ Conclusion</h3><p>When your project gets bigger and requires separation for each environment (development, staging, production) this method will be one of the solutions you can use.</p><h3>👋🏻 Closing</h3><p>Thank you! I hope this helps you. Please let me know if you have any trouble or any discussion about this. Never stop learning! 🔥</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=855d4397bcda" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/playing-with-build-configuration-in-xcode-to-separate-environment-855d4397bcda">Playing With Build Configuration in XCode to Separate Environment</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Playing with workspace. XCode multiple projects in one workspace]]></title>
            <link>https://lutluthfi.medium.com/playing-with-workspace-xcode-multiple-projects-in-one-workspace-ec4079fd114b?source=rss-dc3dfcb02ac8------2</link>
            <guid isPermaLink="false">https://medium.com/p/ec4079fd114b</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[xcworkspace]]></category>
            <category><![CDATA[xcodeproj]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[Arif Luthfiansyah]]></dc:creator>
            <pubDate>Mon, 25 May 2020 03:55:28 GMT</pubDate>
            <atom:updated>2020-12-12T14:21:44.302Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6VQUnm7tso2BK0WFyyIe8A.png" /></figure><h3>🙂 Introduction</h3><p>Hi everyone, I hope you all are safe and healthy. This time I want to share about my experiment of playing with workspace. Yes, it’s xcworkspace.</p><h3>🎯 Challenge</h3><p>So, here are some challenges for my experiment. I have <strong>one application</strong> that will be published in <strong>various countries</strong> with some different features. But also means there will be some same features.</p><h3>🏃🏻 Steps</h3><p><strong>First,</strong> define the structure directory. Here we try to design our structure directory will look this at the end.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*d2Qw3pW-6fL-ZN7Wbdhhfg.png" /><figcaption>Wrap all projects into one root directory</figcaption></figure><p><strong>Second,</strong> open XCode and create a new workspace. For me, I will name it with App.xcworkspace.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hMqmJXpidUrnlk88Pkos_A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*DtCgTQJUGtovUbqnTX7NnQ.png" /><figcaption>What your project directory will look like</figcaption></figure><p><strong>Third,</strong> you have empty xcworkspace and now we will add a new project. Yes, a new xcodeproject. You can press <strong>Shift+Command+N</strong> for access keyboard shortcut to create project.</p><blockquote>Set your Add to: and Group: field with your workspace</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0bruNZOkhpzioIjfVKoP-A.png" /><figcaption>What XCode will look like before hit create button</figcaption></figure><p>After you hit create button. Your project directory and XCode will look the following screenshot. Exellent! You have one project inside your workspace now.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9E7F_0Eb2TkM5VpGt9QuPQ.png" /><figcaption>What the project directory and XCode look like after hit create button</figcaption></figure><p><strong>Fourth,</strong> continue it for the other projects. In my case, I will add App-SG.xcodeproject and App-US.xcodeproject.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nParxAmIaCbtXyb2u5KLOg.png" /></figure><h3>⭐️ Conclusion</h3><p>Now we have 3 different projects in one xcworkspace. Next I will share how to add shared framework that we can use in each project.</p><h3>👋🏻 Closing</h3><p>Thank you! I hope this helps you. Please let me know if you have any trouble or any discussion about this. Never stop learning! 🔥</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec4079fd114b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>