Friday, March 23, 2018

Swift Integration Traps

Daniel Jalkut:

A worse consequence is the number of pitfalls that ABI instability present, that are difficult to understand intuitively, and in many cases impossible, or at least dangerous, to work around. These pitfalls lie mainly in areas where developer code is executed on behalf of a system service, in a system process. In this context, it is not possible for developers to ensure that the required version of Swift libraries will be available to support their code. Game over.


But once you’ve written the code to draw those fancy graphs in Swift, you’re locked out of using that code from a QuickLook Plugin. Worse? Finishing touches such as supporting Quick Look are liable to come later in the development of an app, so you’ve probably gone through the decision-making process of writing your app in Swift, before realizing that the decision effectively cuts you off from a key system feature.

Spotlight importer plug-ins face the same issue.

Update (2018-03-30): Daniel Jalkut:

I think it’s officially impossible to offload QuickLook plugin to an embedded XPC service in order to use Swift.

Comments RSS · Twitter

Leave a Comment