I want to build a VST plugin on OSX. I can compile it just fine, but the VST-host (Cubase Essential 4) always crashes when trying to load it or reports that the plugin is somehow broken.
Probably, this is because I am missing some ingredients to the VST-bundle.
Which preferences need to be set in XCode and what stuff has to be put into the bundle to make this work? Or is there even a sample project somewhere?
Thank you in advance
I have written up a guide for developing VST plugins by hand on Mac OSX here:
Making a VST plugin from scratch with Xcode
Also I have developed a set of Xcode project templates which you can use which do all of this for you and simply give you a base project for VST effects/instruments:
Teragon Audio Xcode VST Templates
Both of these are written for the VST 2.x SDK, as I have not worked with the 3.x SDK and am not using any sequencers which have migrated to it yet.
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)
The sample project at VST3 SDK/public.sdk/samples/vst/mac could also be a good place to start.
This guide covers everything you asked and more.
Related
When I submit my app to App Store as TestFlight, my app goes invalid binary. Error message is give as follows:
....
ITMS-90433: Invalid Swift Support - The file
libswiftAVFoundation.dylib doesn’t have the correct code signature.
Make sure you’re using the correct signature, rebuild your app using
the current public (GM) version of Xcode, and resubmit it. Don’t just
modify the code signature of libswiftAVFoundation.dylib.
Would you please recommend any practices for library version checking or others if any, to ensure my app submission contains valid binary ?
Updates :
I need to go to the company and rebuild my iOS app using Always Embed Swift Standard Libraries -> YES, no issues
Thank you very much
Go to your project target and then -> Build Settings -> Always Embed Swift Standard Libraries and switch to "NO". (this is if you dont use swift in your project).
On the other hand i've seen this more of an issue that has to do with cleaning your project folder.
https://github.com/flutter/flutter/issues/59830#issuecomment-646603022
Having a physical device connected to xcode while building the app solved it on my site. Note: I use flavors in my flutter project.
For some reason, the command line tools was not set in Xcode preferences. So in my case I opened:
Xcode -> Preferences -> Locations
and set Command Line Tools field to match the current version of Xcode, in my case
Xcode 12.4(12D4e)
Then Archive and upload new binary.
I'm trying to add some new resource files to a project which was build by another person on another mac. I think that the project has the provision of the previous person.
Using right click->Add Files to "MyProject" doesn't provide the expected result. After I compile the project, the added file is not visible in the application.
How can I add new resources in my project?
PS: I'm trying to learn Objective-C in a macincloud.com account.
It might be that the file you added was not added to the project build. Click your project > App target > Build Phases
And check that the file exists in Compile sources (if it needs to be compiled), otherwise check Copy bundle resources. If the file does not exist there, drag it there and it should be fine, (from what I understand of your question).
EDIT
You can also check wether a file is added to the target by clicking the file and opening the "File Inspector" (View > Utilities > Show File Inspector, or ⌥ + ⌘ + 1), and check the Target Membership section.
Example:
Adding to Copy bundle resources worked for me
Just drag the resource file (from a finder window) into your project files area (left side) and drop in supporting files.
Once you drop, a dialog will prompt you which targets to add it for. Select all that are appropriate. Thats it.
Just had a similar experience with Xcode Version 11.7 (11E801a), which I mention as it may help others from wasting a day and a half.
In addition to the other answers explaining how to add the resources:
For me the problem was I had my resources listed in Developer Assets under the target's General tab, but also in the Build Phases/Copy Bundle Resources. This worked fine running through Xcode in simulators and even on devices, but when I came to Archive the app, the resources were not being copied. Deleting my resources from the Developer Assets list, but keeping them in Build Phases worked.
And in the end it turns out I only need the resources in the Build Phases section for either running through XCode or Archiving !
I need to create multiple projects from one source code.
Must have different logo, color backgrounds and fonts
Must have some constants defined differently
Each of these projects will be in different packages, else I wont be able to release them on the store.
I have developed a project that works, now I need to make this into a library project.
What I tried was
working project -> properties -> android -> is library
created a new project -> properties -> add -> working project
copied the android manifest from working to new project
exported the new project
installed it on the device, it shows in settings -> applications -> manage applications, but does not show as a app.
What am I doing wrong here ?
I was missing out on 2 things
Changing the package name in the new project
Deleting the default ic_lanchner.png from all folders
I want to work with some frameworks like glew and cg so i manually added
the needed frameworks to my project by right clicking the project -> Add files to ...
and choosing the correct framework. The problem is, when i try to include the header files,
Xcode cant find any of them. I hope this picture will help to understand:
And:
The error given is for the glew framework, but it also happens on Cg.
As you can see on the left, The needed frameworks were added.
Any idea on how i can include these headers?
After trying to add the header files manually i got an architecture error:
I dont know if this is how it should look like.
Thanks!
Before starting, remove the framework and all files you have added while trying to make it work.
Then, you have to add the frameworks in the Build Phases of your target. Then go into Link Binary With Libraries and select your framework from there.
This should do it. Your headers should be available as auto-completion after each #import directive.
If it does not work (it sometimes happens), there are additional steps I can provide to you.
Additional steps:
Go to your project settings, in the build settings:
Complete the Framework Search Paths with the path of your framework
Do the same with User Header Search Path
Then, it should work. If it does not, you will need to add the full path of your header in the #import directive. Example:
#import "/path/to/my/header.h"
Apple's documentation available here states:
In the project navigator, select
your project
Select your target
Select the 'Build Phases' tab
Open 'Link Binaries With Libraries'
expander
Click the '+' button
Select your framework
(optional) Drag and drop the added
framework to the 'Frameworks' group
In my case I have added Framework Search Paths for Target, but it should be added to Project
Also Always Search Users Path should be yes
For those whose autocomplete fails after adding framework.
I used to add frameworks, by going to Build Phases and taking the Link Binary with Libraries option. Now in XCode 6.1, though project was building fine, autocomplete in XCode was not working.
So what needs to be done is:
Remove the already added framework from Project Navigator and also from Link Binary with Libraries.
Add framework to project by simply File -> Add Files to option in XCode.
And auto complete will start working.
In my case, the external framework had been downloaded with Windows and added to the project. Then it was transferred to OSX, where the Xcode project was built and the external framework didn't load properly. I guess it is because Windows changes the framework folder to be a regular folder, which OSX then has trouble with.
Solution for me was to simply download the framework with OSX and drag it into the framework folder in the XCode project.
In my case I had to update a framework version, so I just replaced the .framework in the filesystem and then I got the error you've mentioned in the question.
Removing the framework and adding it back again, playing with the search paths and all the other suggestions didn't help.
Eventually, cleaning the build folder did the trick:
Select "Product" from the xcode menu, hold the option key and click on: "Clean Build Folder".
After that I built and ran the project successfully.
I'm trying to add some new resource files to a project which was build by another person on another mac. I think that the project has the provision of the previous person.
Using right click->Add Files to "MyProject" doesn't provide the expected result. After I compile the project, the added file is not visible in the application.
How can I add new resources in my project?
PS: I'm trying to learn Objective-C in a macincloud.com account.
It might be that the file you added was not added to the project build. Click your project > App target > Build Phases
And check that the file exists in Compile sources (if it needs to be compiled), otherwise check Copy bundle resources. If the file does not exist there, drag it there and it should be fine, (from what I understand of your question).
EDIT
You can also check wether a file is added to the target by clicking the file and opening the "File Inspector" (View > Utilities > Show File Inspector, or ⌥ + ⌘ + 1), and check the Target Membership section.
Example:
Adding to Copy bundle resources worked for me
Just drag the resource file (from a finder window) into your project files area (left side) and drop in supporting files.
Once you drop, a dialog will prompt you which targets to add it for. Select all that are appropriate. Thats it.
Just had a similar experience with Xcode Version 11.7 (11E801a), which I mention as it may help others from wasting a day and a half.
In addition to the other answers explaining how to add the resources:
For me the problem was I had my resources listed in Developer Assets under the target's General tab, but also in the Build Phases/Copy Bundle Resources. This worked fine running through Xcode in simulators and even on devices, but when I came to Archive the app, the resources were not being copied. Deleting my resources from the Developer Assets list, but keeping them in Build Phases worked.
And in the end it turns out I only need the resources in the Build Phases section for either running through XCode or Archiving !