This is a proof-of-concept implementation of the pd-for-ios
and pd-for-android
libpd
libraries.
On iOS, you need to follow the steps in the pd-for-ios repository to download the submodules. On Android, you'll only need to follow the setup if you're migrating to an existing project.
the pd-for-ios repository is extremely light on details. this guy's video series is very detailed if you end up getting in the weeds. these two steps are the biggest gotchas.
- add lib to Target Dependencies and Link Binaries with Libraries
- add patch to User Header Search Paths being sure to select
recursive
Android is pretty easy. Follow the steps in the repo README
Patches need to be manually updated in both the ios
and android
apps. There is a better solution to this problem, but here is my current workflow:
- work on patches in
ios/patches
using desktop pd - test on ios.
- save and commit changes as needed. you'll need to re-build app to see changes. live reload will not work.
- zip
patches
folder and copy toandroid/app/src/main/res/raw
overwriting previous version. - test android
- The official docs for Native Modules will answer a lot of questions (and they're also frustratingly brief.)
- I recommend working on native files in native editors. ie obj-c files in XCode and .java files in Android Studio. Those IDEs have lots of built-in features that will do you favors.
AppDelegate.mm
andMainActivity.java
each have a commented out line that can load a patch manually, bypassing the Native Module. You can also loadtest_tone_on.pd
which will play a sound without any interaction.