comment 1

#32 Errorify String

Swift.Error Swift introduces pattern of throwing errors, to propagate error conditions in a program. Errors are represented by types that conform to empty Error protocol, usually enum types. If you want to propagate an error condition in your app, you can use your AppError enum for that: The throws keyword says that a function can propagate an error, so it…

comments 6

#31 Getting started with Alexa on iOS

Happy New Year 2017! 🍾🎉 January is a special time for swifting.io, as we will soon celebrate the first year of our blogging adventure 😁. Today I would like to give you a brief introduction into Amazon Alexa Voice Assistant service. You might remember our first steps with SiriKit, where we were not so happy about it 😜. Apple has…

comment 0

#30 Cyclomaticly Complex Settings View Controller

Simple screens evolve In every project simple screens can happen. Let’s think for example of a simple Settings screen. Customer wanted a Settings screen on which a user would be able to Set Option 1 and 2 and to Logout from the application. It seemed so simple so developers used a UITableView with 1 section, hard-coded text displayed in cell…

comment 0

#29 An alternative to if let and guard let

It’s brilliant when you can work with people smarter (or even a lot smarter) than you! You can learn so much from them. And then write about the things you’ve learned 🙃. if and guard let Have you ever been tired of repeating if let or guard let statements, to perform certain operations, that should be performed only if a…

comment 0

#28 Better CoreData with Swift Generics

In Issue #25 I have been talking about building a modern CoreData service using NSPersistentStoreContainer. This resulted in a lot of boilerplate code removed and a simpler API. Now, if you are using architectures like VIPER, VIP (see more in Issue #24) or simply ensuring immutability of your models, you are probably wrapping your CoreData's NSManagedObject subclasses into structs of…

comments 8

#27 Localize your strings swiftly

Hey, long time no see! It’s because we’re working on two important issues, stay tuned! This issue will be short and it will show you how you can define and access localized version of your strings in a swift manner! NSLocalizedString In Xcode we can easily create a Localizable.strings file in which one can define pairs of key and value…

comment 0

#26 SwiftLint, SonarQube and CheckMarx… what else?

Today we would like to talk about news from SwiftLint and also look at different static analyzers frameworks like: SonarQube Checkmarx Concentrating on some basics, best practices, tips and just personal feelings about each one. Important: if you would like to learn more about SwiftLint I recommend visiting our previos post about SwiftLint. Ready? Let’s start! SwiftLint A tool to…

comments 8

#25 Core Data in iOS10: NSPersistentContainer

Xcode 8 is here if you have not peeked at any of betas yet, you will find all kinds of new stuff. There is Swift 3 with major changes, there are new frameworks like SiriKit and there are enhancements to existing ones like notifications. We have also received simplified Core Data stack in form of NSPersistentContainer that does heavy part…

comments 7

#24 Architecture Wars – A New Hope

A long time ago in a galaxy far, far away… Or maybe not that far away… Have you ever had a feeling, as I have had many times, that the design of your app seemed so brilliant at first, but suddenly adding more and more features to it made your source code more complicated and eventually, unmaintainable. Presumably you hadn’t…

comments 8

#23 Notifications in iOS 10

iOS 10 gave us new rich notifications with a lot more functionalities comparing to old ones. We can view photos and videos or respond to a message right from our notifications. In this post I would like to focus on them, show you some code snippets, examples and good practices. I hope it will be helpful for development in your…