<?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 Davit K. on Medium]]></title>
        <description><![CDATA[Stories by Davit K. on Medium]]></description>
        <link>https://medium.com/@davit.k?source=rss-835a78654239------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*l9MnS_oPMAHQQLDLIXZeXA.png</url>
            <title>Stories by Davit K. on Medium</title>
            <link>https://medium.com/@davit.k?source=rss-835a78654239------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 23:30:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@davit.k/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[iOS Security Code AutoFill]]></title>
            <link>https://medium.com/@davit.k/ios-security-code-autofill-609a003c6d1d?source=rss-835a78654239------2</link>
            <guid isPermaLink="false">https://medium.com/p/609a003c6d1d</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[Davit K.]]></dc:creator>
            <pubDate>Mon, 22 May 2023 11:02:37 GMT</pubDate>
            <atom:updated>2023-05-23T10:41:56.206Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/860/0*oII1i36PkRlHxvhN.png" /></figure><p>All you need to do to use this in your app is to set UITextField&#39;s input view’s textContentType property oneTimeCode.</p><pre>otpTextField.textContentType = .oneTimeCode</pre><p>The operating system has a feature that automatically detects verification codes from Messages. It looks for messages that contain the keywords “<strong>code</strong>” or “<strong>passcode</strong>” when the UITextContentType is set accordingly.</p><p>However, this functionality <strong>may not work</strong> if the message is in an unsupported language. The system has to detect the keyword “code” or “passcode” to autofill. In my situation, it only started working when the backend sent the verification message in English.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=609a003c6d1d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basics of SwiftLint]]></title>
            <link>https://medium.com/@davit.k/basics-of-swiftlint-41a5048a0961?source=rss-835a78654239------2</link>
            <guid isPermaLink="false">https://medium.com/p/41a5048a0961</guid>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[swiftlint]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <dc:creator><![CDATA[Davit K.]]></dc:creator>
            <pubDate>Thu, 02 Mar 2023 21:04:29 GMT</pubDate>
            <atom:updated>2023-03-02T21:04:29.452Z</atom:updated>
            <content:encoded><![CDATA[<p>In this short article i will explain how to disable, enable and add custom rules in SwiftLint. Check installation guide <a href="https://github.com/realm/SwiftLint#installation">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QBA4zOibpuc6Xmf9ZIj53w.png" /></figure><h3><strong>Usage:</strong></h3><p>After building you will see warnings. Xcode’s empty project already violates some rules.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0bfEAKCFqbfR1MTWvczgqQ.png" /></figure><p>First of all run swiftlint rules in the terminal to print a list of all available rules and their identifiers. Some of them are enabled by default and some of them don’t. <br>Let’s say we don’t want to keep getting a warnings on comments, we can change that rule. Open the terminal and run vim .swiftlint.yml (with dot in front, otherwise it wont work) and add this lines to the file:</p><pre>line_length:<br>    ignores_comments: true</pre><p>Press <strong>esc</strong>, type <strong>:qw </strong>and press enter. Now the linter doesn’t throw a warnings on comments. This rule is enabled by default and we can edit even more like this:</p><pre>line_length:<br>    warning: 150 // Throws warning if the line.count &gt; 150<br>    error: 200 // Xcode won&#39;t build the project<br>    ignores_function_declarations: true<br>    ignores_comments: true<br>    ignores_urls: true</pre><h3><strong>How to disable any rule</strong></h3><p>It’s pretty simple. Run vim .swiftlint.yml again and add <strong>disabled_rules</strong> section where you can put all the <a href="https://realm.github.io/SwiftLint/rule-directory.html">rule</a> identifiers you want to disable:</p><pre>disabled_rules: <br>- line_length<br>- another_rule1<br>- another_rule2</pre><h3>Creating custom rule</h3><p>Let’s say you want to see word ID uppercased, i.e. <strong>func</strong> <strong>userID() </strong>and not <strong>func</strong> <strong>userId()</strong> .In the vim .swiftlint.yml paste this lines:</p><pre>custom_rules:<br>  id_word: // 1<br>    name: &quot;Uppercase &#39;Id&#39;&quot; // 2<br>    regex: &quot;Id\\b&quot; // 3<br>    message: &quot;Using capitalized &#39;Id&#39; is not prefered, use uppercased &#39;ID&#39;&quot; // 4<br>    severity: error // 5</pre><h3>What it does:</h3><ol><li>Rule identifier</li><li>Rule name (optional)</li><li>Matching pattern</li><li>Message to show</li><li>Either warning or error (optional)</li></ol><blockquote>Note, this regex will work when word “Id” is at the end, i.e. <strong>userId()</strong>. If functions name is <strong>userIdentifier()</strong>, linter wont warn you.</blockquote><p>Also, if you want to disallow name which starts with a specific word, simply change regex to “\\bYOUR_WORD_HERE”.</p><pre>&quot;Id\\b&quot; // warn if name ends with &quot;Id&quot;<br>&quot;\\bId&quot; // warn if name starts with &quot;Id&quot;</pre><h3>Enable rule</h3><p>As i mentioned above, some rules are disabled by default. For example, “<a href="https://realm.github.io/SwiftLint/attributes.html">attributes</a>” rule. Right now this code is perfectly fine for linter.</p><pre>@discardableResult func someFunction() -&gt; String {<br>  return &quot;&quot;<br>}</pre><p>But we want the @discardableResult to be above function, like this:</p><pre>@discardableResult<br>func someFunction() -&gt; String {<br>  return &quot;&quot;<br>}</pre><p>To throw a warning we have to enable <strong>“attributes”</strong> rule. Open your custom configuration again and add this lines:</p><pre>opt_in_rules:<br>- attributes<br><br>attributes:<br>  always_on_line_above:<br>    [&quot;@discardableResult&quot;]</pre><p>Also, you can warn if “@objc” attribute is not on the same line.</p><pre>attributes:<br>  severity: error // or warning (optional)<br>  always_on_line_above:<br>    [&quot;@discardableResult&quot;]<br>  always_on_same_line:<br>    [&quot;@objc&quot;]</pre><p>Now Xcode throws errors as expected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h881J5zyQlCUMyxw46mKVw.png" /></figure><h3>SwiftLint examples</h3><ul><li><a href="https://github.com/mozilla-mobile/firefox-ios/blob/main/.swiftlint.yml">firefox-ios/.swiftlint.yml at main · mozilla-mobile/firefox-ios</a></li><li><a href="https://github.com/realm/realm-swift/blob/master/.swiftlint.yml">realm-swift/.swiftlint.yml at master · realm/realm-swift</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41a5048a0961" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Debugging tool you (probably) are not using]]></title>
            <link>https://medium.com/@davit.k/debugging-tool-you-probably-are-not-using-5c61ac7781aa?source=rss-835a78654239------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c61ac7781aa</guid>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[debugging]]></category>
            <dc:creator><![CDATA[Davit K.]]></dc:creator>
            <pubDate>Mon, 20 Feb 2023 19:28:52 GMT</pubDate>
            <atom:updated>2023-02-20T21:07:50.908Z</atom:updated>
            <content:encoded><![CDATA[<p>How many times are you printing something in the console? If the project you are working on takes a long time to compile “Print Debugging” can be quite slow. In this short article I want to show you how can you print without rebuilding your app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k-5azsDKdPMmGJUTkyY3kA.png" /></figure><p>First of all we will create a button which will load users. Nothing special.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pbJnIV_tzyxKtQQxyskN0A.png" /></figure><p>Let’s say you want to check if data exist. Normally you would write something like this:</p><pre>print(String(data: data!, encoding: .utf8))</pre><p>and it is fine. But after every new print you have to rebuild your project. And if it takes a long time… it’s a pain. But there is a better way. Double tap on the breakpoint right after completionHandler and you should see something like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hSTj6_T1FQWLmIhIIohgeg.png" /></figure><p>Then, press on the “Add Action” button and choose “Debugger command”. In the textfield just paste this:</p><pre>po String(data: data!, encoding: .utf8)</pre><p>If you enable the <strong>“Automatically continue after evaluating actions”</strong> checkbox Xcode will not stop at this breakpoint.</p><p>Run the app, tap on the button and you should see print in the console. The best part is there is no need to recompile the app when adding or editing your breakpoints.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgfycat.com%2Fifr%2Fmiserablecircularhoiho&amp;display_name=Gfycat&amp;url=https%3A%2F%2Fgfycat.com%2Fmiserablecircularhoiho&amp;image=https%3A%2F%2Fthumbs.gfycat.com%2FMiserableCircularHoiho-size_restricted.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=gfycat" width="2654" height="1662" frameborder="0" scrolling="no"><a href="https://medium.com/media/49581b50754b26684b79f3aba6f6fe07/href">https://medium.com/media/49581b50754b26684b79f3aba6f6fe07/href</a></iframe><h3>Using User Breakpoint on Textfields</h3><p>Another way to use custom breakpoints is to fill textfields. Let’s say you working on the app that requires to log in. Normally you’ll write your email and password, then click on the Sing Up button etc… Or your textfields will have a default text, something like this:</p><pre>emailTextField.text = &quot;test@email.com&quot;<br>paswordTextField.text = &quot;qwerty1&quot;</pre><p>With breakpoints we can automatically set values without changing any line of code. How it works. Let’s say we have simple login screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vARivrRO7X4ig0hTaK-RKA.png" /></figure><pre>class ViewController: UIViewController {<br>    <br>    let emailTextField = UITextField()<br>    let passwordTextField = UITextField()<br>    let loginButton = UIButton()<br>    <br>    override func viewDidLoad() {<br>        super.viewDidLoad()<br>        <br>        view.addSubview(emailTextField)<br>        view.addSubview(passwordTextField)<br>        view.addSubview(loginButton)<br>        <br>        emailTextField.frame = .init(x: 12, y: 120, width: view.bounds.width - 24, height: 42)<br>        emailTextField.placeholder = &quot;Email&quot;<br>        emailTextField.borderStyle = .roundedRect<br>        passwordTextField.frame = .init(x: 12, y: 170, width: view.bounds.width - 24, height: 42)<br>        passwordTextField.placeholder = &quot;Password&quot;<br>        passwordTextField.borderStyle = .roundedRect<br><br>        loginButton.frame = .init(x: 12, y: 230, width: view.bounds.width - 24, height: 42)<br>        loginButton.setTitle(&quot;Login&quot;, for: .normal)<br>        loginButton.backgroundColor = .systemBlue<br>        loginButton.layer.cornerRadius = 8<br>    }<br>}</pre><p>Create custom breakpoint before viewDidLoad() closing bracket, choose “Debugger Command” action and paste this line of code. Also enable <strong>“Automatically continue after evaluating actions” </strong>checkbox.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DbDoJE3z7za7dGN4TkOtxA.png" /></figure><pre>expr emailTextField.text = &quot;YOUREMAIL@gmail.com&quot;</pre><p>and… voila!! The beauty of breakpoints is you can press on your custom breakpoint, change email and</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgfycat.com%2Fifr%2Fopenmemorablecaimanlizard&amp;display_name=Gfycat&amp;url=https%3A%2F%2Fgfycat.com%2Fopenmemorablecaimanlizard&amp;image=https%3A%2F%2Fthumbs.gfycat.com%2FOpenMemorableCaimanlizard-size_restricted.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=gfycat" width="2616" height="1664" frameborder="0" scrolling="no"><a href="https://medium.com/media/0dbc606b370c6b5ba12572d0b5debb26/href">https://medium.com/media/0dbc606b370c6b5ba12572d0b5debb26/href</a></iframe><p>Of course, we want to add text for password textfield. Double tap on breakpoint, tap + and add default text for password textfield.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*Y8aiZQar5z9_xUN4weydnw.png" /></figure><p>Run the app. Your text fields are already set without having to change one line of code.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c61ac7781aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Useful Xcode shortcuts you should be using]]></title>
            <link>https://medium.com/@davit.k/useful-xcode-tips-shortcuts-you-should-be-using-e3cb153e7a46?source=rss-835a78654239------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3cb153e7a46</guid>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[Davit K.]]></dc:creator>
            <pubDate>Mon, 20 Feb 2023 10:37:39 GMT</pubDate>
            <atom:updated>2024-01-28T14:55:33.971Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a list of my most used shortcuts and can’t imagine working without them. If your only shortcut is <strong>Control ⌃</strong> + <strong>I </strong>for code formatting, well… this article is for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SockvF0Bqbx0vAvPdMr2TQ.png" /></figure><h4>1. Open quickly (⌘ + ⇧ + O)</h4><p>This shortcut is one of my the most used. In big projects with tons of folders and files sometimes it’s difficult to quickly find a file. But if you’re familiar with the project and already know the names you can quickly find with this shortcut.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fz5OTgm7czpxAC5kCVL%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fxcode-z5OTgm7czpxAC5kCVL&amp;image=https%3A%2F%2Fmedia1.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExMmF6d3gwODBmMWR5cGdzeXBibTN0bmIyaHpvNHg5OG4yc3R0NW53YiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2Fz5OTgm7czpxAC5kCVL%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="295" frameborder="0" scrolling="no"><a href="https://medium.com/media/980ecac19d7284d00814f287d6ae62e1/href">https://medium.com/media/980ecac19d7284d00814f287d6ae62e1/href</a></iframe><h4>2. Find current file (⌘ + ⇧ + J)</h4><p>In big projects sometimes it is difficult to find where your current file is located. This shortcut will show you the folder.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FqA2FBJFsV73MQxRnBb%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fxcode-qA2FBJFsV73MQxRnBb&amp;image=https%3A%2F%2Fmedia3.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExZ3U4dWh5MHZ1dWM5Mm1xNHJ0MHJ1aTM0N2p6Mnc4YW1jNm95ZjIyZCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2FqA2FBJFsV73MQxRnBb%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="481" frameborder="0" scrolling="no"><a href="https://medium.com/media/b8b4f76f5d3d78c6b9ac6823bf1a3f67/href">https://medium.com/media/b8b4f76f5d3d78c6b9ac6823bf1a3f67/href</a></iframe><h4>3. Quick rename (⌘ + ⌃ + E)</h4><p>This shortcut helps to rename a function or variable in all scope. Simply select and press the command.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F4QwMaRa5kxXc1sZNzQ%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fxcode-4QwMaRa5kxXc1sZNzQ&amp;image=https%3A%2F%2Fmedia4.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExczJsYnZzaWNnc290azJhNWtramNjc3FqZ2ZocXJ1OWJ5aThseG02aiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2F4QwMaRa5kxXc1sZNzQ%2F200.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="164" frameborder="0" scrolling="no"><a href="https://medium.com/media/0e966369393f5b41178af75fae99f9c7/href">https://medium.com/media/0e966369393f5b41178af75fae99f9c7/href</a></iframe><h4>4. Editing multiple lines (⌥)</h4><p>Press <strong>Option</strong> key and drag your cursor around.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgfycat.com%2Fifr%2Fspeedyshowyilladopsis&amp;display_name=Gfycat&amp;url=https%3A%2F%2Fgfycat.com%2Fspeedyshowyilladopsis&amp;image=https%3A%2F%2Fthumbs.gfycat.com%2FSpeedyShowyIlladopsis-size_restricted.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=gfycat" width="1348" height="506" frameborder="0" scrolling="no"><a href="https://medium.com/media/95fe416e19a4c07ba7116a136ee51885/href">https://medium.com/media/95fe416e19a4c07ba7116a136ee51885/href</a></iframe><p>Also you can edit multiple lines as if you editing a single line with <strong>Shift ⇧, Command ⌘</strong> and arrow (← and →) keys.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgfycat.com%2Fifr%2Fsmoothwellwornbarracuda&amp;display_name=Gfycat&amp;url=https%3A%2F%2Fgfycat.com%2Fsmoothwellwornbarracuda&amp;image=https%3A%2F%2Fthumbs.gfycat.com%2FSmoothWellwornBarracuda-size_restricted.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=gfycat" width="984" height="730" frameborder="0" scrolling="no"><a href="https://medium.com/media/d160e650b7387dc9d9d80b494e0f45ba/href">https://medium.com/media/d160e650b7387dc9d9d80b494e0f45ba/href</a></iframe><h4>5. Creating code snippets</h4><p>How many times you have written layout code? Add view, turn of the <strong><em>translatesAutoresizingMaskIntoConstraints</em></strong>, activate constraints… Well, with code snippets you’ll save a lot of time.</p><p><strong>How to create?</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgfycat.com%2Fifr%2Fbetterwarmheartedkissingbug&amp;display_name=Gfycat&amp;url=https%3A%2F%2Fgfycat.com%2Fbetterwarmheartedkissingbug&amp;image=https%3A%2F%2Fthumbs.gfycat.com%2FBetterWarmheartedKissingbug-size_restricted.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=gfycat" width="1522" height="1052" frameborder="0" scrolling="no"><a href="https://medium.com/media/062c33b7647a85001335075e9d9cd600/href">https://medium.com/media/062c33b7647a85001335075e9d9cd600/href</a></iframe><p>To create a custom code snippet you should type <strong>&lt;# </strong>and <strong>#&gt; </strong>with a placeholder in the middle or without, it’s up to you.<strong> </strong>Basically, this is how it looks in code:</p><pre>class &lt;#Name#&gt;: &lt;#Class#&gt; { }</pre><p>It is also important to add a completion which triggers autocompletion. In this case i choose ‘snap’.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oq_t9hBWzFvgoRQK55w1Uw.png" /></figure><p>Here is my code snippet to quickly add constraints</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgfycat.com%2Fifr%2Fsoulfulhorriblegyrfalcon&amp;display_name=Gfycat&amp;url=https%3A%2F%2Fgfycat.com%2Fsoulfulhorriblegyrfalcon&amp;image=https%3A%2F%2Fthumbs.gfycat.com%2FSoulfulHorribleGyrfalcon-size_restricted.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=gfycat" width="1430" height="828" frameborder="0" scrolling="no"><a href="https://medium.com/media/6ca086d51996c654824e24fad02caf9d/href">https://medium.com/media/6ca086d51996c654824e24fad02caf9d/href</a></iframe><h4>6. Quickly move code up or down</h4><p>Select and press <strong>⌥ (option) + ⌘ (command) + [</strong> to move up <strong>] </strong>to move down.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgfycat.com%2Fifr%2Fglamorouslightheartedamericankestrel&amp;display_name=Gfycat&amp;url=https%3A%2F%2Fgfycat.com%2Fglamorouslightheartedamericankestrel&amp;image=https%3A%2F%2Fthumbs.gfycat.com%2FGlamorousLightheartedAmericankestrel-size_restricted.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=gfycat" width="1958" height="768" frameborder="0" scrolling="no"><a href="https://medium.com/media/acb5b05916b46a3275db39d7ab83a8be/href">https://medium.com/media/acb5b05916b46a3275db39d7ab83a8be/href</a></iframe><h4>6. Adding documentation</h4><p>Simply put cursor on name or method and press <strong>⌥ (option) + ⌘ (command) + /</strong>.</p><p>Those are simple shortcuts and tips which many developers somehow don’t use. There are other many shortcuts, but those are my all time favorites so far.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3cb153e7a46" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Command failed with a nonzero exit code.]]></title>
            <link>https://medium.com/@davit.k/command-failed-with-a-nonzero-exit-code-7d2fca0172f0?source=rss-835a78654239------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d2fca0172f0</guid>
            <category><![CDATA[cocoapods]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[pods]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[Davit K.]]></dc:creator>
            <pubDate>Thu, 06 Oct 2022 08:43:06 GMT</pubDate>
            <atom:updated>2022-10-07T21:04:43.482Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*ZXFYFdNScr6yCf_PMI5x3g.png" /></figure><p>So, I had this problem with pods which took a couple of days to fix. Project was old and the iOS target was changed from 9.0 to 12.0. In my case the problem was in the podfile.</p><p>In terminal change directory to your project and copy paste this lines:</p><ol><li>rm -rf ~/Library/Caches/CocoaPods.</li><li>rm -rf Pods.</li><li>rm -rf ~/Library/Developer/Xcode/DerivedData/*</li><li>pod deintegrate.</li><li>pod setup.</li><li>pod install.</li></ol><p>What this does is it <strong>reinstalls podfile</strong> and also <strong>removes caches</strong>. This should help you, but in my case it did nothing. So i did the same thing but this time after removing <strong>DerivedData </strong>i restarted my mac, which helped. I think the problem is that mac is caching everything and restarting sometimes can be helpful.</p><p>After those steps I pressed Run the project and still got that error (see in picture). I did the same thing but nothing changed. The problem was in the PageControl and this time i got this error <strong>“‘kCAFillRuleEvenOld’ was obsoleted in swift 3”</strong>. This is unusual and shouldn’t be here. In the Pods target I found the <strong>PageControl </strong>target and checked <strong>Swift Language Version</strong> (PageControl / Build Settings / Swift Compiler — Language), which was “<em>Swift 5”</em>. Changed to “<em>Swift 4</em>” and all errors disappeared (there were 8–10 same errors from different pods). After a while I had to install a new pod and after pod install this same error popped up. Turned out, after <strong>pod install</strong> “Swift Language Version” for <strong>PageControl</strong> was changed to “<em>Swift 5</em>”. Changed to “<em>Swift 4</em>” and voila… fixed. Took me a couple of days struggling.</p><p>Hope this helps. Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d2fca0172f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>