Search code examples
xcodeadobe-illustrator

How to make Adobe Illustrator use a plug-in built in Xcode?


I've got a plug-in written for Adobe Illustrator that I need to debug. How do I make Adobe Illustrator use the plug-in that Xcode compiles?

I've read Adobe Illustrator's Getting Started Guide but it merely says to set the "Additional Plug-ins Folder". How do I point the "Additional Plug-ins Folder" to Xcode's build folder for the the plug-in?


Solution

  • Using Adobe Illustrator CC 2017 and Xcode Version 8.3.2 (8E2002), I found the following approach worked.

    First I make an alias to the build folder so that I could navigate to it in Adobe Illustrator:

    1. Go into Finder
    2. Go to Go > Go to Folder
    3. Type in ~/Library/Developer/Xcode
    4. Right click DerivedData
    5. Choose Make Alias
    6. Drag the "DerivedData alias" to your desktop

    Now that I had an alias, I could go back into Adobe Illustrator:

    1. Go to Illustrator CC > Preferences > Plug-ins & Scratch Disks...
    2. Check the box "Additional Plug-ins Folder"
    3. Click the Choose button
    4. Navigate to ~/Desktop and double click the "DerivedData alias"
    5. Go up a directory (command+)
    6. Select DerivedData
    7. Click OK
    8. Click OK

    With the method above I was able to get the Xcode debugger to attach to Adobe Illustrator and stop on breakpoints in my code.

    The post Where is Xcode's build folder? helped me locate the build directory. I confirmed there was an Adobe Illustrator Plugin file in that directory by searching for all files with .aip extension. There was one, so I assume Adobe Illustrator traverses "Additional Plug-ins Folder" looking for all .aip files.