Copy link to clipboard
Copied
I have a well-tested plugin running on Windows but I've run into a snag porting to Mac. I built the HelloWorld and Annotator samples without problems. I copied my code over from Visual Studio on Win. to xCode and it built okay after some finessing. The problem I'm having is that the plugin will not load in Illustrator.
The plugin.pipl file is created and copied to the AIP package according to the shell scripts and the entries match the plugin name. The entry point is set to PluginMain, which appears to be the exported entry point. I went back through the xCode settings in the SDK Getting Started guide and everything seems okay. After that, I made a copy of the Annotator project and changed the settings and code files to the new plugin name. It builds but will not load as before.
I found errors in the dunamis log file related to loading this plugin. I went through them but they were not helpful to me, as the entry meanings are not obvious. I attached related log entries.
Dev. Env.
Mac Mini Intel
macOS Big Sur (11.7.4)
Xcode 12.3 (12C33)
Python 2.7
Illustrator 27.6.1
Many thanks for help getting this to load.
Can you show what is inside your aip-package?
It should have a structure like this:
Contents
- Info.plist (a file)
- PkgInfo (a file)
-MacOs (contains the executable, e.g. foo)
- Framework (contains libraries)
-Resources -> pipl -> plugin.pipl
-Resources -> foo.rsrc
I think if one of the is missing or wrong, it will not work
Copy link to clipboard
Copied
I've previously verified that no plugin debug breakpoints are reached when starting Illustrator.
There are no errors listed in Mac console that are related to plugin loading.
Running Illustrator from terminal emmits no error messages.
What else can I check? Thanks
Copy link to clipboard
Copied
Can you show what is inside your aip-package?
It should have a structure like this:
Contents
- Info.plist (a file)
- PkgInfo (a file)
-MacOs (contains the executable, e.g. foo)
- Framework (contains libraries)
-Resources -> pipl -> plugin.pipl
-Resources -> foo.rsrc
I think if one of the is missing or wrong, it will not work
Copy link to clipboard
Copied
Everything is working now but there was just no thread to pull on to get to the bottom of the problem. I have found that if there is no .rsrc file in Resources, loading fails. Even though this plugin includes no resources, lacking that file seems to hang up Illustrator. I created an .r file and added it to the project. Xcode creates the .rsrc file and puts it in the package. This works even if the .r file is blank. If that’s in any of the SDK guides, I couldn’t find it.
If I remove the .rsrc file, Illustrator won’t load the plugin. That seems to have been the issue.
The cocoa.framework is included in the “Link Binaries With Libraries” phase of build phases. Since the framework is linked with the executable there is no Framework folder in the package.
Thanks for the help