No such module AudioKit

939 views
Skip to first unread message

Jonathan Mackenzie

unread,
Jun 9, 2016, 6:13:47 PM6/9/16
to AudioKit Users Group
Hi

I've built AudioKit for iOS from source and am having no trouble running the playground examples. However, if I try and use AudioKit in an iOS project, I get a 'No such module AudioKit' error when I import AudioKit. I've tried the HelloWorld examples and a new project from scratch. I've tried adding the AudioKit framework in various ways (dragging and dropping into project or copying into project folder) and adding to project settings and framework path. I found the same problem on the AudioKit github issue #343 and followed the solution, but no joy. Any ideas as what else to try?

Aurelius Prochazka Ph.D.

unread,
Jun 9, 2016, 10:34:41 PM6/9/16
to AudioKit Users Group
Since you're not finding any framework, it really sems like a framework search paths thing, but it sound like you tried that.  I guess the only thing I could do would be to offer to screenshare with you to figure it out.  Let me know.

Aure

Jonathan Mackenzie

unread,
Jun 11, 2016, 5:26:09 PM6/11/16
to AudioKit Users Group
no worries - i removed everything and started again, and now it can find the framework. a clogged cache somewhere perhaps. thanks anyway

Jonathan Mackenzie

unread,
Jun 12, 2016, 5:18:36 PM6/12/16
to AudioKit Users Group
Still not quite there I'm afraid! Although HelloWorld builds and runs, I'm not getting any sound output on the iPad. I'm getting a plot and can start and stop the sinewave, but hear nothing even with the volume right up. 

Not sure if this is related but I also have errors in XCode, despite being able to successfully build, which is strange. These say AKOscillator and AudioKit are "unavailable: cannot find Swift declaration for this class"

Aurelius Prochazka Ph.D.

unread,
Jun 12, 2016, 5:20:22 PM6/12/16
to AudioKit Users Group
This is on the physical ipad that its not working?  That is very strange.

Aure

Jonathan Mackenzie

unread,
Jun 12, 2016, 5:40:03 PM6/12/16
to AudioKit Users Group
yes, that's right. ios 9.3.2 xcode 7.3.1 latest master from github. 

i built audiokit for ios and then copied the framework from derived data. playground works fine. other apps make sound ok on the ipad. 

Jonathan Mackenzie

unread,
Jun 12, 2016, 9:27:05 PM6/12/16
to AudioKit Users Group
i've just tried some of the other examples, and mostly they don't build, with more of the same kind of errors as above - some class "unavailable: cannot find Swift declaration for this class"

Aurelius Prochazka Ph.D.

unread,
Jun 13, 2016, 12:15:08 AM6/13/16
to AudioKit Users Group
I think your errors might be from this:

"i built audiokit for ios and then copied the framework from derived data. playground works fine."

The framework in the derived data folder is likely just compiled for the simulator and not actual devices.  There is a difference.  Run the build_framework.sh script to build a framework for both the simulator and device.

Aure

Jonathan Mackenzie

unread,
Jun 13, 2016, 9:43:39 AM6/13/16
to AudioKit Users Group
Nope - still no joy. I ran build_framework.sh, but having exactly the same problems with no sound on iPad, and same errors in the examples. 

(I did make sure I used the iphone arm64 framework product from derived data, so I don't think it's that.)

Jonathan Mackenzie

unread,
Jun 13, 2016, 9:44:12 AM6/13/16
to AudioKit Users Group
The plot thickens! I tried HelloWorld on a different iPad, and it works. I also wrote my own v simple app and this works on the other iPad, but not the first. Both iPads are running iOS 9.3.2, but the one that works is an iPad 2, the one that doesn't is an iPad Air. (I tried restarting the iPad too)

Have you come across problems with AK before that are hardware related?

Also, I downloaded the SynthX app from the app store and this works fine on the iPad Air. I can't build this from source, however, because of a large number of errors. 

Jonathan Mackenzie

unread,
Jun 13, 2016, 10:20:24 AM6/13/16
to AudioKit Users Group
Setting AKSettings.playbackWhileMuted=true fixed it! This changes the AVAudioSessionCategory from Ambient to Playback, which as I understand changes the way the silence setting is interpreted. I don't have silence switched on on my iPad, so this is wierd. Anyhow - now I can get sound and move on!  
Reply all
Reply to author
Forward
0 new messages