This is the #11 article. I now work on Ruby project in my work. It’s interesting to know the difference between Swift and Ruby.

I read a book called REMOTE. I think it’s worth reading if you’d like to improve your work style.

This is a Swift3 migration in Carthage by @ikesyo. Take a look at this PR for learning. In addition, you can check how to use Realm notifications from the PR in real projects.



Article

Map, It iterates, applies, transforms, collects. It’s your functional best friend, map.

It iterates, applies, transforms, collects. It’s your functional best friend, map.

public func map<T>(_ transform: (Iterator.Element) throws -> T) rethrows -> [T] {


Beyond Constraints: Crafting Advanced iOS Animations with Auto Layout

How we think about design at Savvy Apps encouraged us to develop a new animation technique that mixes old-school view animations with Auto Layout. Our technique bypasses the restrictions placed on developers when they try to animate using Auto Layout. Most Auto Layout animation guides say basically the same thing: update constraints and animate. For more advanced animations though, just updating the constraints would be nearly impossible.


Using ‘swift package fetch’ in an Xcode project

Up until now, the Cocoa with Love git repositories have included their dependencies as “git subtrees” where each dependency is copied and statically hosted within the depender. I want to replace this arrangement with a more dynamic dependency management while remaining totally transparent to users of the library.


The iOS App Life Cycle

What happens when a user clicks on an app to launch it? How does tapping on an icon from the home screen actually get to my code running in a ViewController? Why is it useful to know what the App Life Cycle is? Well, when you know how a tool is working underneath the hood, you’re able to make informed decisions about how to best use it!


Using the Speech Recognition API in iOS 10

Siri has been a core feature of iOS since it was introduced back in 2011. Now, iOS 10 brings new features to allow developers to interact with Siri. In particular, two new frameworks are now available: Speech and SiriKit.


Clean Code for Multiple Storyboards

Even though storyboards have been around iOS5, many developers are reluctant to use them, specially in large projects. Though I prefer using storyboards, I’ve to admit developers despising storyboards aren’t totally wrong.


Classes That Conform To Protocols

The other day, someone asked how to have a variable which stores a UIView that also conforms to a protocol. In Objective-C, you would simply write UIView. In current Swift, you can’t write something like that. This posts shows a two workarounds.


Going back to the roots

As Roy Marmelstein said in his recent presentation at dotSwift - “We love to be excited”. Can not agree more. When we read a blog post that describes the concept or architectural pattern that is somewhat new for us and feels exciting we tend to accept it as something good. We can go really far away this rote and sometimes we don’t notice that we already have all the tools to solve the problems they address. For iOS developers this tool is a framework that we inevitably use every day - UIKit.


Challenge: Filtering associated value enumeration arrays

Since I didn’t really get very far with this, I’m throwing this out there as an open challenge. Can you come up with a parsimonious, readable, and less horrible (I was going to say “more elegant”, but c’mon) way to approach this? I suspect my first attempt may be the best one, which would make me sad.


Introducing Lottie

Today, we’re happy to introduce our solution. Lottie is an iOS, Android, and React Native library that renders After Effects animations in real time, and allows native apps to use animations as easily as they use static assets. Lottie uses animation data exported as JSON files from an open-source After Effects extension called Bodymovin. The extension is bundled with a JavaScript player that can render the animations on the web. Since February of 2015, Bodymovin’s creator, Hernan Torrisi, has built a solid foundation by adding features and improvements to the plugin on a monthly basis. Our team (Brandon Withrow on iOS, Gabriel Peal on Android, Leland Richardson on React Native, and I on experience design) began our journey by building on top of Torrisi’s phenomenal work.


An Introduction to the Swift Package Manager

The Swift Package Manager will help to vastly improve the Swift ecosystem, making Swift much easier to use and deploy on platforms without Xcode such as Linux. The Swift Package Manager also addresses the problem of dependency hell that can happen when using many interdependent libraries. It is important to note that as of Swift 3 the Swift Package Manager only compiles for host platforms. In other words, for now you won’t be able to build or consume packages for for iOS, watchOS, or tvOS. Time to get started!


Setting up SwiftLint on Travis CI

SwiftLint is a great tool for enforcing code conventions in your Swift projects. You can use it locally while you develop, but having it run as part of your continuous integration process makes sure that any contributions made to your project are checked for good code style too.



Slide

Realm: How I Learned to Love Databases Again

iOS provides two system level database frameworks: SQLite and Core Data. While both of these frameworks are great at what they do, they both have high learning curves and require a fair amount of boilerplate code in order to get started. Realm is a new database framework wholly designed from scratch to make persisting data easier than that. In this iOS Conf SG talk, Tim Oliver introduces Realm and contrasts it to his experiences with SQLite and Core Data. He also demonstrates how to get started coding with it, best implementation practices, and how to migrate an existing app.


Operators and Strong Opinions

Swift operators are flexible and powerful. They’re symbols that behave like functions, adopting a natural mathematical syntax: for example, 1 + 2 versus add(1, 2). However, it’s important that you treat them like potential Swift Kryptonite. In this talk from the Swift Language User Group, Erica Sadun discusses why your operators should be few, well-chosen, and heavily used. There’s even a fun interactive quiz! Play along with “Name That Operator!” and learn about an essential Swift best practice.


Rubik’s Cubes and Genetic Algorithms in Swift

There’s this little, fun side project that I built during a weekend. It’s a little Rubik’s Cube library in Swift, in a genetic solver algorithm. I’m by no means an expert in anything related to this field. I probably know more about the biology side of things, and the computer science side of things, and that’s not saying much. I found it incredibly fun, and really, really fascinating. I would love to share that with you today.


Creating the Future

At the Omni Group, we’re working hard to make iPad Pro the best platform it can be. When Tim Cook introduced iPad Pro last September, he said: “iPad is the clearest expression of our vision of the future of personal computing: a simple, multi-touch piece of glass that instantly transforms into virtually anything that you want it to be.” I still find that vision as compelling as when we decided to go “iPad or Bust!” when iPad was introduced in 2010, and if we truly want to achieve that vision we still have a lot of work to do to bring more of the power of the desktop to that transforming piece of glass.



Github

malcommac/Hydra

Promises & Await - Write better async code in Swift

trill-lang/trill

A simple, type safe, compiled language inspired by (and written in) Swift

krishnads/DynamicTypeSupportInSwift

An easy control which support dynamic typing for both system and custom fonts. Dynamic type is changing the font size of your app when user changes the font size of system from the settings.

fastred/IBAnalyzer

Find common xib and storyboard-related problems without running your app or writing unit tests. http://holko.pl

tarunon/Instantiate

Type-safe Interface Builder protocols.

AlwaysRightInstitute/mod_swift

Write Apache Modules in Swift! http://mod-swift.org

oarrabi/Guaka

The smartest and most beautiful (POSIX compliant) Command line framework for Swift 🤖 http://getguaka.com

ninjaprox/NVActivityIndicatorView

Collection of awesome loading animations

netguru/ResponseDetective

Sherlock Holmes of the networking layer.



Random

Scaling open source communities

Not too long ago I started an open source project called fastlane. Just a month after publishing, it had 1000+ stars on GitHub and was beginning to get used by lots of serious tech companies around the world. Soon I was the sole maintainer of a project getting 10+ PRs/day, and spending 8+hrs/day reviewing PRs and replying to questions on GitHub. This is the story of some of the challenges I faced when scaling the project to where it is today: a OSS project stewarded by Twitter and now Google, with over 12k commits, 13k stars, 500+ contributors, and one of the top 25 most active open source projects on GitHub (spoiler alert: I didn’t do it alone).


Natural Swift

Natural Swift is a completely free 75-minute video that teaches you three fundamental techniques that help you write natural, idiomatic Swift – Swift the way it was meant to be written.


Computer Scientist’s Trivia

It is crucial for programmers to understand how long a certain operation takes in and out of a computer. For example, fetching a word from cache, memory, disk, and from other computers. Inspired by Teach Yourself Programming in Ten Years, I would like to discuss this in a little more detail. (Most information is taken from here)


requestReview(): Tells StoreKit to ask the user to rate or review your app, if appropriate.

This is a new API for reviwing your app. Keep in mind that append the query parameter action=write-review to your product URL..


A Little Local Project

When people ask me what I do, I tell them I’m a stay-at-home mom. I say it quickly, hoping the conversation will be whisked along to something else before my husband can interject—as he typically does—with “and she also makes apps.” At that point I blush and explain that I don’t really know what I’m doing and no, I can’t really show them anything I’ve made.


stuffwithstuff

This is the personal domain of me, Bob Nystrom. Here’s a bit about me, or at least the subset of me that exists on the web:



Podcast

15. Not Invented Here

Caleb and Sam from Runtime join Chris and Soroush to talk about “Not Invented Here” and how we approach project dependencies.


Episode 129 – Dangling Participles

This week we follow up on Apple’s record quarterly results. We also follow up on MacBook Pro Touch Bar models being banned in exams, 32-bit iOS apps and replacing Air Play. We discuss Apple possibly adding Arm chips to Intel based Macs. Gitlab’s data loss is explored. Picks: Linea, Google Chrome iOS browser opensourced and Google Translate.



If you have any questions and feedbacks about a kind of new Swifty week, feel free to ask me :+1: You can catch me on Twitter and Github.

Have a lovely week <3