Developear
Software   Twitter   Contact   RSS  



Speeding Up Compile Times of Swift Projects
December 30, 2016

There are a couple of long-winded articles around about how to do this specific technique, however I have not seen anything quick and to the point.

The first thing you are going to want to do is turn on Whole Module Optimization in Debug (by default, it is only on in Release).

Here are the optimization settings:

Before:



After:



The next thing you want to do is specify -Onone in Other Swift Flags in Debug like so:



This will allow Whole Module Optimization compile the whole module at once while also not doing any optimization of the code.

By using this technique, I have seen...

Read more

RemindBot
October 15, 2016

I recently released a new open source project that allows you to automatically comment on stale GitHub pull requests - it's called RemindBot.

Check it out and let me know how you like it!

Phoenix
January 31, 2016

I released an Xcode plugin in the InitializeMe repo - called Phoenix.

This allows you to select a couple properties and create a custom initializer filling out those properties. My main uses for this are for creating initializers for classes that only hold data, and for constructor based dependency injection.

Phoenix supports both Objective-C and Swift.

Installation instructions are available on the GitHub repo.

If you do not want to install a custom Xcode plugin - you can simply download the Cocoa app (currently called InitializeMe), in the same repo.

Preventing subclassing in Objective-C
January 9, 2016

For those of you still using Objective-C, I found a cool attribute that allows you to basically define final classes.
The attribute is __attribute__((objc_subclassing_restricted))

For example:

__attribute__((objc_subclassing_restricted))
@interface MyClass : NSObject


The compiler now will prevent any subclassing of MyClass!

Fission
December 22, 2015

I opened source a framework called Fission the other day.

The best way for me to describe it, and the reasons for it are on the Github page, so I will simply quote it here:
Mostly an attempt to consolidate my most used/useful functions/operators into one place that has all of these things, as well as provide more flexibility than similiar frameworks.
Feel free to use the framework and let me know what you think!

My case for garbage collection in Swift
December 4, 2015

Now that Swift thas been open sourced - the ability to make a backend in Swift is much most accessible (since you can now run it on Linux).

Something I think Apple should do, is implement garbage collection for Swift. Even though the recent history of Apple with regards to garbage collection, didn't end well for Objective-C.

First here are the higher level reasons I think a garbage collector should be added by Apple:
  1. Memory leaks become a much larger problem in server side software
  2. I believe someone will have a fork of Swift that implements garbage collection
The reason I think memory...

Read more

Common Model Antipattern
November 19, 2015

In the vast majority of native client side software, it is common to create client-side model objects from a server representation (most commonly JSON).

This is the flow that see the most:
  1. Request an API endpoint and download JSON response
  2. Convert JSON to a Dictionary
  3. Initialize/update a model directly with the dictionary itself
The antipattern I see here, is number 3.

Here are the reasons I believe this to be a problem:
  1. Ties creation of your model to a specific dictionary format, and at some level the API endpoint (and clients have to know this fact AND the format)
  2. Creates...


Read more

Steps+ 2.0
November 12, 2015

I released a new version of Steps+.

What I added:

1. Floor counting
2. Themes
3. Support for iPhone 6s and iPhone 6s Plus

This was long overdue, let me know how you like it!

Functions As Factories
November 6, 2015

I wrote something over at the Cocoa Tumblr blog, check it out.

Functional Swift Conference Videos
January 24, 2015

The videos for the Functional Swift Conference are out now here.


Page 1 of 2 Next page


Copyright 2016 Kenny Ackerson