AudioKit / Playgrounds

The AudioKit Playground Book for iPad Playgrounds and Xcode Playgrounds
http://audiokit.io
193 stars 37 forks source link

It doesn't seem to work with iOS 14 on iPad. #17

Open luisgmnz opened 4 years ago

luisgmnz commented 4 years ago

Is there a compatibility issue? Current playgrounds version: 3.3.1 It says: INVALID PLAYGROUND BOOK Audiokit.playgroundmodule: Unable to open module.

AlessioSbarzella commented 4 years ago

Same here...

sparky742 commented 4 years ago

I see this issue also. "Invalid Playground Book" Unable to open module.

marcolabreu commented 4 years ago

The module folder structure needs a small update—all code has to be in a Sources subfolder—to eliminate the Invalid Playground Book error. Easy to do, now the book will open but the code won't run due to deprecated API calls and other issues. Errors can be seen on a Mac, here are some instructions.

On a Mac, do the following:

  1. right-click or ctrl+click the iPad Playground file and chose Show Package Contents;
  2. open Contents / Modules / AudioKit.playgroundmodule, select all its subfolders, right-click or ctrl+click, chose New Folder with Selection, and rename the newly created folder as Sources. Now AudioKit.playgroundmodule should have only one subfolder called Sources with Internals, Nodes, and UI subfolders inside;
  3. still on a Mac, open the file—install the free Apple Playgrounds app if you don't have it—, open Preferences on the menu (or command+,) and enable Authoring Debug Mode;
  4. on any page, even the initial one, click on the Run My Code button in the low right and wait.

The list is long but the majority of the errors require just renaming calls.

Before investing time trying to fix I would like to hear from the core team: is there a way to just use the iOS framework as a module here?

aure commented 3 years ago

Unfortunately, Playgrounds only allows for Swift files whereas the full AudioKit frameworks has a lot of C. This may change someday, but I believe it is still a limitation.