AudioKit compiles for device, not for Simulator
Asked Answered
F

1

6

I am having a problem where AudioKit 4.0 (today's build), won't compile on the simulator. It compiles just fine for a device.

The errors I'm getting are:

'AKMicrophone' is unavailable: cannot find Swift declaration for this class
'AKFrequencyTracker' is unavailable: cannot find Swift declaration for this class
'AKBooster' is unavailable: cannot find Swift declaration for this class

I suspect I have a problem with my project settings, but they look the same as for an AK example.

I'm running Xcode 9.2 b2 on MBP running 10.13.2 Beta (17C67b).

Update

I built a new system on a different computer. This is running GM 10.13.1 and GM Xcode 9.1.

The source (my app) however, is in iCloud documents.

I rebuilt Audiokit and AudiokitUI from a fresh download, but am getting the same results as yesterday.

I did notice though that there are two warnings: "Umbrella header for AK4ParamRampBase.hpp not found" and same for AK4LinearParamRamp.hpp

What other things can I try?

Fleeting answered 9/11, 2017 at 23:39 Comment(5)
That's pretty strange. Its not like we differentiate much between device and simulator in AudioKit. You are on double beta, so anything is possible, and I can't replicate your environment. Do the AudioKit examples work on the simulator?Valeda
Hi Aure. Yes, I get similar errors when trying the HelloWorld example.Fleeting
er, I meant No, they don't workFleeting
So, all of AudioKit's commits are tested by Travis and are required to compile for devices and simulators successfully in order to called the build "passed". travis-ci.org/AudioKit/AudioKit So, my feeling is that Xcode 9.2b2 has broken something.Valeda
Ok. I’ll try with Xcode 9.1 GM. (I should have done that before). I’ll report back, and if you’re correct, I’ll file a BR.Fleeting
W
3

Try downloading another version of AudioKit, or rebuild the version you have in the device and the simulator before exporting the framework. Make sure the framework is built in both Device/Simulator. If the project is built only in “Simulator”, it would only generate architectures which would let the framework run specifically on simulators not on Devices. Or if the project is built in “Device”, it would generate architectures which would let the framework to run only on devices.

https://medium.com/swiftindia/build-a-custom-universal-framework-on-ios-swift-549c084de7c8

Good Example of building a framework

Wein answered 5/9, 2018 at 15:4 Comment(1)
good answer. I'll check it when the next version of my project emerges - soon I hope.Fleeting

© 2022 - 2024 — McMap. All rights reserved.