Audio unit v3 extension doesn't appear in host apps - ios

I'm trying to add an audio unit extension to my iOS app. I used File > New > Target > Audio Unit Extension in Xcode to use the built-in template, filled in the info to populate the Info.plist file, and built and ran my app. Even though the audio unit doesn't do anything yet, I expected that the audio unit would be visible to host apps at this point, but it's not.
I downloaded and ran Apple's FilterDemo app, which creates an audio unit extension similar to what I got from the Xcode template, and that appears in host apps (I'm using Auria as a host to test the audio units).
I've tried running my app's main target, or running the extension target and selecting Auria as the host app, but neither works. When running the FilterDemo app, I just ran the main target and that worked.
I went through the Info.plist and build settings comparing the FilterDemo to my app, but I didn't see any significant differences. I also opened the Xcode build folder and viewed the app package that I'm running in debug mode and confirmed that my audio unit extension (.appex package) is there in the Plugins folder.
In the Info.plist file, my extension type is augn (generator), manufacturer is Test and description is Share Audio. I experimented with some changes to these settings, but that didn't help.
I thought the existing Inter-App Audio functionality might be interfering, so I removed the AudioComponents section from the container app's Info.plist file. That made the IAA component disappear from host apps, but didn't make the AUv3 component appear.
I've read through the App Extension Programming Guide, the AUAudioUnit class reference, this tutorial and this one, and the transcript of the WWDC introduction of this functionality, but none of them mention any extra steps needed to make the extension visible to host apps.
What am I missing?

You should run first of all the app installation and then the extension:
Create an empty iOS project, you can name it HostAU
Create an Audio Unit Extension target for iOS named EffectAU
Set Audio Unit Type as Effect, Subtype Code as something like oiuy, and Manufacturer Code as something like Oiuy
Then run HostAU in your iOS device
After run EffectAU selecting Garage Band as target (make sure you have it installed in your iOS device)
In Garage Band select any instrument, press button settings to show it on the left side and find for "PLUG-INS & EQ" section.
Press this bar to edit and press edit at the top, then press any plus green button to add a new one.
Find the Audio Unit Extension segmented control option at top and then you'll be able to see your Audion Unit Extension icon, name and Manufacturer Code
The same process works in MacOS, but you should create and empty MacOs project and a MacOS Audio Unit Extension target. If you're using MacOS Catalyst, create two Audio Unit Extensions for both platforms and configure which one will be used for which platform in Project > Build Phases > "Embed App Extensions".
When you run the extension target MacOS Garage Band, make sure you have AudioUnit menu enabled at Preferences > Audio/Midi > Enable Audio Units. An then configure it at bottom in Track > Plug-ins > Audio Units > {Manufacturer Code} > {Audio Unit Extension Name}.
In MacOS, the shell commands pluginkit -m and auval -a helps you to check if the plugin is installed in MacOS and if the audio unit was recognized, respectively.
I've done that experiment using MacOS 11.6, iOS 15.0.1, MacOS GarageBand 10.4.3, iOS GarageBand later 2021-10 and Xcode 13.0.

Related

iOS custom keyboard settings not saving

I’m implementing a settings bundle for a custom keyboard using the Apple Keyboard Extension documentation and the settings tutorial it links to.
This method works in the parent app, but when I implement it as identically as possible for the keyboard extension, the settings bundle does not appear to save any of the data, as shown in this video. It seems as if something is resetting the values near-constantly: any time I exit the settings view (e.g. Multitasking view, previous settings page), the values are set to zero (not default: empty, false, and zero respectively). This is the default settings bundle template, no edits, not referred to in code.
Is there a special implementation for extension settings not explicitly stated in the documentation (or that I missed) that is causing this?
For clarity, the steps I took (after creating the extension):
Created the bundle with New File –> Settings Bundle.
Named it, targeted the keyboard extension.
Built and ran.
These were the same steps I took for the parent app (targeting the app), which was able to save settings.
This is on a physical iOS 11.0 (15A5326a) device; app built with Xcode 9.0 (9M202q), Swift 4.

How to temporarily disable / remove Vuforia in XCode

I'm developing an app that uses Vuforia. I would like to temporarily disable Vuforia so that I can run my app in the simulator, rather than on the device.
As I only have one iPhone, I would like to see how the app looks on other devices via the simulator
Any thoughts?
This can be done by let Xcode not link the libVuforia.a and not compile any .m/.cpp/.c file that you import/include Vuforia header file.
YourProject->YourTarget->Build Phases(Please see the attached image)
1, Chose "Link Binary With Libraries", set "require" to "optional";
2, Chose "Compile Source" and select any file that you import/include Vuforia header files, click the "-" button(if you want to run the app on a real device add them back);
3, Build & Run on Simulator.
You need to comment out startCamera, and the initialization of the vuforia services / trackers you use. Also, if your app is built properly - it should fail if the init did not succeed, so make sure you disable this behavior for the emulator testing.

