Four years ago I blogged about the oddities of leap days.
App Extensions tend to somewhat problematic when it comes to conditional compilation, because there are methods and functionality that are not available in app extensions. For example, app extensions don’t have a
UIApplicationinstance, and so the
UIApplication.sharedproperty is marked as
In one of the online communities I participate in, another developer recently asked the question:
I had an experience with a company and a recruiter recently that I wanted to share with you as a sort of “cautionary tale” about When Recruiting Goes Horribly Wrong.
I love to browse through Github and see the sorts of frameworks people build. Pretty frequently I come across repositories that make a good effort to provide a cross-platform experience by offering iOS, watchOS, and tvOS versions. Sometimes there’ll even be the odd macOS version too!
In the previous post, we saw how the
SWIFT_ACTIVE_COMPILATION_CONDITIONSbuild setting can inject values in to our .swift files that we can use to conditionalize code depending on our active SDK and/or architecture.
When developing an app or a library, it’s pretty common that at least once in the course of development, you’ll need to conditionalize compilation of your code. Maybe you’ll be accounting for a bug in the operating system where things that don’t work quite the same on your device as they do on the simulator. Or perhaps you’ll want to simply exclude code from your simulator builds because the simulator simply doesn’t have that functionality (like invoking the camera).
In my conversations with developers, I’ve heard a pretty common theme from them that “Core Data is hard” or “Core Data is buggy” or “I could never get it to work right and gave up on it”.
You should take a few minutes and read this article by Rands on “the worst seven minutes”.
Way back in the day, I was fairly obsessed with triangles. I really enjoyed my trigonometry class in high school. In addition to being interesting, it was the impetus for me learning to code. I got a little tired of doing all the myriad of
tan()functions to solve the triangles needed by my homework, so I decided to write an app for my TI-83+ graphing calculator to do it all for me. The app would ask you for the three things you knew about the triangle (almost any combination of sides or angles) and give you back all the rest of the information (including perimeter and area). I still have that source code.