<?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 Anton Domashnev on Medium]]></title>
        <description><![CDATA[Stories by Anton Domashnev on Medium]]></description>
        <link>https://medium.com/@antondomashnev?source=rss-fb738794c2a0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*b9hQNvhAZFrnBo6BfHGnpA.jpeg</url>
            <title>Stories by Anton Domashnev on Medium</title>
            <link>https://medium.com/@antondomashnev?source=rss-fb738794c2a0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 13:03:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@antondomashnev/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 developer interview, what does the interviewer expect?]]></title>
            <link>https://medium.com/42hire-don-t-panic-just-hire/ios-developer-interview-what-does-the-interviewer-expect-759fc51b7cb1?source=rss-fb738794c2a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/759fc51b7cb1</guid>
            <category><![CDATA[recruiting]]></category>
            <category><![CDATA[hiring]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Anton Domashnev]]></dc:creator>
            <pubDate>Sun, 13 Nov 2016 22:03:59 GMT</pubDate>
            <atom:updated>2016-11-13T22:03:59.296Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve been doing the interview for IOS developer position at conichi for the past ~6 months. I’ve met lots of cool people and enjoyed most of the conversations I had and I’ve collected some interesting notes that pop up from time to time. Although these may sound obvious for most of you, that actually may be not obvious for less experienced candidates. And the last thing before we start, these all are my personal opinion and I’m willing to debate about it if you have any thoughts.</p><p><strong>Focus on the experience not on the number of apps in the App Store</strong></p><p>I received lots of CVs with the pretty excited number of the published apps, however for me at the first minute of the conversation this is just a list. I would like to know the details. Usually, I ask a candidate to pick one the most interesting/challenging app from their perspective and tell about it. I expect to hear the parts the were challenging, caveats or problems he/she faced and solution the developer has found to fix the problem. That is usually a nice entry point for the discussion about personal experience.</p><p><strong>Understand the business of the company you’re applying for</strong></p><p>I always ask candidates about our business and product. In conichi’s case we’re working with the beacons and to feel the whole experience the guest has to be around our’s beacon range which is not a case most of the time. However, I expect also the knowledge about the business itself. I would like to know the personal opinion, and most candidates just say — “It looks cool”, “I like the idea”, but believe me, I’m much more interested to hear what is not cool and how we can make it awesome. Regarding the product (in our case the iPhone app), it’s awesome if the candidate spends some time to dig into it. Maybe finds some bugs, or brings ideas to enhance it. I do want to work with people who are constantly try to improve the product and not only from the coding perspective.</p><p><strong>Be curious, ask questions</strong></p><p>I don’t believe that the candidate could have no question to me or another interviewer about anything we have at work: processes, office, team, etc. But I could say that during 50% of the interview I haven’t been asked about anything. I don’t want to make an interview process a monolog, I want to have a discussion and I’d love to answer questions. Sometimes question appears after the interview, well, then I would love to see them via email, and I’m more than happy to answer them.</p><p><strong>Be proud of your code challenge</strong></p><p>Although I’m not a big fun of code challenges, I think, unless the candidate has some open source products, this is a good way to see how the developer works and codes in particular. At conichi, we normally give a task to build an application, not a big one, but the complete. And by working on the project I expect to see the nice commit history, clean architecture, tests and not broken UI. Let’s go step by step here:</p><ul><li><em>History of the work.</em> It is supposed to show me how the developer worked, which part is done first, which second. Did candidate rebase or merge? Was the work done by following a git flow with PR and feature branches or not? Unfortunately, I’ve received some projects with just <em>`Initial commit`</em>, that doesn’t really make a good impression.</li><li><em>Clean architecture.</em> We all now know about the Massive View Controller thing, and at the moment we have plenty of options to avoid it. However, some common knowledge and best practices such as single responsibility principle, composition over inheritance, dependency injections, etc are not implemented most of the time. I can not say that we all should blindly follow any rule, but that should be something in mind always.</li><li><em>Tests.</em> This is a most painful one and it’s probably tight to the clean architecture. First times I was just expecting tests in code challenge and after that, I didn’t receive any project with them, I started asking to write them. I never ask for 100% code coverage, but I definitely want to see the approach of how the developer tests the app. Unfortunately, it’s still a tough part because even if I ask about it, I receive some (to be a bit more precise ~5) unit tests and 90% of the time they are useless. I think I can use this word here, believe me.</li><li><em>UI.</em> This is a small one and usually, it’s fine, but sometimes I see the autolayout warnings when debugging the app. I’d like to have zero warnings either build or runtime in the code challenge.</li><li><em>Code style.</em> Surprisingly I’ve seen lots of project without any structure either folder or even code blocks alignment. This is a really small thing which can be easily improved, but it makes a much better impression on the interviewer.</li></ul><p>These all things about a challenge I’m waiting for and asking for because we apply them at conichi and not just because to have the best code challenge and then write a shitty code.</p><p><strong>Prepare yourself for the technical interview</strong></p><p>At conichi, as the last round, we’re doing a technical interview and there are some interesting things popped up during them:<br>* Be honest. When you don’t know the answer, think once again and if still nothing just says it. It’s normal, I think the developers google 90% of the time to find the answer and we don’t have to remember or know everything. However, if this is a fundamental question in the case of no answer, I’d like to start a discussion, thinking process. so we can come up with the answer together.<br>* Remind yourself about the patterns or common best practices. I found it interesting the only well-known pattern everybody knows is the singleton, unfortunately, this is because of also misusing it half of the cases.</p><p><strong>And what’s now?</strong></p><p>Well, if you are here, first of all, I’m really happy and I believe now you have some opinion about each point I’ve mentioned. This is a perfect time to start a discussion. <br>Also by pointing out these things I wanted to formalize expectations of the candidates before the real interview with you dream company starts. I, personally, didn’t have much experience in interviewing people for any position and I was looking for something similar applying to the iOS development area, so people who are just starting their journey as an interviewer may found it useful as well.</p><p>Cheers,<br>Anton.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=759fc51b7cb1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/42hire-don-t-panic-just-hire/ios-developer-interview-what-does-the-interviewer-expect-759fc51b7cb1">iOS developer interview, what does the interviewer expect?</a> was originally published in <a href="https://medium.com/42hire-don-t-panic-just-hire">Don&#39;t Panic, Just Hire</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using GitHub for app localization]]></title>
            <link>https://medium.com/@antondomashnev/using-github-for-app-localization-494c1be60dcd?source=rss-fb738794c2a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/494c1be60dcd</guid>
            <category><![CDATA[localization]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[automation]]></category>
            <dc:creator><![CDATA[Anton Domashnev]]></dc:creator>
            <pubDate>Fri, 23 Sep 2016 20:24:34 GMT</pubDate>
            <atom:updated>2016-09-23T20:24:34.603Z</atom:updated>
            <content:encoded><![CDATA[<p>For my company conichi local market is German hence since the beginning we have our app localized into two languages: <em>English</em> and <em>German</em>. In my personal opinion, we’ve passed all usual steps that happen when it comes to mobile app localization.</p><p>We started with manual localization by a developer, which worked in the beginning but then became a mess. The next level for us was to delegate this responsibility to the special person. Unfortunately, it didn’t solve the problem of translation mis-synchronization. Then I made a proposal to try the GitHub to store our strings files, which worked better and I’d like to explain the process in details.</p><h4>Using GitHub for app localization</h4><p>The idea came to my mind not so long after I’ve read an article about pros and cons of using Github for design files. I found that article really interesting and started thinking about other problems that can be solved by version control system. Since we had a big problem in our app localization process, I thought why not to store localization files on Github, because it could improve the problem of uploading files somewhere, notifying the responsible person or team and it could potentially be automated which was a target for me.</p><blockquote>Here I should clarify that I’ve heard about lots of services that potentially solve our problem, but either I didn’t do a proper research or I haven’t found anything that doesn’t bring third party translators into the process and remains simple to use for both — developers and translators (the links in comments are welcome, maybe we developed another wheel =) ).</blockquote><p>So we started with the two separate reports for iOS and Android. Each repo contains the strings in case of iOS files. And the following diagram can show our flow:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*wIMbNNY0M0FgCG1eEJ8RDA.png" /></figure><p>These four steps look not that bad to follow, but after a while, we realized that this is only an ideal case, which is rare actually. Usually, our flow looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ly8vmDA4rJwscYFPkunQ5A.png" /></figure><p>I’m not sure about you, but my reaction on all of this above was:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*_gOGtBbUvna4N_WTKTR6bw.gif" /></figure><p>ut every time I see something that drives me crazy, in my mind starts working Mr. Automatization. I started thinking about replacing all developer’s steps from manual to automated. After a while, I released a solution called Nabokov, which refers to one of the greatest book translators in Russia. It brought the process into initial diagram without any caveats and edge cases that actually not edge.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S6boecYTzZucI6jZrfJgVQ.png" /></figure><p>It has multiple input lines because Nabokov uses the pre-commit hook to synchronize remote with project files. It means that each time developer commits something that contains the localization changes, Nabokov runs synchronization. All merge conflicts went off as well as the context switching because all you need is to manually run one command to synchronize project files with remote. As long as you use the terminal to work with git, this is completely same context, if you use any other app, you can run this action from time to time, that I hope doesn’t bother you much =).</p><h4>Conclusion</h4><p>As I said maybe I’ve invented another wheel and in that case, I will appreciate any links to the services with similar or better approach to localize the mobile application. At least this was my first real word ruby experience which is definitely improved my skills.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=494c1be60dcd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Experience with building modular SDK]]></title>
            <link>https://medium.com/@antondomashnev/experience-with-building-modular-sdk-8067c2e97e9c?source=rss-fb738794c2a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/8067c2e97e9c</guid>
            <category><![CDATA[objective-c]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Anton Domashnev]]></dc:creator>
            <pubDate>Mon, 06 Jun 2016 19:20:34 GMT</pubDate>
            <atom:updated>2016-06-07T07:42:50.051Z</atom:updated>
            <content:encoded><![CDATA[<p>In conichi we are trying to improve the guest experience in hotel: speed up the check-in &amp; check-out process, brings the mobile payment possibility and so on. To build this infrastructure we’ve been working on three main projects and one of the most important is our mobile SDK, which we are integrating into our partner’s apps.</p><p>We’ve been building SDK with one key point in mind it should be modular. And by word modular I mean every partner should have the possibility to construct their SDK with the only functionality they need.</p><h4>How we made it possible in code</h4><p>First of all, we detached our core functionality and made initialization process based on dependency injection with <em>configuration</em> object:</p><pre>@interface CNISDKConfiguration : NSObject &lt;NSCopying&gt;</pre><pre>@property (nonatomic, copy, readonly) NSString *apiKey;<br>@property (nonatomic, copy, readonly) NSString *apiSecret;<br>@property (nonatomic, assign, readonly) CNISDKLogLevel logLevel;</pre><pre>+ (instancetype)configurationWithBlock:(void (^)(id&lt;CNISDKMutableConfiguration&gt; configuration))configurationBlock;</pre><pre>@end</pre><p>This object allowed mutable block-based initialization and is conformed to NSCoding protocol to prevent any reference’s related issues. I took that idea from <a href="https://github.com/ParsePlatform/Parse-SDK-iOS-OSX">Parse framework implementation</a>.</p><p>Next step was to create unified interface for our “Kits”:</p><pre>@protocol CNISDKKit &lt;NSObject&gt;</pre><pre>+ (void)enableWithConfiguration:(CNISDKConfiguration *)configuration;</pre><pre>+ (instancetype)sharedInstance;</pre><pre>- (void)start;</pre><pre>@end</pre><p>This <em>protocol</em> requires methods to enables <em>Kit</em> and configures it, to start underlying <em>Kit’s</em> tasks and to be able to access the shared instance. Moving further each <em>Kit</em> has it’s own initialization parameters which developer could also pass as a dependency injection during initialization</p><pre>@protocol CNISDKKitConfiguration &lt;NSObject, NSCopying&gt;<br>@end</pre><p>Unfortunately, I haven’t come up with yet with any unified properties or methods for <em>Kit’s</em> configuration objects, but this simple protocol at least gives us type-safety and high-level information about how this object looks.</p><p>Since the only core module should initialize Kits, we created an object that represents a one-to-one relationship between Kit and its configuration</p><pre>@interface CNISDKKitBundle : NSObject &lt;NSCopying&gt;</pre><pre>@property (nonatomic, strong, readonly) Class&lt;CNISDKKit&gt; kit;<br>@property (nonatomic, strong, nullable, readonly) id&lt;CNISDKKitConfiguration&gt; configuration;</pre><pre>+ (instancetype)bundleWithKit:(Class&lt;CNISDKKit&gt;)kit configuration:(nullable id&lt;CNISDKKitConfiguration&gt;)configuration;</pre><pre>@end</pre><p>And added a new property to core configuration — array of kits</p><pre>@interface CNISDKConfiguration : NSObject &lt;NSCopying&gt;<br><strong>. . .</strong><br><a href="http://twitter.com/property">@property</a> (nonatomic, strong, readonly, nullable) NSArray&lt;CNISDKKitBundle *&gt; *kits;<br><strong>. . .</strong><br>@end</pre><p>In the end, we think this approach pretty flexible and easy for developers to integrate our SDK. Lets step aside from coding and next chapter will tell you how we also were able to split our source code.</p><h4>The power of private CocoaPods</h4><p>Since our source code unfortunately not open sourced to everyone we’ve been using private Pods to share the SDK, and eventually, we did almost the same as with code. We split our Podspec into four different.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*HVpbfnZcoqLMkSHBoMG2RA.png" /><figcaption>Podspec’s dependency</figcaption></figure><p>With that approach, our partners have the power of CocoaPods dependency management and opportunity to not pull unnecessary source code.</p><p>In the end, I would like to say that this is not a perfect solution, and maybe you, my reader, know something better — any feedback is greatly welcome!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8067c2e97e9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How we improved iOS release process at conichi]]></title>
            <link>https://medium.com/@antondomashnev/how-we-improved-ios-release-process-at-conichi-549c9d703b27?source=rss-fb738794c2a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/549c9d703b27</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Anton Domashnev]]></dc:creator>
            <pubDate>Mon, 02 May 2016 07:39:43 GMT</pubDate>
            <atom:updated>2016-05-02T07:39:43.606Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve been working for <a href="http://conichi.com/">conichi</a> and currently is leading an iOS development team. Recently we have significantly improved our release process that saves us a reasonable amount of time and lower the human error possibility.</p><p>At the moment our team is working on two iOS applications: <em>guest</em> and <em>merchant</em>, and our <em>SDK</em> that we share with our partners and also use in the <em>guest</em> application. So now when you have the general overview let’s go to the interesting part — evolution of our release process.</p><h3>Back to the days</h3><p>Focusing on <em>guest</em> and <em>merchant</em> applications the initial release process was super simple:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/211/1*IARD8mYBFTJcBszyxYZ8kw.png" /><figcaption>first release steps</figcaption></figure><p>Once we had to debug app store version from the master branch of the <em>guest</em> application and it was a pain to find correct commit we started using github releases for iOS apps as well as for <em>SDK</em>. That helped us a lot to control the code base for each version of our app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*uLiRXHpbnZjVrPmOjZNtGg.png" /><figcaption>second release steps</figcaption></figure><p>Next change in our release flow was forced by a decision to write a release notes for both github release and fabric build. That has been done manually by looking through closed JIRA issues in the specific period of time. That was not a big deal, but eventually it was annoying to look through all issues and create a summary from them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/295/1*vSJZzR4keR73x1cqfhmYtw.png" /><figcaption>third release steps</figcaption></figure><p>As you can see it became 6 steps with a loop on the “push to fabric”. Because if our testers find a bug we need to fix it and repeat all steps again. You can imagine how much time we spent on it.</p><p>Our CI runs test on every PR only on only one simulator and after couple of platform/iOS SDK specific bugs I forced the requirement to run tests on all supported devices before publishing new version to either Fabric or App Store. So eventually all steps that we did to release our iOS apps were:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/1*Qf4k53FTSg7ZqoqGCgI9sQ.png" /></figure><p>This finally drove me crazy and I started looking for something to automate all of these.</p><h3>Nowadays</h3><h4>Fastlane</h4><p>Luckily I read couple of month ago about <a href="https://github.com/fastlane/fastlane">fastlane</a> and it was a good chance for me to become familiar with it. I began with project’s readme and also found very useful this <a href="https://github.com/fastlane/examples">repo</a> with fastfile examples from other teams. Most of the inspiration I took from <a href="https://github.com/artsy/eigen">artsy iOS project</a>.</p><p>Since we have two apps: <em>guest</em> and <em>merchant </em>I ended up with shared fastfile with utilities actions and project specific fastfile for each of the apps. I’m not going to deep into detail of fastfile implementation here, instead I <a href="https://github.com/conichiGMBH/fastlane-examples">open sourced our example</a> with description for the most of lanes inside.</p><h4>Danger</h4><p>This was a great start, but than we faced a problem how to keep <em>CHANGELOG</em> file up to date. And again, recently some cool guys have created a project called <a href="https://github.com/danger/danger">Danger</a>. The purpose of it is to formalize pull request rules for the team. So I’ve created a rule for our pr — it has to contain <em>CHANGELOG</em> file modification if more than 50 lines were modified/added/deleted and if there is no specific flag to skip change log verification.</p><p>In the conclusion I can suggest everyone to try out these tools. I’m pretty sure even if your project does not need these all steps to make a release, anyway it will save you lots of time that you can spend on something interesting and not routine or you can even have a cup of ☕ =).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=549c9d703b27" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The mysterious world of Address Book and Contacts Store in iOS]]></title>
            <link>https://medium.com/@antondomashnev/the-mysterious-world-of-address-book-and-contacts-store-in-ios-f2362797ddd?source=rss-fb738794c2a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/f2362797ddd</guid>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Anton Domashnev]]></dc:creator>
            <pubDate>Wed, 24 Feb 2016 22:41:25 GMT</pubDate>
            <atom:updated>2016-02-28T14:39:15.153Z</atom:updated>
            <content:encoded><![CDATA[<p>Last couple of month I’ve been working on the side project app which tries to replace the native iOS contacts application.</p><p>In the design stage I was pretty excited because I hadn’t had a chance to work heavily with <em>AddressBook</em> framework before. And the second reason was because Apple had recently released <em>Contacts</em> framework in order to replace old fashioned one.</p><p>Because of the app supports iOS version 8.0 and higher, I had to create an adapter protocol to describe class that works with native contacts app data. That protocol describes simple methods:</p><pre>- (void)requestAccessWithCallback:(ADContactsManagerAccessBlock)callback;</pre><pre>- (void)updateContact:(ADContact *)contact withCallback:(ADContactsManagerUpdateBlock)callback;</pre><pre>- (void)addContact:(ADContact *)contact withCallback:(ADContactsManagerAddBlock)callback;</pre><pre>- (void)deleteContact:(ADContact *)contact withCallback:(ADContactsManagerDeleteBlock)callback;</pre><pre>- (void)getContactsWithCallback:(ADContactsManagerGetBlock)callback;</pre><pre>- (void)getContactsCountWithCallback:(ADContactsManagerCountBlock)callback;</pre><p>For iOS version prior to 9.0 I’ve created class to work with <em>AddressBook</em> framework:</p><pre>@interface ADAddressBookFrameworkManager : NSObject &lt;ADContactsManager&gt;</pre><pre>#pragma GCC diagnostic push</pre><pre>#pragma GCC diagnostic ignored “-Wdeprecated-declarations”</pre><pre>- (instancetype)initWithSystemAddressBook:(ABAddressBookRef)addressBook;</pre><pre>#pragma GCC diagnostic pop</pre><pre>@end</pre><p>And another class to use with modern iOS version, that uses <em>Contacts</em> framework under the hood:</p><pre>@interface ADContactsFrameworkManager : NSObject &lt;ADContactsManager&gt;</pre><pre>- (instancetype)initWithSystemContactsStore:(CNContactStore *)contactsStore;</pre><pre>@end</pre><p>I’ve really enjoyed new <em>Contacts</em> framework, because working with objects was much easier, less buggy and faster to code rather then with C style methods in <em>AddressBook</em> framework. Things went worse when our QA team found really strange bug related to updateContact method.</p><p>Let’s go deeper With new <em>Contacts</em> framework logic to update contact object in native Contacts app is pretty simple unless you want to remove any property value e.x. organization name or job title. Regarding Apple’s documentation it’s easy:</p><pre><a href="http://twitter.com/note">@note</a> To remove properties when saving a mutable contact, set string properties and array properties to empty values. Set other properties to nil.</pre><p>So my way to do it was to fetch <em>CNContact</em> object to update in the beginning:</p><pre>CNContactFetchRequest *request = [[CNContactFetchRequest alloc] initWithKeysToFetch:@[all keys that can be updated]];</pre><pre>request.predicate = [CNContact predicateForContactsWithIdentifiers:identifiers];</pre><pre>CNContact __block *foundContact = nil;</pre><pre>NSError *fetchError = nil;</pre><pre>[self.contactsStore enumerateContactsWithFetchRequest:request error:&amp;fetchError usingBlock:^(CNContact *_Nonnull contact, BOOL *_Nonnull stop) {<br>    foundContact = contact;<br>    if (stop) {<br>        *stop = YES;<br>    }<br>}];</pre><p>Create a mutable copy of the found instance to assign empty string for the string property we want to remove:</p><pre>CNMutableContact *updatedFrameworkContact = [foundContact mutableCopy];<br>updatedFrameworkContact.jobTitle = @””;</pre><p>And then we just need to save this update contact in the store:</p><pre>CNSaveRequest *updateRequest = [CNSaveRequest new];<br>[updateRequest updateContact:updatedFrameworkContact];<br>NSError *error;<br>[self.contactsStore executeSaveRequest:request error:error];</pre><p>And suddenly it returns mysterious error:</p><pre>Error Domain=CNErrorDomain Code=500 “(null)” UserInfo={NSUnderlyingError=0x138066570 {Error Domain=ABAddressBookErrorDomain Code=0 “(null)”}}</pre><p>Thanks Apple, this shows us how the error message can be <strong>”useful”</strong>. I spent a lot of time to figure out the problem: looking on my code, googling, searching on stackoverflow — nothing. Probably I didn’t find anything because the framework was still young and there were not many questions and problems had been discussed. The problem becomes even more mystic because it only appears on device and only when update value to empty string.</p><p>Anyway after one day of researching I’ve unfortunately ended up to get back to <em>AddressBook</em> framework since it does not have such problem.</p><h4>But it has another problem…</h4><p>Things went well for a couple of weeks but then our QA team created a task that after succeeded sync the app needs to be restarted to apply changes. I started to check what can cause this issue went right to my <em>ADAddressBookFrameworkManager</em> class. After debugging I found unexpected behavior for me. If you update any person in native contacts app, current instance of <em>ABAddressBookRef</em> will return old data in <em>ABRecordRef</em> that represents updated contact.</p><p>Again I didn’t find anything similar on stackoverflow. I remember that I saw a method which the app can use to handle updates in <em>ABAddressBookRef</em>.</p><p>I implemented that external changes callback in my manager:</p><pre>ref = ABAddressBookCreateWithOptions(NULL, &amp;error);<br>ABAddressBookRegisterExternalChangeCallback(ref, addressBookChanged, (__bridge void *)(self));</pre><pre>…</pre><pre>void addressBookChanged(ABAddressBookRef addressBook, CFDictionaryRef info, void *context) {</pre><pre>…</pre><pre>}</pre><p>Well that looks awesome and it even has something called info but unfortunately according the documentation:</p><p>The info argument may eventually contain information describing the change. Currently it will always be NULL.</p><p>Ok Apple very useful again. Eventually I came up with idea to create new instance of <em>ABAddressBookRef</em> when the manager receives that callback. This finally solved the issue and new instance returns up to date contacts information.</p><pre>void addressBookChanged(ABAddressBookRef addressBook, CFDictionaryRef info, void *context) {</pre><pre>TUAddressBookFrameworkManager *manager = (__bridge<br> TUAddressBookFrameworkManager *)context;</pre><pre>manager.addressBook = ABAddressBookCreateWithOptions(NULL, NULL);</pre><pre>}</pre><h4>Conclusion</h4><p>Even after that strange issue in <em>Contacts</em> framework, I really like that finally we can work with objects. Everything becomes much easier. And when Apple releases update with fix, I’ll definitely get back to it.</p><p>Also at the moment I started that project I didn’t find any third party library to wrap both <em>Contacts</em> and <em>AddressBook</em> frameworks and I developed the solution by myself. I think this also can be interesting for other developers and I’m going to release it in open source very soon. You can receive an update following me on <a href="https://github.com/Antondomashnev">Github</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f2362797ddd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>