Xcode Device Database

When new device models are announced, one of the things that applications that identify what device they are running on need to do is update their model to device name mapping. When referring to device model, we are not talking about the model property on UIDevice, rather the underlying device model Apple assigns to each of its devices. To get the model, you use the kernel via uname: #import <sys/utsname.h> struct utsname sysInfo; if (uname(&sysInfo) == 0) { NSString *model = @(sysInfo....

Using Multi-Platform Projects

If you create a reusable library for Apple platforms, you know that managing it can be a bit cumbersome. In Xcode, you have multiple targets and test targets (iOS/Catalyst, macOS, watchOS, & tvOS) and then you need to keep all of the Xcode configuration consistent between them. One way of handling this is to create a few xcconfig files, but this has its drawbacks too. You can create a base config file for each target to inherit from, then create individual ones for the specific platforms....

Broken Builds with Universal Xcode

When building a project in Xcode, two settings specify what architectures are used: ARCHS_STANDARD and VALID_ARCHS. By using the intersection between the two, Xcode produces binaries that include those architectures. However, this is now different with Xcode 12. In Xcode 12, VALID_ARCHS is “discouraged” and superseded by EXCLUDED_ARCHS. So what happens when you had custom values set for architectures when you attempt to build arm64 projects on x86_64 machines in Xcode 12?...

Breaking Code Signing via SSH

Ok, so the title is a bit misleading. Code signing wasn’t broken by SSH itself, it was the keychain interactions that occur when using SSH, but some context is needed. When you sign into the developer portal in Xcode, Xcode stores two items in the keychain that allows developer tools to access the developer portal on your behalf: Xcode-Token & Xcode-AlternateDSID. Prior to Xcode 9.3, these items were stored in the normal login keychain....