<?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 Alexander on Medium]]></title>
        <description><![CDATA[Stories by Alexander on Medium]]></description>
        <link>https://medium.com/@ziminalex?source=rss-8dc52e10399a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4jALTSBokXEkKsgHb5X__Q.jpeg</url>
            <title>Stories by Alexander on Medium</title>
            <link>https://medium.com/@ziminalex?source=rss-8dc52e10399a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 06:31:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ziminalex/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[Split Testing (A/B Testing) with Swift]]></title>
            <link>https://medium.com/bumble-tech/split-testing-a-b-testing-with-swift-7a590a5a3d89?source=rss-8dc52e10399a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a590a5a3d89</guid>
            <category><![CDATA[a-b-testing]]></category>
            <category><![CDATA[ab-testing]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[split-testing]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Alexander]]></dc:creator>
            <pubDate>Wed, 04 Jul 2018 09:50:48 GMT</pubDate>
            <atom:updated>2018-07-04T09:54:15.196Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JvJwlrAezVt9v7gP_sePPw.png" /></figure><p>Nowadays there are a million apps that solve users’ needs, so it is becoming hard to create something new or be better than market competitors. This has led to a situation where a lot of companies and startups are running experiments to find out which features are actually improving their product and which they should throw away.</p><p>One of the main tools to run such experiments is Split Testing (or A/B Testing), and so this article will cover this instrument and gives an example how to carry out a Swifty implementation.</p><blockquote>The whole demo project is available via this link: <a href="https://github.com/azimin/SplitTestingArticle">https://github.com/azimin/SplitTestingArticle</a></blockquote><p>If you already know what A/B Testing is, you can jump into the <a href="#a7d4">code part</a>.</p><h3>A brief introduction to Split Testing</h3><p>Split Testing or A/B Testing (which is less applicable in my opinion because usually you have more than 2 groups) is an instrument to check different versions of something in different user groups to find out which version performs better.</p><p>You can read about them in Wikipedia (<a href="https://en.wikipedia.org/wiki/A/B_testing">https://en.wikipedia.org/wiki/A/B_testing</a>) or check this article with real examples: <a href="https://vwo.com/ab-testing/">https://vwo.com/ab-testing/</a>.</p><p>Here in Badoo, we have a lot of Split Tests running simultaneously, an example of which could be the appearance of the Own Profile tab.</p><p>One day, we decided that the profile looks a little bit outdated, and also we wanted to improve the engagement of some actions. So we run the Split Test with 3 groups:</p><ol><li>Old profile</li><li>New profile v1</li><li>New profile v2</li></ol><p>As you see, there are 3 options, so this test is more like A/B/C (and that’s why I prefer the term Split Testing vs A/B Testing).</p><p>This is how different users saw their profile:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dXhEqXSEdICc5yXr3MvpIA.png" /></figure><p>From the Product Manager console, it was 4 groups of users, distributed randomly and having equal size as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LIzGeNRb36XgL6IUthehvQ.png" /></figure><p>You might ask, why do we have <strong>control</strong> and <strong>control_check </strong>(if control_check is the duplicate of control) here?</p><p>The answer is easy: any change impacts a lot of metrics, so you are never 100% sure if this change appears because of the split test or because of something else.</p><p>If you think that some metrics have changed because of the split test, you should double check that everything it is the same inside the <strong>control</strong> and <strong>control_check</strong> groups.</p><p>As you see… opinions might differ, but empirical evidence exists as a living proof; it is the responsibility of the product team to analyse the results and understand why one variant is better than another one.</p><h3>Implementing Split Testing for your pet projects using Swift</h3><p>Our goal:</p><ol><li>Make a client side framework (w/o external server)</li><li>Save the “user split” test group in persistent storage after the user group has been selected</li><li>Report the “user split” test group to analytics service</li><li>Make everything as Swifty as possible, so that the creation of new split tests won’t take more than 1 minute</li></ol><blockquote>P.S. Having a client side Split Testing framework brings both pros and cons. The main <strong>pros</strong> are that you shouldn’t need to have a server infrastructure or a server itself, but the <strong>cons </strong>are that if an experiment is a total mess, you can’t roll it back without uploading a new version to the App Store.</blockquote><p>How we will do it:</p><ol><li>During execution, the group of the experiment will be assigned randomly with the same chances.</li><li>Our split testing service will take any persistent storage (like UserDefaults, Realm, SQLite or Core Data) as a dependency and save the assigned group value there.</li><li>Our split testing service will take any analytics SDK (like Amplitude or FB Analytics) as a dependency and log the current group when the user encounters a split test.</li></ol><p>So let’s start:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tk5NBKyuTJTQ2aJntovNvw.png" /><figcaption>This is what we are going to build.</figcaption></figure><p>We will have multiple split tests that will be represented by <strong>SplitTestProtocol</strong>, and every split test will have multiple groups (versions) that will be represented by <strong>SplitTestGroupProtocol</strong>. The Split Test will have the ability to hit (send to analytics) the current group, and so it will have <strong>AnalyticsProtocol </strong>as a dependency.</p><p>To fetch/generate<em>/</em>manage all split tests we will have <strong>SplitTestingService</strong>, because it will load the split test group from a memory that will depend on <strong>StorageProtocol</strong>, and also it will pass the <strong>AnalyticsProtocol </strong>dependency to the <strong>SplitTestProtocol</strong>.</p><p>Let’s write a code starting from <strong>AnalyticsProtocol </strong>and <strong>StorageProtocol </strong>dependencies:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9156737e10ed03a6cd877187eb2219a0/href">https://medium.com/media/9156737e10ed03a6cd877187eb2219a0/href</a></iframe><p>The role of analytics is to log the event once, for example: log that user <strong>A </strong>is<strong> </strong>now inside group <strong>blue </strong>for <strong>button_color </strong>split test when he sees a screen with this button.</p><p>The role of storage is to save the value of the current user’s group after <strong>SplitTestingService </strong>has generated this group and read it every time it accesses it from code.</p><p>So let’s look at <strong>SplitTestGroupProtocol</strong>, and how it would represent groups.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6cba40f4d5bada85a9723ecf722f8d3d/href">https://medium.com/media/6cba40f4d5bada85a9723ecf722f8d3d/href</a></iframe><p>It is RawRepresentable where RawValue is String, and so it will be possible to create the group from string or convert it back to string (useful for analytics and storage). Also <strong>SplitTestGroupProtocol </strong>contains a testGroups array, so it will be able to tell which groups it contains (and will be used to generate random groups).</p><p>Then let’s prototype the base for <strong>SplitTestProtocol</strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7a29da37931ce7928556904fce6275aa/href">https://medium.com/media/7a29da37931ce7928556904fce6275aa/href</a></iframe><p><strong>SplitTestProtocol </strong>will contain:</p><ol><li>A<em> GroupType </em>that will implement <strong>SplitTestGroupProtocol</strong> protocol to represent the split test group type</li><li>A String <em>identifier </em>for analytics and storage keys</li><li>A value of <em>currentGroup </em>for specific instance of the <strong>SplitTestProtocol</strong></li><li>A dependency of <em>analytics </em>for the <em>hitSplitTest </em>method</li><li>And a <em>hitSplitTest </em>method that will report to analytics that the user saw a split test result</li></ol><p>⚠️ <strong>The hit split test method is very important to be sure that users are not just in a split test group, but also that the result of your split test has been seen. Marking the user as “saw_red_button_on_purcahse_screen” if he or she never visited the purchase screen would skew the results.</strong></p><p>Now we are ready for <strong>SplitTestingService</strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b2347b6b5c740d41a29009c36375495d/href">https://medium.com/media/b2347b6b5c740d41a29009c36375495d/href</a></iframe><blockquote>P.S. In this class we are using the Int.random function taken from <a href="https://stackoverflow.com/questions/25050309/swift-random-float-between-0-and-1">https://stackoverflow.com/questions/25050309/swift-random-float-between-0-and-1</a>, but in Swift 4.2 it would be by default.</blockquote><p>This class contains 1 public method <em>fetchSplitTest </em>and 3 private methods <em>saveGroup</em>, <em>getGroup</em>,<em>randomGroup</em>.</p><p>The aim of randomGroup is to generate a random split test group for the current split test class, while getGroup and saveGroup will load split test instance with the specific group for the current user or save it to persistent storage for future usage.</p><p>The main and public function of this class is fetchSplitTest: it’s trying to return the current split test group from the persistent store, but if can’t — it will generate a new one and save it, before returning back.</p><p>Now we are ready, let’s create our first split test:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d461923a6c6582fec802cba1fc453992/href">https://medium.com/media/d461923a6c6582fec802cba1fc453992/href</a></iframe><p>It looks big, but don’t worry: after you implement<strong> SplitTestProtocol </strong>by your class<strong> </strong>— all necessary properties will be requested to be implemented by compiler.</p><p>The important part here is the <em>enum Group </em>where you should put all your groups (in this example it’s red, blue and darkGray), and here we are defining the string to be sure how it will be reported to analytics.</p><p>Also we have <em>extension ButtonColorSplitTest.Group </em>to use all the sweet Swift syntax.</p><p>Now let’s create objects for <strong>AnalyticsProtocol </strong>and <strong>StorageProtocol</strong>:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/aab7ab28b9fe779d9454f4673f90ac41/href">https://medium.com/media/aab7ab28b9fe779d9454f4673f90ac41/href</a></iframe><p>We will use UserDefaults for <strong>StorageProtocol</strong>, because it’s easy to implement, but in your projects, you can use any other persistent storage.</p><p>For this example I will create a dummy analytics class, but in your project you can use real analytics. Personally I recommend Amplitude (<a href="https://amplitude.com/">https://amplitude.com</a>).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a1374a4dfd0d6ef440bab5355c762851/href">https://medium.com/media/a1374a4dfd0d6ef440bab5355c762851/href</a></iframe><p>Now we are ready to use our split test:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bc0b8341debaf21cebd7420cd5e54e8a/href">https://medium.com/media/bc0b8341debaf21cebd7420cd5e54e8a/href</a></iframe><p>We are just creating its instance, fetching the split test and using it. Generics give us the ability to do buttonSplitTest.currentGroup.color.</p><p>During the first usage, you can see something like this <strong>Log once value: split_test-button_color for key: dark_gray </strong>and if you don’t delete the app from the device — the button will be the same on every launch.</p><p>Implementation process took some time, but after it every new SplitTest inside your project will take 1–2 minutes to create.</p><p>Here is an example of how this engine was used for a real app:</p><p>In analytics we segmented users according to different difficulty coefficients and how probable it is that the user will buy game currency.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h2Mwc3HvQt3WTwr0ThE_CQ.png" /></figure><p>So people who haven’t faced this coefficient (none) seemingly don’t play at all and don’t buy anything (which is logical), and this is why it’s important to hit split test when users really do face your test.</p><p>With no coefficient, just 2% of people bought currency. With the small coefficient 3% of people bought currency. And with the big difficulty coefficient, 4% bought currency.</p><p>So, if I enable the big coefficient for everyone, I can increase my profit :)</p><p>If you are interested in analysing results I recommend you check this tool: <a href="https://www.evanmiller.org/ab-testing/">https://www.evanmiller.org/ab-testing/</a>.</p><p>Thanks to my awesome team for helping me with this article (especially Igor, Kelly and Jairo).</p><blockquote>The whole demo project is available via this link: <a href="https://github.com/azimin/SplitTestingArticle">https://github.com/azimin/SplitTestingArticle</a></blockquote><p>Thank you for your attention!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*ZSc_5IoXKaJ7-RWx3Ccc8g.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a590a5a3d89" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bumble-tech/split-testing-a-b-testing-with-swift-7a590a5a3d89">Split Testing (A/B Testing) with Swift</a> was originally published in <a href="https://medium.com/bumble-tech">Bumble Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Как сменить страну и не заметить этого: история разработчика в Англии]]></title>
            <link>https://medium.com/@ziminalex/%D0%BA%D0%B0%D0%BA-%D1%81%D0%BC%D0%B5%D0%BD%D0%B8%D1%82%D1%8C-%D1%81%D1%82%D1%80%D0%B0%D0%BD%D1%83-%D0%B8-%D0%BD%D0%B5-%D0%B7%D0%B0%D0%BC%D0%B5%D1%82%D0%B8%D1%82%D1%8C-%D1%8D%D1%82%D0%BE%D0%B3%D0%BE-%D0%B8%D1%81%D1%82%D0%BE%D1%80%D0%B8%D1%8F-%D1%80%D0%B0%D0%B7%D1%80%D0%B0%D0%B1%D0%BE%D1%82%D1%87%D0%B8%D0%BA%D0%B0-%D0%B2-%D0%B0%D0%BD%D0%B3%D0%BB%D0%B8%D0%B8-99182a7b8242?source=rss-8dc52e10399a------2</link>
            <guid isPermaLink="false">https://medium.com/p/99182a7b8242</guid>
            <category><![CDATA[работа-за-границей]]></category>
            <category><![CDATA[работа]]></category>
            <category><![CDATA[badoo]]></category>
            <category><![CDATA[переезд]]></category>
            <category><![CDATA[лондон]]></category>
            <dc:creator><![CDATA[Alexander]]></dc:creator>
            <pubDate>Wed, 18 Apr 2018 18:50:37 GMT</pubDate>
            <atom:updated>2018-04-18T18:50:57.848Z</atom:updated>
            <content:encoded><![CDATA[<p>👋 Всем привет! Уже как 7 месяцев назад я переехал жить из Москвы в Лондон, пришло время подвести первые итоги.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bvYZ61d_LAr4RkdBw8MQzw.jpeg" /><figcaption>Seven Sister Cliffs, Sussex</figcaption></figure><h3>Основные плюсы и минусы</h3><p>Плюсы Лондона перед Москвой:</p><ol><li>Климат куда приятнее, особенно зимой</li><li>Можно (и нужно) каждые выходные ездить либо по Англии, либо в Европу. Мест красивых и интересных очень много, и все они доступны. Это могут быть фьорды, парки аттракционов, хайкинг, серфинг (как ни странно, даже он тут есть) и т.д.</li><li>Здесь куда больше досуга: множество концертов, действительно интересных выставок, мюзиклы, а каждому празднику тут уделено максимум внимания (например, рождество начинают праздновать вообще за 1.5 месяца, а во время Хеллоуина устраивают полноценные шоу).</li><li>В Лондоне личное пространство и человеческие права уважают куда больше — не могу предположить, что кто-то на улице мне ударит по лицу (а в Москве было пару раз, привет новый год 2017).</li></ol><p>Минусы Лондона перед Москвой:</p><ol><li>Очень пассивное сообщество разработчиков. Даже на разных мероприятиях люди общаются на самые поверхностные темы и довольно лениво. Ни о каких стартапах в среде разработчиков речи и не идет, всех устраивает их постоянная работа.</li><li>Тут куда больше бюрократии — те же банки лет на 15 отстают от России.</li><li>Система контрактов, которые обычно подписываются на год, сдерживает тебя на месте (внутри одного оператора, банка или квартиры), и прервать их обходится довольно дорого. Получается, ты привязан к городу минимум на год или заплати ~4000 фунтов (так бы было в моем случае).</li></ol><h3>Переезд</h3><blockquote>Сразу после переезда я очень долго сражался с бюрократией.</blockquote><p>Зарегистрировался в полиции (пришлось несколько раз ездить в другую честь города).</p><p>Нашёл жильё (был очень долгий процесс, подробно я его уже описывал тут: <a href="http://telegra.ph/Moj-poisk-zhilya-v-Londone-10-15).">http://telegra.ph/Moj-poisk-zhilya-v-Londone-10-15).</a></p><p>Открыл счет в банке (отдельный ад, требовал предварительной записи за 1.5 недели, еще и карточку с паролем отправляют по почте — это еще плюс неделя).</p><blockquote>С эмоциональной точки зрения переезд дался очень просто: на самом деле я даже не заметил, что сменил страну.</blockquote><p>На это несколько причин:</p><ol><li>Я переехал работать в Badoo, в компанию, где очень сильное русскоговорящее сообщество и все нацелено на то, чтобы улучшить твой опыт пребывания в ней.</li><li>Первое время я работал до 10–11 вечера из-за желания изучить проект, поэтому не было времени отвлекаться на переживания. Уже через пару месяцев я завел много знакомых, построил свой досуг, и теперь выбираю чем же заняться из множества вариантов.</li></ol><blockquote>Интересным наблюдением было то, что я был активным игроком в PS4 в Москве, поэтому тут сразу купил PS4 Pro и PS VR. В итоге, за последние 2–3 месяца я запускал консоль 2–3 раза :D</blockquote><p>Пока в Москву я летал 2 раза: в ноябре и декабре. Сложно сказать, когда собираюсь в следующий раз, очень много амбициозных планов. Но постараюсь добраться летом на какую нибудь конференцию или митап, если пригласят.</p><p>Еще я заметил, что спустя пару месяцев после переезда я стал слушать чуть больше музыки русских исполнителей, и у меня иногда появляется желание посмотреть советские фильмы или мультфильмы.</p><h3>Мой досуг</h3><p>В Лондоне очень сильно поменялся мой досуг. Приведу сравнение того, что я постоянно делал в Москве последний год:</p><ol><li>Играл в PS4</li><li>Участвовал или организовывал митапы и конференции</li><li>Ходил в кино</li><li>Программировал свои небольшие проекты на iOS</li><li>Обсуждал с близкими друзьями интересные темы про жизнь, код, бизнес и саморазвитие</li></ol><p>А вот что я постоянно делаю в Лондоне:</p><ol><li>Хожу на работу</li><li>Занимаюсь спортом</li><li>Читаю книги</li><li>Прохожу онлайн курсы</li><li>Путешествую на выходных</li><li>Обсуждаю с новыми знакомыми интересные темы</li></ol><p>Вообще, например, с кино интересная вещь. Когда я переехал сюда, я оформил годовую подписку на безлимитную карту (20 фунтов в месяц, что равно 1500 рублям), по моим подсчетам, если бы я продолжил ходить в кино как в Москве, то тратил бы без карты в районе 125 фунтов в месяц. А в итоге выходит, что я эту карту держу себе в минус, но контракт закончится только через 5 месяцев.</p><p>Спорт требует отдельного внимания, потому что, кроме зала, я почти всегда добираюсь до работы и до дома на велосипеде, климат очень располагает. Но, когда температуры падают ниже 4 градусов по Цельсию, я пересаживаюсь на метро/автобусы, благо такое бывает тут не так часто.</p><p>Если говорить про путешествия, то за 15–20 фунтов вы можете доехать на поезде в любую точку в радиусе 250 км от Лондона (т.е. это все южное побережье с его клифами), если же вы хотите поехать куда-то вглубь Англии, то можно арендовать машину или поехать с тем, у кого она есть. Во втором случае даже с ночевкой в отеле будет не сильно дороже, чем просто выходные в Лондоне. Если же лететь в Европу, то билеты выходят в районе 40–100 фунтов (в зависимости от дат и страны), что тоже не сильно дороже обычных выходных в Лондоне :D</p><p>В Лондоне все время проходят тематические события и эвенты, о некоторых я уже писал в своем телеграм канале: <a href="https://t.me/to_london">https://t.me/to_london</a></p><p>Вообще, в Лондоне сложно заскучать: все время что-то происходит, иногда даже приходится отказываться от чего-то действительно интересного, чтобы поделать полезные дела в выходные. И я не помню, чтобы в Москве у меня стоял такой выбор.</p><h3>Деньги</h3><p>Если говорить про налоги, то тут они прогрессивные, можно как ничего и не заплатить (если заработать &lt; 800.000 рублей за год), так отдать 40% государству, при хорошей зарплате. Вот пример калькулятора налогов: <a href="https://www.moneysavingexpert.com/tax-calculator/">https://www.moneysavingexpert.com/tax-calculator/.</a></p><blockquote>Ещё с тех пор, как я переехал сюда, мне очень часто пишут рекрутеры с адекватными предложениями на LinkedIn (иногда по раза 3 за неделю).</blockquote><p>Как я понял, зарплата iOS разработчика варьируется от 60.000£ в год до 110.000£ (если вы пойдёте на роль лида, например).</p><p>А вообще мне с работой очень повезло, и з/п хорошая, и много бонусов (например, кормят по 4 раза на дню широким ассортиментом из блюд), и атмосфера привычная, и свобода с выбором задач.</p><h3>Итог</h3><p>Переезд в Лондон одно из лучших (если не лучшее) решение в моей жизни, не скажу, что всем, но 90% своим знакомым IT-шникам в России я бы посоветовал сделать такой шаг.</p><blockquote>Это решение позволило мне пересмотреть приоритеты, заняться собой, начать активнее путешествовать и развиваться.</blockquote><p>Я не знаю, на сколько долго я задержусь в Лондоне, но пока я не хотел бы останавливаться или возвращаться к тому, что было, поэтому постараюсь взять максимум от моего экспириенса.</p><p>Всем спасибо за прочтение, я всегда готов ответить на любые вопросы в своем телеграм <a href="https://t.me/azimin!">https://t.me/azimin!</a></p><h4>P.S.</h4><p>В этой заметке я не писал подробно про свою работу в Badoo и карьеру, они достойны отдельного обзора, и я как нибудь напишу его, обещаю :)</p><p>Также я не стал обозревать Лондон, на него и так есть миллион статей, как говорится:</p><blockquote>“When a man is tired of London, he is tired of life“</blockquote><p>Потому что в Лондоне можно найти все.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99182a7b8242" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advanced WWDC 2017 Guide]]></title>
            <link>https://medium.com/bumble-tech/advanced-wwdc-2017-guide-b6278ba0c94b?source=rss-8dc52e10399a------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6278ba0c94b</guid>
            <category><![CDATA[wwdc]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[developer]]></category>
            <dc:creator><![CDATA[Alexander]]></dc:creator>
            <pubDate>Thu, 13 Jul 2017 13:23:53 GMT</pubDate>
            <atom:updated>2017-07-13T13:23:53.110Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wVIZJLzQEKI2Lgx8O-_9NA.png" /><figcaption>Watching WWDC</figcaption></figure><p>Hello everyone! There are <strong>more than 120 sessions</strong> from WWDC, do you know which one to watch? Get instruction on how to watch and check out some short reviews about the talks. Stick with me and I would like to share my thoughts on the WWDC developers conference. This post should be helpful not only for those who have simply heard about this event, but also for those who have already had a chance to watch some of the sessions. There is a lot of material, so I would advise you to focus your attention on what is of most interest to you.</p><ol><li><a href="#1564">What is WWDC</a>?</li><li><a href="#acef">The main points of WWDC 2017</a>.</li><li><a href="#c63e">When, why and how to watch the WWDC sessions</a>.</li><li><a href="#1eea">Sessions worth watching for every developer</a>.</li></ol><p>Let’s go!</p><h3><strong>What is WWDC?</strong></h3><p><strong><em>NB</em></strong><em> </em>If you already know about what’s new at WWDC 2017, you can move on <a href="#c63e">to the description of how to view sessions</a> or <a href="#1eea">to my personal rating of them.</a></p><p>The WWDC is a worldwide conference for developers on Apple platforms. It has been held since 1983 and recordings of some past talks are easy to find on the internet.</p><p>For example, here is a Virtual Reality session from WWDC 1995: <a href="https://www.youtube.com/watch?v=6XEDlgtLmAs">https://www.youtube.com/watch?v=6XEDlgtLmAs</a>.</p><p>Apple brings about 1000 of its engineers to WWDC to answer developers’ questions and to hold lots of sessions in which they tell you about what’s new in software. These are the sessions I am going to talk about below.</p><p>I am thinking you know all this already, so let’s move on to the main points this year.</p><h3>WWDC 2017</h3><p>The main things that are new at WWDC are demonstrated during the <a href="https://developer.apple.com/videos/play/wwdc2017/102/">Platforms State of the Union</a> session. This year there were quite a lot of them. I will tell you about the most interesting ones.</p><ul><li>It all began with a demonstration of Playground on the iPad. At Apple they really want you to teach your children to program, especially using their platforms. <a href="https://www.apple.com/newsroom/2017/06/swift-playgrounds-expands-coding-education-to-robots-drones-and-musical-instruments/">You can even program robots using the iPad</a>.</li><li>iOS 11 now only supports 64-bit devices, and applications compiled exclusively for 32-bit architecture cannot be launched.</li><li>Apple has vastly upgraded Xcode (in my view this is its most productive year):</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*MA9TSSpvjuz_ZvASlzuBDQ@2x.png" /><figcaption>New Source Editor</figcaption></figure><ol><li>Source Editor, written in pure Swift, has been <a href="https://twitter.com/stroughtonsmith/status/873200831612547076">ported</a> from Playground onto the iPad. It is very advanced now (for example, it supports refactoring in Swift). They have promised to make it possible to add one’s own transformations.</li><li>Markdown Editor inside Xcode.</li><li>Over 300 new checks and rules for the compiler and analyser.</li><li>Speaking about Xcode performance: they have speeded up the file-opening by 3. And now 60 fps when scrolling through lines of code and now jump-to-line action is 50 times faster.</li><li>The new Indexer is now able to index and build at the same time. Fast Open (⌘ + ⇧ + O) works 35 times faster and Project Search (⌘ + ⇧ + F) up to 50 times faster inside large projects.</li><li>The new Build System is written entirely in Swift. They are promising to speed up the build of large projects to make them 2.5 times faster.</li><li>The new Source Control (apparently not in Swift), integration with GitHub and a whole new tab with various functions (branches, tags etc.).</li><li>Now when moving a file to the folder inside Xcode the system automatically moves this file into the right folder in your Finder (we lived to see this! 🎉🎉).</li><li><a href="https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/debugging_with_xcode/chapters/special_debugging_workflows.html">View Hierarchy Debugger</a> now for SpriteKit and SceneKit.</li><li><a href="https://developer.apple.com/videos/play/wwdc2016/412/">Runtime Analysis</a>, which was presented in Xcode a year ago, now has two new types of sanitiser: Main Thread API Checker (for example, a potential UI call not from the main thread 😱) and Undefined Behaviour Sanitizer (for example, signed integers overflows).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1kLl4rrGHslOa88CyjL2hg.png" /><figcaption>Runtime Analysis inside Xcode 9</figcaption></figure><ul><li>The new Swift version, with painless migration process. Also, Swift 3.2 and Swift 4 will work together (via a single toolchain). All the main features can be viewed here: <a href="https://github.com/ole/whats-new-in-swift-4">https://github.com/ole/whats-new-in-swift-4</a>. They are promising to speed up build projects which have mix-and-match of Swift and Objective-C by 40%. And, what’s more, to speed up by a factor of 2 build modules which have <a href="https://swift.org/blog/whole-module-optimizations/">Whole Module Optimization</a>.</li><li>Important changes were also presented in respect of testing:</li></ul><ol><li><a href="https://medium.com/xcblog/xcode9-xcode-server-comprehensive-ios-continuous-integration-3613a7973b48">Advanced CI with Xcode Server</a>.</li><li>Several applications within a single UI tests session (convenient for testing those deep links), and they are promising to speed up elements query tenfold.</li><li>Remote debugging via Wi-Fi.</li></ol><ul><li>Drag and Drop API with a focus on the iPad. You can see how it works here: <a href="https://www.youtube.com/watch?v=F-QA-qAEMBw">https://www.youtube.com/watch?v=F-QA-qAEMBw</a>. There are a lot of sessions devoted to this API, but it is not relevant to everyone, so I won’t spend a long time on it.</li><li>Dynamic Type for custom fonts. It seems that at Apple they want us to make more accessible applications.</li><li>MusicKit (API from Apple Music for your applications).</li><li>HEVC and HEIF (new format for photos and videos from Apple). It is said that files can be half the size and can be converted back excellently. <a href="https://iso.500px.com/heif-first-nail-jpegs-coffin/">500px guys are already going full out testing this</a>.</li><li>Core ML which allows you to apply deep machine learning models in a single line of code 👾! Of course, it has its issues, but Apple is already giving its API for Language Processing and Computer Vision, opening up the path for new opportunities.</li><li>Metal 2. I am not an expert in this field, but I have heard that Apple has added capabilities for additional optimisation.</li><li>VR and SteamVR for macOS. Apple is also selling <a href="https://developer.apple.com/development-kit/external-graphics/">External Graphics Development Kit</a> for developers.</li><li>ARKit is an augmented reality on iOS. Very cool stabilisation and easy integration with SpriteKit and ScreneKit. <a href="https://twitter.com/madewithARKit">There are some cool examples</a>. The bad news is that it is only for iPhone 6s and higher.</li></ul><p>And a couple more changes which are deserving of your attention, although they weren’t demonstrated in the Platforms State of the Union (thanks, <a href="https://medium.com/u/47536a8cb274">Artem Loenko</a> to mention part of them).</p><ul><li>No more own custom ratting windows on your application; use only <a href="https://developer.apple.com/documentation/storekit/skstorereviewcontroller">SKStoreReviewController</a>: <a href="https://9to5mac.com/2017/06/09/app-rating-custom-prompts-app-store-banned/">https://9to5mac.com/2017/06/09/app-rating-custom-prompts-app-store-banned/</a>.</li><li>MapKit now has a clustering identifier, which allows you to use basic maps comfortably, even if there are too many objects.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_r_xrdpzcDeEFGO_6ak6Fg.png" /><figcaption>MapKit clustering identifier</figcaption></figure><ul><li>Now has NFC support (there are lots of limitations, but if you are interested: <a href="https://developer.apple.com/videos/play/wwdc2017/718/">Introducing Core NFC</a>).</li><li>PDFKit for advanced work with PDF (Hello, <a href="https://pspdfkit.com/">PSPDFKit</a>). <a href="https://developer.apple.com/videos/play/wwdc2017/241/">Introducing PDFKit on iOS</a>.</li><li><a href="https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Attributes.html">@available</a> is now also available in Objective-C.</li><li><a href="https://developer.apple.com/documentation/devicecheck">DeviceCheck</a> has come out: a two-bit flag which is bound to a device.</li><li>In the future we are awaiting <a href="https://developer.apple.com/videos/play/wwdc2017/413/">dyld 3.0</a> which is destined to speed up applications launching.</li></ul><h3><strong>Watching WWDC 2017 sessions</strong></h3><p>All the sessions from WWDC 2017 are already available online on the Apple web page: <a href="https://developer.apple.com/videos/wwdc2017/">https://developer.apple.com/videos/wwdc2017/</a>.</p><p>The main questions developers are going to ask are: Why should I watch them? How can I select the most interesting sessions? How can I watch everything?</p><p><strong>I will start with the question: do you use weak or strong for IBOutlets? And why?</strong></p><p>The answer to this question is in one of the talks at WWDC 2015. The session is entitled, <a href="https://developer.apple.com/videos/play/wwdc2015/407/">Implementing UI Designs in Interface Builder</a>, and the answer comes at 31:30.</p><p>What am I getting at? My point is that the answers to a lot of questions which arise during the course of day-to-day developer work (or for example, some tips and tricks for working with the animation or Core Data), can be found at WWDC. There are lot of sessions full of those sorts of small details which are helpful for any advanced iOS developer.</p><h3><strong>How to select a session to watch?</strong></h3><ul><li><strong>Watch the talks based on what you are interested in</strong></li></ul><p>In the first instance look out for those talks which are related to your current topic of work. For example, if you work a lot with Core Data, at least try to check sessions about multiple threads, GCD, what’s new in Foundation and Core Data itself. And don’t forget that the sessions contain references to other sessions (and not necessarily from the same year).</p><ul><li><strong>Make your selection based on rating and description</strong></li></ul><p>A couple of weeks after WWDC a sufficient number of articles will come out in which people will share the most interesting talks. Here are some examples from this year: <a href="https://www.raywenderlich.com/164732/top-10-wwdc-2017-videos">Top 10 WWDC 2017 Videos</a> and <a href="https://useyourloaf.com/blog/wwdc-2017-viewing-guide/">WWDC 2017 Viewing Guide</a>. But it is not worth relying on what somebody else has chosen. For example, this year there were two interesting sessions which didn’t have expressive titles (<a href="https://developer.apple.com/videos/play/wwdc2017/242/">The Keys to a Better Text Input Experience</a> and <a href="https://developer.apple.com/videos/play/wwdc2017/244/">Efficient Interactions with Frameworks</a>). No one talked about them, but nevertheless they are worth your attention.</p><ul><li><strong>Work as a team</strong></li></ul><p>Share out responsibilities for watching WWDC sessions within your team. For example, if there are five developers, you can each watch 3–5 talks and prepare a mini-presentation on the most interesting points. I like this option best because as you watch the sessions there is time to thoughtfully analyse the details and the slides and notes you prepare can be used later as crib sheets.</p><h4>How can you watch everything?</h4><p>Of course, there is no point watching everything. If you watch everything that catches your interest, regardless of relevance, by the time September comes around you will have forgotten everything you have heard. But if you want to watch more sessions than you have free time, the following tips may help you, as they once helped me.</p><ul><li><strong>Context.</strong> View the slides before watching the session/s. Almost always they sum up the topics of the talk very well (possibly the talk won’t be what you need). Also slides help you to find your bearings: where to find what you are interested in, so as not to have to watch the whole session in its entirety.</li><li><strong>Speed.</strong> Watch the session/s at various speeds. For example, What’s New is fine to watch at a speed of x1.5–1.7. The same VLC and application from the previous point can handle this. If, on the other hand, you have decided to watch it in Safari, here is a JS script from <a href="https://medium.com/u/47536a8cb274">Artem Loenko</a>:</li></ul><pre>document.getElementsByTagName(&quot;video&quot;)[0].playbackRate = 1.5</pre><ul><li><strong>Relevance.</strong> It doesn’t always make sense to view a session in detail. Possibly you will require the technology mentioned in a given session in September-October, when it will be introduced into your application. If you watch in spurts or browse through the slides, you can get a clear understanding of the subject and can come back to it when you need to.</li><li><strong>Tools.</strong> Use third-party applications and tables to highlight key points. For example, <a href="https://wwdc.io/">this informal client for viewing WWDC</a> sessions allows you to place bookmarks mid-video, which is very convenient. And you can add comments to a table in respect of the most interesting places in the talk.</li></ul><h3>Must-watch 2017</h3><p>This year I watched multiple sessions and have selected the ones for you which all iOS developers need to watch. For the sake of convenience, the talks are divided into the following categories: <em>Foundation, Lead, UI, Debug, Testing, AppStore, Featured</em>.</p><p>And I have marked my personal favourites with the sign 🍿.</p><p><strong>Foundation (basics)</strong></p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/402/">402 What’s New in Swift</a></li></ul><p>🍿🍿🍿</p><p>Basically, this is no longer so much about what’s new in Swift, but about what’s going on ‘under the bonnet’. If you write in this programming language, then you need to watch this talk for your own general knowledge. If you are looking for the distinctives of the new Swift, then go here:<a href="https://github.com/ole/whats-new-in-swift-4"> https://github.com/ole/whats-new-in-swift-4</a>.</p><p>—</p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/212/">212 What’s New in Foundation</a></li></ul><p>🍿</p><p>Here studying the slides should be enough, but the new <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0161-key-paths.md">KeyPaths</a> and <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0166-swift-archival-serialization.md">Codable</a> systems are covered exhaustively.</p><p>—</p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/244/">244 Efficient Interactions with Frameworks</a></li></ul><p>🍿🍿</p><p><a href="https://en.wikipedia.org/wiki/Copy-on-write">COW</a>, work with data, bridging, strings, regular expressions and much more in this under-valued talk.</p><p><strong>Lead (if you lead a team and want to create ideal applications)</strong></p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/238/">238 Writing Energy Efficient Apps</a></li></ul><p>🍿</p><p>If your application uses up too much energy, users will delete it. Processing, Networking, Location, Graphics — that is what this talk is built around. However, if you have already dug into this subject, you are unlikely to find anything new here.</p><p>—</p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/401/">401 Localizing with Xcode 9</a></li></ul><p>🍿🍿</p><p>With Xcode 9 a huge amount is automated for the purposes of localisation. The talk discusses problems such as extracting data, currencies and word formation in various languages (e.g. 1 cit<strong>y</strong>, 2 cit<strong>ies</strong>). If you want to refresh your memory or find out something new, you need to watch this session.</p><p>—</p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/413/">413 App Startup Time: Past, Present, and Future</a></li></ul><p>🍿🍿</p><p>This talk isn’t so much about the present, as about the future. dyld 3.0 is on its way — with all the ensuing consequences. dlopen/dlsym/dladdr/all_image_infos: if you know any of these words, start watching the talk.</p><p><strong>UI (work with visual components)</strong></p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/201/">201 What’s New in Cocoa Touch</a></li></ul><p>🍿</p><p>Here again, it should be enough to browse the slides, but be ready for some changes to iOS 11.</p><p>—</p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/204/">204 Updating Your App for iOS 11</a></li></ul><p>🍿</p><p>Following on from the previous talk. At least study the slides.</p><p>—</p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/219/">219 Modern User Interaction on iOS</a></li></ul><p>🍿🍿🍿</p><p>The first part is not so much about new technologies, as about working with gestures on the system and interacting with them. My personal must-watch for those working with UI.</p><p><strong>Interesting fact:</strong> 163 UIGestureRecognizers on a normal iPad settings screen.</p><p>—</p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/206/">206 Introducing Password AutoFill for Apps</a></li></ul><p>🍿🍿</p><p>Obligatory viewing for developers of applications requiring a login. Everyone else needs to know that there are already <strong>25 kinds</strong> of UITextContentType, and it is worth using them in applications. Especially with the Apple focus in respect of <a href="https://en.wikipedia.org/wiki/Natural_language_processing">NLP</a>.</p><p>—</p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/242/">242 The Keys to a Better Text Input Experience</a></li></ul><p>🍿🍿🍿</p><p>About keyboards. The aim isn’t to sell new API, but to deal with non-standard situations: varying keyboard sizes, on-screen work without tables, the role of input accessory view and the impact of dynamic type.</p><p>—</p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/412/">412 Auto Layout Techniques in Interface Builder</a></li></ul><p>🍿🍿</p><p>Yes, yes, it’s our beloved AutoLayout. Changing layout when an application is working (especially when it depends on context), the role of dynamic type, a new indentation concept (safe areas) and a couple of case studies: working with percentages in layout and how layout depends on display orientation.</p><p><strong>Debug (what programmers do 80% of the time)</strong></p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/404/">404 Debugging with Xcode 9</a></li></ul><p>🍿</p><p>In my view, this session is a bit drawn out, but I couldn’t not include it in this list because it has some interesting points, such as the improved work of break-points.</p><p>—</p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/407/">407 Understanding Undefined Behavior</a></li></ul><p>🍿</p><p>If you haven’t yet moved over to Pure Swift, it’s worth watching this talk. It describes the work of <a href="https://developer.apple.com/documentation/code_diagnostics/undefined_behavior_sanitizer">Undefined Behavior Sanitizer</a>.</p><p>—</p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/406/">406 Bugs Using Xcode Runtime Tools</a></li></ul><p>🍿</p><p>What Main Thread Checker, Address Sanitizer and Thread Sanitizer are all about. If you still don’t know what these are, watch the session (or at least browse the slides).</p><p><strong>Testing (testing your own application)</strong></p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/414/">414 Engineering for Testability</a></li></ul><p>🍿🍿</p><p>About extracting logic from VC, creating mocks, the role of DI and the importance of output parameters of any kind. There are also a couple of pieces of advice on UI tests. If you don’t write tests frequently, it is worth watching the talk for your general knowledge.</p><p>—</p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/409/">409 What’s New in Testing</a></li></ul><p>🍿</p><p>New distinctive features of tests. Most of the advice relates to UI tests, so no need to watch this unless you have to.</p><p><strong>AppStore (if you have your own projects or you are responsible for working with the App Store)</strong></p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/301/">301 Introducing the New App Store</a></li></ul><p>🍿🍿🍿</p><p>You probably know that App Store in iOS 11 has been radically updated. There will be a lot of new features, so you must watch this talk.</p><p>—</p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/302/">302 What’s New in iTunes Connect</a></li></ul><p>🍿🍿</p><p>A lot of attention is devoted to TestFlight. If you spend even just an hour a week on this wonderful site, it is worth watching the talk.</p><p><strong>Featured (these are simply two of my favourite sessions which didn’t make it into any of the categories above)</strong></p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/702/">702 Privacy and Your Apps</a></li></ul><p>🍿🍿🍿🍿</p><p>Some thoughts about privacy which will soon become a luxury. Along the way you will get acquainted with DeviceCheck.</p><p>—</p><ul><li><a href="https://developer.apple.com/videos/play/wwdc2017/803/">803 Designing Sound</a></li></ul><p>🍿🍿🍿🍿</p><p>Wonderful session about the significance of sound (after all we developers still don’t acknowledge this).</p><blockquote>If you are a self-respecting developer, when the new iOS comes out you will stop using iOS 9 and will be able to enjoy the full force of iOS. So now is the time to brush up on what’s new and has been announced at <a href="https://developer.apple.com/videos/wwdc2016/">WWDC 2016</a>, and make the most of the most basic version of the application intelligently and usefully.</blockquote><h3><strong>Thanks for reading and to Badoo development and Editors teams to </strong>correct and create this article<strong>!</strong></h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6278ba0c94b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/bumble-tech/advanced-wwdc-2017-guide-b6278ba0c94b">Advanced WWDC 2017 Guide</a> was originally published in <a href="https://medium.com/bumble-tech">Bumble Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Xcode 8 beta 1 + CocoaPods = ]]></title>
            <link>https://medium.com/@ziminalex/xcode-8-0-cocoapods-95d8e7a769a9?source=rss-8dc52e10399a------2</link>
            <guid isPermaLink="false">https://medium.com/p/95d8e7a769a9</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[cocoapods]]></category>
            <category><![CDATA[xcode]]></category>
            <dc:creator><![CDATA[Alexander]]></dc:creator>
            <pubDate>Thu, 30 Jun 2016 19:20:27 GMT</pubDate>
            <atom:updated>2016-10-02T17:58:15.625Z</atom:updated>
            <content:encoded><![CDATA[<h4>UPDATE 2 (02.10.16):</h4><p>If you are using Xcode 8, you must install -pre version of CocoaPods:</p><pre>sudo gem install cocoapods --pre</pre><p>If you are facing such error:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*QaSeHyMcSaEnyIMj1RBtHw.png" /><figcaption>Possible error</figcaption></figure><p>You can try this solution: <a href="http://stackoverflow.com/questions/25889189/unable-to-run-app-in-simulator-an-error-was-encountered-while-running-domain/39049990#39049990">http://stackoverflow.com/questions/25889189/unable-to-run-app-in-simulator-an-error-was-encountered-while-running-domain/39049990#39049990</a></p><h4>UPDATE:</h4><p><a href="https://medium.com/@nosyjoe?source=post_header_lockup">Philipp Engel</a> mention that the signing issue is solved by cocoapods version 1.1.0.beta.1. Using this version, only the SWIFT_VERSION setting has to be applied.</p><p>So your Podfile for Swift 2.3 will be somethin like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c47c5ed3a47168e8a8bb243015178295/href">https://medium.com/media/c47c5ed3a47168e8a8bb243015178295/href</a></iframe><p><a href="https://github.com/CocoaPods/CocoaPods/releases/tag/1.1.0.beta.1">CocoaPods/CocoaPods</a></p><p>iOS 10 have tones of tasty API, yes? Maybe you want to create a new project with <a href="https://developer.apple.com/videos/play/wwdc2016/509/">Speech Recognition API</a> or build an app<a href="https://developer.apple.com/videos/play/wwdc2016/208/"> for watchOS 3</a>?</p><h4>I faced some small annoying problems</h4><ol><li>Project and all it’s frameworks must have same Swift version</li><li>Most of Swift framework don’t have Swift 3.0 branch and should be build for Swift 2.3</li><li>Every <strong><em>pod update</em></strong><em> </em>and<em> </em><strong><em>pod install </em></strong>resets<strong><em> “</em></strong><em>Use Legacy Swift Language Version”</em> to No (which means this framework will compile using Swift 3.0)</li><li>To build for a real device I should sign every target</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*oz2NYPM2DaQh6cuY1YuEUA@2x.png" /><figcaption><em>Use Legacy Swift Language Version (No for Swift 3.0, Yes for Swift 2.3)</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*jYY8QRAGECLq-WEK45bViQ@2x.png" /><figcaption>Signing problem</figcaption></figure><h4>How to solve them?</h4><p>First problem might be solved by using Swift 2.3 in real project. Go to your <strong>target</strong>, select <strong>build settings</strong> tab, search for “Legacy” and set <strong>Yes</strong> for “<em>Use Legacy Swift Language Version”.</em></p><p>Second might be solved by using same for all your Swift frameworks, but we will improve Podfile, to make it automatic.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/290203abf53c4fecd2a169f1dac873ad/href">https://medium.com/media/290203abf53c4fecd2a169f1dac873ad/href</a></iframe><p>Here we go through all our frameworks (targets) and set Swift Version in the build settings (<em>Use Legacy Swift Language Version”</em> to <strong>Yes</strong>)</p><h4>Okey, but there is one more problem — Signing.</h4><p>First of all, lets find developer info:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*EZWqZRu7NTl1Am_VzmLIaw@2x.png" /><figcaption>Check that your project is signed</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/688/1*aJtJ6JRd_x7__B9D7VOh6w@2x.png" /><figcaption>Show Package Contents of this project and then open `project.pbxproj` file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*qmqCzsZAC38UERJMOTSxEA@2x.png" /><figcaption>Then seach for the name and remember `DevelopmentTeamName` and `DevelopmentTeam`</figcaption></figure><p>Then add new lines to your podfile</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0ff28dbb297c7e645b150ec8b67adc9c/href">https://medium.com/media/0ff28dbb297c7e645b150ec8b67adc9c/href</a></iframe><p>You have to replace <strong><em>developer_info</em></strong> with information finded on step above</p><p>This code will go through all your targets, saving them reference id and added sign info to target attributes.</p><p><strong>Important</strong>: I didn’t find how to execute this code after creating `Pods.xcodeproj` if it wasn’t there first, so I added log. If it’s your first pod install then you have to do it one more time. Maybe someone knows more elegant solution, I will be pleased.</p><p>Here is my final podfile:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b7c0f171081478476736b59be53524f6/href">https://medium.com/media/b7c0f171081478476736b59be53524f6/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95d8e7a769a9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adapt your app to 3D Touch technology]]></title>
            <link>https://medium.com/@ziminalex/adapt-your-app-to-3d-touch-technology-82b40872585b?source=rss-8dc52e10399a------2</link>
            <guid isPermaLink="false">https://medium.com/p/82b40872585b</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[peek-and-pop]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[xcode-8]]></category>
            <category><![CDATA[3d-touch]]></category>
            <dc:creator><![CDATA[Alexander]]></dc:creator>
            <pubDate>Thu, 15 Oct 2015 21:02:52 GMT</pubDate>
            <atom:updated>2016-10-15T16:52:50.947Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Update:</strong> Syntax changed to Swift 3.0</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P2IydE5ZeSPMokMm_qxNUw.jpeg" /></figure><p>All materials are here — <a href="https://github.com/azimin/3D-Touch">https://github.com/azimin/3D-Touch</a></p><h3>What is this article about?</h3><ol><li>About 3D Touch implementation</li><li>Code examples</li><li>Some suggestions</li></ol><h3><strong>What is 3D Touch?</strong></h3><p>It’s additional dimension gesture available for user of iPhone 6s, 6s Plus and future models. It’s an ability for user to touch display with higher pressure and for you, as developer, to handle such event.</p><p><em>In my personal view, every app should use this technology because it’s </em><strong><em>very</em></strong><em> easy to integrate.</em></p><h3>Use cases</h3><p>There are two main use cases when each developer must implement 3D Touch API — Quick Actions and Peek and Pop. Also there is one way to change interaction with app or add additional functionality throw 3D Touch.</p><h4>Where 3D Touch must be implement</h4><ul><li>App icon fast shortcuts <strong>(Quick Actions)</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*ZredItJyYJSNrihnNVr62Q.png" /><figcaption>Quick Actions</figcaption></figure><p>You can easily add <strong>static (defined in plist) </strong>and <strong>dynamic (can be set in in code) </strong>items that would appear if user click on you app icon with additional pressure.</p><ul><li>Preview menus <strong>(Peek and Pop)</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*LJiHU4O4dIdFrSM-EHTdcQ.png" /><figcaption>Peek and Pop</figcaption></figure><p>Just imagine any segue or transition to another View Controller (or another app). What if user wants to preview it and decide how he wants to deal with it: close/open/act.</p><h4>What is more?</h4><p>You can access value of touch pressure anywhere from <strong>UITouch</strong> object.</p><h3><strong>Quick Actions</strong></h3><p>There are two types of app icon shortcuts:</p><ul><li><strong>Static</strong> items should be added in info.plist and already defined before first launch of your app</li><li><strong>Dynamic</strong> items can be defined during you app code execution</li></ul><p>For example, quick access to one of the screen could be static item, but name of the last played song should be defined only in code.</p><h4>Item</h4><p>Your item is presented by <strong>UIApplicationShortcutItem </strong>class, but you can also use <strong>UIMutableApplicationShortcutItem</strong> to change object properties outside the init method. Number of items dispayed for user is system-defined (now 4).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/58fb100fcccac35a2dab4df1ad906e7d/href">https://medium.com/media/58fb100fcccac35a2dab4df1ad906e7d/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*4Zf4h9wI3Y8w9bnMjjhGIg.png" /></figure><p><em>Title</em> and <em>subtitle</em> will use passed string if there is no such in <strong>Localizable.strings</strong>.</p><p><em>Type</em> and <em>userInfo are </em>used to setup actions after event execution.</p><p><em>ShortcutItems</em> array contains all <strong>dynamic</strong> items.</p><h4>Icon</h4><p>Icon is presented by <strong>UIApplicationShortcutIcon</strong> class. There are 3 ways to select it:</p><ol><li><em>type: </em><strong>UIApplicationShortcutIconType</strong> — enum with Apple icon assets (contains 7 icons in 9.0 and 29 icons in 9.1)</li><li><em>templateImageName: </em><strong>String</strong><em> </em>— name of image from your app bundle (so you can’t set it during runtime). Image should be single color and 35x35 for @1x, here is temple - <a href="https://developer.apple.com/design/downloads/Quick-Action-Guides.zip">template files</a></li><li><em>contact: </em><strong>CNContact </strong>— create image from contact picture from the address book (if not available will create monogram image from the contact name)</li></ol><h4>How to handle</h4><p>You can use method below to handle user actions by tapping on quick action item:</p><pre>func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -&gt; Void)</pre><p>Example of such handling:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6b5685cf6bf4fa76c138303a2cb3696d/href">https://medium.com/media/6b5685cf6bf4fa76c138303a2cb3696d/href</a></iframe><p>If your root view controller is <strong>UITabBarController</strong> and your <strong>UIApplicationShortcutItem</strong> contains index info — you can select<strong> </strong>required tab.</p><p>Example - <a href="https://github.com/azimin/3D-Touch/tree/master/3D-Touch-Quick-Actions">3D-Touch-Quick-Actions</a></p><blockquote>Apple recommends to avoid using method below when app is just launched (not in background):</blockquote><pre>func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -&gt; Void)</pre><p>But Apple way will increase complexity of your code, make you add additional properties, handling right states and so on, so sometimes it’s better to handle everything in this method. Apple’s example with recomendations - <a href="https://developer.apple.com/library/ios/samplecode/ApplicationShortcuts/">ApplicationShortcuts: Using UIApplicationShortcutItem</a>.</p><h4>Static items</h4><p>As I mentioned before, static items are located inside info.plist and defined before first app lunch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5EKXdYcP9f4t-GYxcBnXsA.png" /><figcaption>Static shortcut item inside info.plist</figcaption></figure><p>Localization for these items is located inside <em>InfoPlist.strings.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/246/1*5piJyFsIBcWl5U3Y645VNQ.png" /><figcaption>InfoPlist.strings</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*SfV_QBL8zmP7pkAw_gIp6A.png" /><figcaption>Example of InfoPlist.strings content</figcaption></figure><blockquote>Hints</blockquote><ul><li>My example - <a href="https://github.com/azimin/3D-Touch/tree/master/3D-Touch-Quick-Actions">3D-Touch-Quick-Actions</a></li><li>Apple example - <a href="https://developer.apple.com/library/ios/samplecode/ApplicationShortcuts/">ApplicationShortcuts: Using UIApplicationShortcutItem</a></li><li>Before first app launch only static items are available for user</li><li>Static items have the highest priority for showing on app icon</li><li>You can fill <strong>shortcutItems</strong> array with as many objects as you want, but its showing capacity will be defined by system (now is 4)</li></ul><h3>Peek and Pop</h3><p>Peek and pop action give user ability to preview <strong>(peek)</strong> content in pop-up that appears after pressure tap. He can easily take away his finger and this pop-up will disappear. Also user can open this pop-up on full screen by more strong pressure or fastly act with it.</p><h4>How to integrate</h4><p>First of all, we need to register for previewing delegate <strong>(UIViewControllerPreviewingDelegate)</strong> with some class and pass any <strong>UIView</strong> as observing area (it means that all defined touches on this view will call related delegate methods). Register method is available on any <strong>UIViewController</strong> class.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c1fab98c8cb2f93239a92def35d70324/href">https://medium.com/media/c1fab98c8cb2f93239a92def35d70324/href</a></iframe><p>Trait Collection now contains enum that indicates if current Trait Environment supports force touch (3D Touch).</p><p>After this you need to implement <strong>UIViewControllerPreviewingDelegate </strong>method by your<strong> </strong>subscriber, so it would be something like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9040f75e60ff04dd1a3d7316ecea0067/href">https://medium.com/media/9040f75e60ff04dd1a3d7316ecea0067/href</a></iframe><p>First method would be called when user started force touching. You must return him a view controller to be presented. If you return nil - nothing will happen. Also there is <strong>UIViewControllerPreviewing</strong> protocol that contains some information and <strong>sourceRect</strong> (from which area you previwing of View Controller will presents). If you won’t set <strong>sourceRect -</strong> View Controller will be presented from whole observing view frame.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c7c71e70378742d9bb5a2cbf9d101ed5/href">https://medium.com/media/c7c71e70378742d9bb5a2cbf9d101ed5/href</a></iframe><p>Here is an example of how we could find which cell was pressed in collection view, then present view controller, located on storyboard with preferred size equal 300x300. <em>Interesting thing - pop-up width still will be about 90% of source view controller width, but content will be scaled, so you will see content of 300 points.</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b2277e2c70db34c06d7cf5f4b53c967d/href">https://medium.com/media/b2277e2c70db34c06d7cf5f4b53c967d/href</a></iframe><p>In general, second method will just present your previewing view controller, because it is called when user continue pressing until maximum force value. In this case you can easily call <strong>showViewController</strong>. This will simply present your View Controller.</p><p>Example of Peek and Pop project - <a href="https://github.com/azimin/3D-Touch/tree/master/3D-Touch-Peek-And-Pop">3D-Touch-Peek-And-Pop</a></p><h4>Storyboard</h4><p>Starting from Xcode 7.1 beta 3 you can easily create Peek and Pop from any action segue on storyboard (for example, segue from <strong>UIButton</strong> or <strong>UITableView</strong> cell)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/1*etJiNYMCNYrmBY1uot5VkQ@2x.png" /><figcaption>Peek and Pop section in the Attributes Inspector</figcaption></figure><p>Example of storyboard - <a href="https://github.com/azimin/3D-Touch/tree/master/3D-Touch-Peek-And-Pop-Storyboard">3D-Touch-Peek-And-Pop-Storyboard</a>, I will write small tutorial in a couple of days.</p><h3>Pressure-Sensitivity</h3><p>There are a lot of things you can create using info about user’s level of typing pressure (for example, zooming). Everything is limited by your fantasy.</p><p>All you should know is that now <strong>UITouch</strong> class returns <em>maximumPossibleForce</em> and <em>force</em> itself. You can find all information in small demo - <a href="https://github.com/azimin/3D-Touch/tree/master/3D-Touch-Pressure-Sensitivity">3D-Touch-Pressure-Sensitivity</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82b40872585b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>