I searched the net looking for complete guide on how to build VST2 plugin using Xcode and found some guides, especially guide in previous post by Nik was useful, but some steps were missing in them (Ex. Ableton Live 9.1.1 doesn't see plugin without step 3), some were redundant. So I decided to write complete guide for most recent Xcode.
Complete guide for creating optimized VST2 plugin using Xcode 5 on OSX
- Download VST SDK, it can be VST3 sdk (3.6 in my case), vst2.x folder is still there. Unpack it and put to folder
Documents/Xcode
so that it looks Documents/Xcode/VST3 SDK
- Open Xcode. Create New Project
OSX -> Framework & Library -> Bundle
Choose Cocoa Framework in dialog.
- When the project is created, in Info tab:
- Add new key
Resource should be file-mapped
with value YES
- In Build Settings tab:
Deployment -> Deployment Location
-> set Yes
Deployment -> Deployment Postprocessing
-> set Yes
Deployment -> Installation Built Products Location
-> set /
Deployment -> Installation Directory
-> set /Library/Audio/Plug-Ins/VST
Packaging -> Wrapper Extension
-> set vst
Search Paths -> Header Search Paths
-> add path "$(HOME)/Documents/Xcode/VST3 SDK"
with quotes, with recursive
flag
Menu -> Product -> Scheme -> Edit Scheme -> Run -> Info -> Build Configuration
-> set Release
- Drag vst2.x folder from
VST3 SDK/public.sdk/source/
to project tree. In adding files dialog:
- uncheck
Copy items into destination group's folder
- check
Create groups for any added folder
- check your project in
Add to targets
- Add your .h and .cpp files for your effect or instrument.
You can simply add again.h and again.cpp files from https: //github.com/kn0ll/vst-2.4-xcode-examples just to check.
- Press Run (it may warn about inappropriate typecast in SDK source - let Xcode fix it)