Run app phonegap with xcode on jailbroken iPhone

I developed an app with phonegap, and I hate to try on a apple device. I've jailbroken my iPhone5s for try my app without pay apple.
I follow this guide, but seems does't work:
On your Jailbroken device install AppSync Unified 5.2-1 (or later)
from AngelXWind’s repo. Don’t use any other AppSync, and if you have
others, be sure to remove them. Open
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/SDKSettings.plist
and change AD_HOC_CODE_SIGNING_ALLOWED to YES. You may need to
duplicate it to the desktop, change it, save it, then drag and drop
back into the original folder because OS X let you edit the file in
place. If XCode was running, restart XCode. Change your Project and
Target settings to “Ad Hoc Code Sign” in Build Settings Tell XCode to
run app on iPhone. At this point XCode will put app on your iDevice,
but can’t debug because it can’t attach to the process. The app will
start then close immediately. You can now manually start the app on
the phone now though. To enable debugging: In your project select
File>New File Property List and create a file called
“Entitlements.plist”. Add “Can be debugged” or “get-task-allow” (both
do the same thing) and set the value to YES. Now change your Project
and Target Code Signing Entitlements (In Build Settings) to
“Entitlements.plist” (you have to type it in). Now XCode can run and
debug the app. Good luck
This is the link of the guide.
When I run app, XCode tell me "Build Success", and on top it says :"Running on Iphone". If I open detail, it say: "Preparing to install " with a loading circle. It's 20 minute that is preparing to install my app.
How can I fix this problem?

The Record Button is not Enabled With iOS Simulator

I've installed Monkeytalk on my machine, it has OS X 10.8.5
I had a successfully run an automatized test on Android with Monkeytalk, so I moved on X Code 5.0.2. Created a sample application (iOS 7.0), added the required targets, changed the Schema name too. Also added into Buid Phases the required libraries, mentioned here, as well as the Build Settings' Other Linker Flag option (-all_load). Now, I can successfully build the app to the new Monkey target, appears on the simulator correctly. But after selecting the iOS Simulator in the Monkeytalk IDE, however the console's output is "Connected to Device: iOS Simulator", the record button is not enabled.
I've watched the tutorial video about running Monkeytalk on iOS simulator too, the linker flag mentioned there is -all_load lstdc++ if I understood correctly (the quality of the video wasn't the best and I could not read the line). Did you ever get this problem?
Edit: I've tried to run via networked device, the Monkeytalk is successfully connected to the device, but the record button is still not enabled.
Did you get message in XCode's log output like the last photo of Installing the MonkeyTalk iOS Agent?(Sorry, I don't get the permission to attach images here yet)
If not, make sure you added all the required libraries into Buid Phases and run in CORRECT target first(I met this problem once because of this :<). Then you can check the log output and google these messages for help.

Xcode-Instruments cannot run app on simulator with the app target I choose

I am trying to run an automation on an iOS App using UIAutomation with Instruments.
It had worked well when I had tried it out a few weeks back. However, I tried out another automation testing framework (KIF from Square) in the meantime, and now when I try and run Automation with Instruments, it refuses to work.
When it had worked, I had carried out the following steps:
Open my app in Xcode
Run the app
Quit the iOS simulator
Open Instruments (not necessarily through Xcode, but just by searching for Instruments in Spotlight), choose Automation
Instruments opens, and when I click on Choose target, I do not need to browse for the target. I can see the name of my app in the list (description: the app name is without the .app extension and has an icon before the name like the icon which appears at the top of the output window in Xcode - a black and white icon with a gradient) even though I haven’t opened it before i.e even when I had opened Instruments for the first time.
I choose this target from the list, choose a javascript file for the automation to run, and then click ‘Record’. The automation used to run and I could see it run in the simulator which used to open up.
However, opening Instruments no longer shows me the target in the list of targets anymore.
I have tried choosing a target from my filesystem (from the Derived Data folder) as well as from the iPhone Simulator applications folder; but no luck. The target does not appear as it used to before (in the description above), but appears with a .app extension and with the typical application icon. The automation does start and open up the simulator, but gives the following message: (although the page or the script haven't changed at all)
Cannot perform action on invalid element: UIAElementNil from target.frontMostApp().mainWindow().elements()[2]
(Would have liked to post images, but can't, since I am a new user and do not have the required permissions yet - hope the description makes up for it)
Have been stuck on this issue for long and any help would be appreciated! Thanks so much!
I just profiled the app using Product -> Profile in Xcode, and that opened up Instruments with the target. The target was the Unix executable under Derived Data -> MyApp -> Build Products -> Release-iphonesimulator -> MyApp.app -> MyApp unix executable.
Also, while using KIF, I had enabled accessibility labels for some views in the storyboard. While running the automation tests in Instruments, the app seemed to somehow consider the views which had the accessibility labels set as one single element and could not access sub-elements on this view. In order to run with Instruments, I just disabled the accessibility labels for the views and it worked like a charm again!

Resources