Generic View Controllers with Storyboards
Feb 5, 2021, 1:10 PM
Trying to use storyboards with generic view controllers as always been problematic. The problem is the storyboard also encodes the class of the view controller for each “scene”. But you don’t know the class beforehand...
Feb 12, 2020, 10:40 AM
Swift’s Codable is great, but sometimes the type-safety can get in the way. There are cases when decoding JSON where you don’t know beforehand what is it that you are decoding.
In my case, the JSON had a type field that...
Splitting Your Xcode Project into Modules
Feb 6, 2020, 9:08 AM
Update on 2020-03-05
Apparently the -undefined dynamic_lookup flag I mention at the bottom of this post is incompatible with bitcode. If you use that flag on a dynamic framework that has bitcode enabled you’ll get a build error with...
Jan 7, 2020, 10:24 AM
Swift Aveiro’s 2020 event was just announced and I thought now would be a good time to convert my workshop from last year’s event to a blog post.
The workshop was divided in two parts: working with pointers and interacting with...
Sep 18, 2019, 6:30 AM
Undoubtedly one of the biggest features developers need to tackle for iOS 13 is Dark Mode. Needless to say I’ve been hard at work to bring that to Secrets. Not only that but, since I’m reviewing all app screens I’m also adding...
Thoughts on WWDC 19
Jun 7, 2019, 11:10 AM
I’ve always enjoyed the days after a WWDC Keynote. It’s a mix of excitement and anxiety over the new refinements/features/frameworks and all the learning and work those entail. This year is no different… except those feelings...
Search Scopes in Xcode
Apr 3, 2019, 10:10 AM
On first use, Xcode’s Find In Project… feature may appear basic. After all it fits on this little rectangle space inside Xcode’s UI.
But beneath that apparently simply interface there’re a ton of features besides a...
Late Responders — Sidestepping The Responder Chain
Mar 13, 2019, 12:07 PM
The responder chain is a simple but powerful concept present in any Cocoa/Cocoa Touch app. Simply put, the responder chain is a linked list of responders (most commonly views and view controllers) to which an event or action is applied....
Feb 14, 2019, 10:53 AM
While writing some unit tests I needed to assert a notification did not get sent after calling a method.
The usual pattern for testing the sending of notifications is to use the existing XCTNSNotificationExpectation like so:
Xcode: Comparing Build Settings
Jan 31, 2019, 5:36 AM
❡ I’ve been using Xcode since about 2004, I believe I started on version 1.5. It’s easily the IDE I’ve worked with the most… and probably the app I’ve spent more time on.
Other IDE’s I’ve used include...
iPad Pro — First Impressions
Jan 5, 2019, 3:08 PM
After spending a few weeks with the new iPad Pro I felt it was time to write down my first impressions. So lets get to it!
The Good The machine is definitely fast, which shouldn’t be a surprise based on all the reviews but it is....
Dec 17, 2018, 9:59 AM
Nowadays most of our asynchronous code is handled via callbacks. But there are times where it’s a lot easier to simply wait for an asynchronous task to finish. My latest example of this was an NSOperation subclass that needed to do...
The 2018 iPad Pro
Nov 14, 2018, 10:36 AM
I’m not an iPad user. I have a 4th generation iPad I won in a hackathon years ago but I’ve never actually used it… It lives its life as a test device for Secrets and, occasionally, as a canvas for my 3 year old son’s...
Oct 9, 2018, 7:38 AM
When Apple introduced iOS 7 and its flat design, it also changed the animations throughout the system to give UI elements a more natural feel when they move. They did this by changing the animation’s timing curve to a spring, instead...
NSOperation KVO Pitfall
Jun 1, 2018, 4:43 AM
Recently, I encountered a bug while testing Secrets on one my older test devices running iOS 9. Apparently one of my NSOperation subclasses never finished on this device, and only on this device.
NSOperationQueue relies heavily on...
The Developers Union
May 22, 2018, 5:20 AM
A few days ago The Developers Union launched its first campaign advocating for free trials on the App Store. I want to acknowledge the 4-person team behind it for taking the initiative.
If we, developers, want to do something about...
Taming Build Variants With Xcode Configuration Files
Apr 10, 2018, 7:01 AM
Currently, Secrets has six different build configurations: Debug, Beta, Staging, Testing, App Store and Setapp1. All of these use a different set of parameters to customize the build. For example, whether or not In-App Purchases are...
Rate Limiting Using a Token Bucket in Swift
Mar 16, 2018, 6:30 AM
This week I had to rate limit the calls I was making to a web service. In the past I’ve done this successfully with a Timer, but it’s still a bit cumbersome to schedule/unschedule the timer to keep it from ticking when...
Managing iOS UI Testing Fixtures
Oct 22, 2017, 1:31 PM
A common problem when developing UI tests for iOS (and tests in general) is controlling the state before running each test. Having a well known and fixed environment to run tests is paramount.
If a test fails sporadically due to an...