Skip to main content

Posts

Showing posts from January, 2017

UIApplication.setAlternateIconName - Dynamically change the app's icon

Use this method to change your app's icon to its primary icon or to one of its alternate icons. You can change the icon only if the value of the supportsAlternateIcons property is true.

You must declare your app's primary and alternate icons using the CFBundleIcons key of your app's Info.plist file. For information about how to configure alternate icons for your app, see the description of the CFBundleIcons key in Information Property List Key Reference.

Apple Developer

WKWebView open with Cookie set

WKWebView * webView = /*set up your webView*/
NSMutableURLRequest * request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://example.com/index.html"]];
[request addValue:@"TeskCookieKey1=TeskCookieValue1;TeskCookieKey2=TeskCookieValue2;" forHTTPHeaderField:@"Cookie"];
// use stringWithFormat: in the above line to inject your values programmatically
[webView loadRequest:request];

StackOverflow

Saving you bandwidth when loading images through machine learning

To help everyone be able to see the beautiful photos that photographers share to Google+ in their full glory, we’ve turned to machine learning and a new technology called RAISR. RAISR, which was introduced in November, uses machine learning to produce great quality versions of low-resolution images, allowing you to see beautiful photos as the photographers intended them to be seen. By using RAISR to display some of the large images on Google+, we’ve been able to use up to 75 percent less bandwidth per image we’ve applied it to.

Google

Instance Methods are Curried Functions in Swift

An instance method in Swift is just a type method that takes the instance as an argument and returns a function which will then be applied to the instance.

class BankAccount {
    var balance: Double = 0.0

    func deposit(amount: Double) {
        balance += amount
    }
}

We can obviously create an instance of this class and call the deposit() method on that instance:

let account = BankAccount()
account.deposit(100) // balance is now 100

So far, so simple. But we can also do this:

let depositor = BankAccount.deposit
depositor(account)(100) // balance is now 200

Ole Begemann

Fabric and Crashlytics is joining Google

Today we (Twitter) enter the next chapter for Fabric and are pleased to announce that we've signed an agreement for Fabric to be acquired by Google and for our team to join Google's Developer Products Group, working with the Firebase team.

Fabric customers: there's no action you need to take in order to keep using these products. When the acquisition is complete, Google will begin providing Fabric, Crashlytics, Answers, and associated beta products.

Twitter

AsyncDisplayKit iOS UIView

Performance Gains

AsyncDisplayKit's basic unit is the node. An ASDisplayNode is an abstraction over UIView, which in turn is an abstraction over CALayer. Unlike views, which can only be used on the main thread, nodes are thread-safe: you can instantiate and configure entire hierarchies of them in parallel on background threads.

To keep its user interface smooth and responsive, your app should render at 60 frames per second — the gold standard on iOS. This means the main thread has one-sixtieth of a second to push each frame. That's 16 milliseconds to execute all layout and drawing code! And because of system overhead, your code usually has less than ten milliseconds to run before it causes a frame drop.

AsyncDisplayKit lets you move image decoding, text sizing and rendering, layout, and other expensive UI operations off the main thread, to keep the main thread available to respond to user interaction.

Advanced Developer Features

As the framework has grown, many features have be…

Throwing Auto Layout Out the Window

This Swift Language User Group (SLUG) talk discusses Auto Layout, Apple’s recommended technology for building UIs on their platforms. LinkedIn software engineer Nick Snyder describes how the company uses a lot of Auto Layout, but after running into some frustrating performance problems, decided to build and open-source their own solution called LayoutKit. Not only is LayoutKit much faster than Auto Layout, but it is also easier to use because layouts are declarative, immutable, and thread-safe.

realm.io
LayoutKit.org

Yes, we can: 99% crash-free users

Check our latest Crashlytics stats: Yippie 🙋

And yes, we are hiring:

Senior iOS-Developer (f/m)Senior Backend Engineer (f/m)

WeltN24 GmbH

Spring: Introducing Kotlin support in Spring Framework 5.0

Following the Kotlin support on start.spring.io we introduced a few months ago, we have continued to work to ensure that Spring and Kotlin play well together. One of the key strengths of Kotlin is that it provides a very good interoperability with libraries written in Java. But there are ways to go even further and allow writing fully idiomatic Kotlin code when developing your next Spring application. In addition to Spring Framework support for Java 8 that Kotlin applications can leverage like functional web or bean registration APIs, there are additional Kotlin dedicated features that should allow you to reach a new level of productivity.

That’s why we are introducing a dedicated Kotlin support in Spring Framework 5.0 M4, and I would like to summarize in this blog post the features that are designed to make your developer experience seamless when using these technologies together.

spring.io

Pattern: Riblets vs. VIPER

Engineering the architecture behind Uber's new rider app

Not being held back by our extensive codebase and previous design choices gave us the freedom where we otherwise would have made compromises. The outcome is the sleek new app you see today, which implements a new mobile architecture across both iOS and Android. Read on to learn why we felt the need to create this new architecture pattern, called Riblets, and how it helps us reach our goals.

The platforms share:

Core architectureClass namesInheritance relationships between business logic unitsHow business logic is dividedPlugin points (names, existence, structure, etc.)Reactive programming chainsUnified platform components
Each Riblet is made up of one Router, Interactor, and Builder with its Component (hence the name), and optional Presenters and Views. The Router and Interactor handle the business logic, while the Presenter and View handle the view logic.

Uber