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.
The plug-in no longer works on Mojave.
We have the following observations:
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). Migrate the code from Swift to Objective-C is planned but it will not happen instantly (it's a matter of a few months).
I have managed to get the plug-in running on Mojave.
The nil was returned by a call to NSBundle's principalClass. Based on my understanding of the official documentation, there are two ways how the principalClass is determined.
Somehow, the principalClass call returned different value on High Sierra and Mojave. Personally, I do not see any reason why it should behave differently, as the documentation has not changed and the logic sounds to be dependent solely on what happened while compiling the plug-in not how the world context while running it.
However, after I have added NSPrincipalClass item into the info.plist file, the plug-in loads successfuly on Mojave.