I make a plug-in to ą third-party app. Part of the plug-in is written in Swift.
The plug-in is stuck at Xcode 7.3.1/Swift 2.2 because of this issue in an old version of PyObjC.
In more detail, the reasons for being stuck on Swift 2.2 are:
- The bug in the old version of PyObjC causes that if a user installs a plug-in written in Python while having our plug-in in Swift as well, the third-party app crashes on start-up.
- Apple ships only an obsolete version of Python/PyObjC with macOS. This obsolete version does not contain a fix for this issue.
- Instructing users to install newer version of Python/PyObjC manually is not feasible.
- Apple does not support developing in Swift 2.2 in newer versions of Xcode.
The plug-in no longer works on Mojave.
We have the following observations:
- The issue is limited to Mojave, everything works as expected on older macOS versions.
- If the third-party app asks to "load this bundle" of the plug-in, it just gets nil.
- The plug-in's init method is not called at all.
- If I completely remove Swift 2.2 from the plug-in's code base (making in unusable), its bundle is correctly loaded.
Any ideas what might be causing this issue and how to fix it?
PS:
- Pursuing users to install a newer version of Python/PyObjC is not feasible nor expecting Apple to bundle a newer version of Python/PyObjC with macOS (so the plug-in code base cannot be upgraded to a newer Swift version).
- We plan to migrate the code base from Swift to Objective-C but this will not happen instantly.