Testing the presenter using PromiseKit

The MVP pattern in developing mobile applications is a fairly simple way to offload the ViewController and take out some of the logic into the presenter. The presenter starts to acquire a logic that is easy to test.
 
Let there be a screen MelodyListViewController showing the list of melodies. He has a presenter MelodyListPresenter , which tells the ViewController what to show. These presenter will take from the service MelodyService . MelodyService It is a wrapper over a database and an api client that downloads melodies. If the network is available, the service takes the ...
+ 0 -

And in your iOS applications IBOutlet already private?

And in your iOS applications IBOutlet already private?
 
 
You probably used Storyboard or XIB for layout of interfaces? It's fine to make code out of code, but sometimes it's much easier to understand how some of the interface components are arranged by seeing it, and not having read it. In this entry, I want to discuss the necessity of using the modifier private for IBOutlet. Enter , you are welcome.
And how do you generally prefer to ask IBOutlet?
@IBOutlet private weak var someLabel: UILabel!
@IBOutlet weak private var someLabel: UILabel!
@IBOutlet private weak var someLabel: UILabel?
@IBOutlet weak private var someLabel: UILabel?
@IBOutlet private ...
+ 0 -

Very Special Event: how we watched the presentation of Apple and what we think about it

Very Special Event: how we watched the presentation of Apple and what we think about itFrom the presentation of Apple, which was due on Sept. 1? nothing much was expected: three new iPhone models and a new version of Apple Watch - they knew about these new products in advance. Nevertheless, we in Avito could not miss this event. When a couple of days before the Very Special Event, we realized that a company of those who did not want to watch the broadcast on their own was formed, then they decided to invite our friends - iOS developers from other companies. View the event together, discuss new items (and how they affect the development of applications for iOS), eat shaurma, drink ...
+ 0 -

RxSwift part 1

RxSwift part 1
 
Kind time of the day, Khabarovsk. In this series of articles, I would like to talk about reactive programming, namely, the
framework.  
RxSwift . Habré and the network had articles on RxSwift, but, in my opinion, they are too difficult for beginners. Therefore, if you begin to comprehend reactive programming in iOS, then I ask under the cat.
tells us. Wikipedia .
 
In other words, in the case where we program in an imperative style, we write in the code a set of instructions that must be executed sequentially. The reactive style of programming follows several other concepts. With the reactive ...
+ 0 -

Control over resources. Set up SwiftGen

Control over resources. Set up SwiftGenProbably, in every big iOS-project - long-livers you can come across icons that are not used anywhere, or access localization keys that have not existed for a long time. Most often, such situations arise because of inattention, and the best cure for inattention is automation.
 
In the iOS-command HeadHunter we pay much attention to automation of routine tasks, which the developer can face. With this article, we want to start a series of stories about the tools and approaches that simplify our daily work.
 
Some time ago we managed to take the application resources under control with the help of ...
+ 0 -

Theory Universal Links

Theory Universal Links
 
 

Introduction


 
WWDC15 - Apple announces the move to Universal Links. Their sense is prohibitively simple - to send a user to the application if it goes to the page of the site that the application supports. This is most often used in letters that are sent after registration to confirm e-mail. Thus, Universal Links eliminates the need for the user to return to the application on their own - which is good for both user experience and statistics.
 
Apple Developer . When registering, make sure to connect the Associated Domains. If the App ID is already registered, simply go to the next ...[/h]
+ 0 -

Component architecture of UI in iOS-application

Component architecture of UI in iOS-application  
 
Hello, Habr!
 
 
My name is Valera, and for two years now I've been developing an iOS app in the Badoo team. One of our priorities is a code that is easily followed. Because of the large number of new features that come to our hands every week, we need to first think about the architecture of the application, otherwise it will be extremely difficult to add a new feature to the product without breaking existing ones. Obviously, this also applies to the implementation of the user interface (UI), regardless of whether it is done using code, Xcode (XIB), or a mixed approach. In this article, I will describe ...
+ 0 -

What's new in AppCode 2018.2

In this release: more new refactorings, better autocompletion, support for databases from DataGrip and even support for the Touch Bar. In more detail - under the cut.
 
 
What's new in AppCode 2018.2
 
on the site .
 
 

Touch Bar


 
Now it works in AppCode:
 
 

 
 

Version control


 
As always, set of improvements added to the IntelliJ platform, and all of them are now available in AppCode.
 
 

The user interface is


 
The most visible of the changes is the icons completely redesigned in a single style:
 
 

 
 
About the process of changing icons can be read ...[/h][/h][/h]
+ 0 -

Custom button with simple animation on Swift. Example 1

Hello Habr! In this article, I'll show you how to create your custom button in Xcode with a simple animation using the Swift language. Compatibility: iOS8 or higher.
 
 
This is just an example, so all kinds of permissions, such as private and so on, are not used here. It is also assumed that you are already familiar with the basics of Xcode and Swift and can easily create an initial "Single View App" project in an Xcode environment, this step will also be omitted.
 
 
The button will look like this:
 
Custom button with simple animation on Swift. Example 1 The normal ...
+ 0 -

How to test hypotheses and earn on Swift using split tests

How to test hypotheses and earn on Swift using split tests

 
Hello! My name is Sasha Zimin, I work as an iOS developer in the London office Badoo . Badoo has very close interaction with product managers, and I have taken over from them the habit of checking all the hypotheses that I have about the product. So, I started writing split tests for my projects.
 
 
The framework, which will be discussed in this article, was written with two goals. First, in order to avoid possible errors, it is better that there is no data in the system of analytics than the data that is incorrect (or even data that can be misinterpreted and broken up by firewood). Secondly...
+ 0 -