Attention! For Japanese customers, my Japanese blog might help.

Jul 31, 2016

Recognizing my own Audio Unit App Extension from 3rd party host applications

NOTE: This is the English version of my Japanese blog.
It is noted that this article is an instllation memo for my own Audio Unit App Extension. Because I figure out through a trial and error, there are some mistakes on this article.

Detail

As for an Audio Unit App Extension, which can be added from "Add Target..." on Xcode 7.3,
despite copying the AU to ~/Library/Audio/Plug-Ins/Components/, it was not recognized by neither 3rd parthy host applications nor auvaltool.

After some suveys, I found that it is needed to make an embed application which contains the extension and launch the application, like a Today App Extension. (that is to say, it is not needed to copy to ~/Library/Audio/Plug-Ins/Components/ as conventional AUs.)

With regard to the solution, following discussion was very helpful.

Audio Units v3 OS x: Instantiating custom audio... | Apple Developer Forums

After a successful installation, a following log message was shown in syslog:
Aug  1 10:23:41 MBP13R pkd[308] <Warning>: INSTALLED:com.shakeyama-mi.MyAUHost.Vibrato com.shakeyama-mi.MyAUHost.Vibrato(1.5) <__NSConcreteUUID 0x7fc9b2c19020> C3C2F430-0567-4651-800A-B8D0EE39A8E9 /Users/shakeyama/Library/Developer/Xcode/DerivedData/AU-auuapdgoorecwwhayzytocylavpn/Build/Products/Release/MyAUHost.app/Contents/PlugIns/Vibrato.appex

Of course, The message is available in Console.app.
In my environment, the message was shown when the embed application was launched from Finder, not from Xcode.
In the case of the launch from Xcode, it may be bad that Xcode attaches to the process of the application.
When launched from Xcode, the following message was shown in syslog.
<Notice>: <rdar://problem/11489077> A sandboxed application with pid 1277, "MyAUHost" checked in with appleeventsd, but its code signature could not be read and validated by appleeventsd, and so it cannot receive AppleEvents targeted by name, bundle id, or signature. Install the application in /Applications/ or some other world readable location to resolve this issue. Error=ERROR: #100013  { "NSDescription"="SecCodeCopySigningInformation() returned 100013, -." }  (handleMessage()/appleEventsD.cp #2098) com.apple.root.default-qos
But I don't know the message is concerned with the problem.

After the instllation, I could successfully recognize my AU from 3rd party host applications or auvaltool even if the embed application was terminated.

However, when I launched and terminated the embed app repeatedly, my AU was not recognized again.
Syslog said
Aug  1 11:21:27 MBP13R pkd[308] <Warning>: UNINSTALLED:com.shakeyama-mi.MyAUHost.Vibrato com.shakeyama-mi.MyAUHost.Vibrato(1.5) C0F51268-6DA2-41E2-9805-03D7119241ED /Users/shakeyama/Desktop/MyAUHost 0028-08-01 11-19-53/MyAUHost.app/Contents/PlugIns/Vibrato.appex

When the app was launched, it was seemed that my AU was once uninstalled and installed again.
But my AU became never re-installed somehow. I don't know the reason yet.

・another AU topic

It is seemed that the bundle identifier of AU needs to begin with that of embed application.
When not satisfied, the AU cannot be built with following error.
error: Embedded binary's bundle identifier is not prefixed with the parent app's bundle identifier.

Embedded Binary Bundle Identifier: com.shakeyama-mi.AU.Vibrato
Parent App Bundle Identifier: com.shakeyama-mi.MyAUHost

By the way, when you newly add an AU app extension target to a project which already contains an application, the build setting of the embed application was automatically edit to embed the extension as a plug-in.

However, when you newly add an embed application target to a project which contains an extension, You need to change build setting manually.
To change manually, do
1: Select the added application target
2: Push "+" button on the top of a "Build Phases" tab
3: Select "New Copy Files Phase"
4: Select "PlugIns" from "Destination"
5: Push "+" button in the bottom of the phase
6: Select present AU app extension
If you add your extension into a "Copy Bundle Resources" phase, altough the exntesion can be recognized from your embed app, it probably cannot be recognized from 3rd party host applications or auvaltool.