danomatika / ofxPd

(maintained) a Pure Data addon for OpenFrameworks using libpd
Other
202 stars 45 forks source link

iOS can not find my patch #79

Closed batchku closed 4 years ago

batchku commented 4 years ago

I'm successfully building the pdExampleIOS app and running it on an iPhone on iOS 13.3.

When I put my own patch next to the text.pd patch, and modified the lines below in ofApp.mm to:

    cout << endl << "BEGIN Patch Test" << endl;

    // open patch
    // Patch patch = pd.openPatch("pd/test.pd");
        Patch patch = pd.openPatch("echojam-keymouse.pd");
    cout << patch << endl;

The app builds successfully but iOS is not able to find my patch file:

2020-04-21 22:35:40.512739-0700 EchoJamKeyMouse[10104:1588440] Metal GPU Frame Capture Enabled
2020-04-21 22:35:40.513101-0700 EchoJamKeyMouse[10104:1588440] Metal API Validation Enabled
2020-04-21 22:35:40.603602-0700 EchoJamKeyMouse[10104:1588440] Creating OpenGL ES2 Renderer
2020-04-21 22:35:40.645030-0700 EchoJamKeyMouse[10104:1588440] [Assert] -[UIApplication setStatusBarOrientation:] and -[UIApplication setStatusBarOrientation:animated:] API have been deprecated on iOS 8.0 and are no-ops on iOS 13.0
/
[notice ] AVSession samplerate: 48000, I/O buffer duration: 0.0213333

BEGIN Patch Test
open: /private/var/containers/Bundle/Application/086C2ECF-B7D0-444B-ADAE-8BDC5B34FA29/EchoJamKeyMouse.app/echojam-keymouse.pd: No such file or directory
[ error ] Pd: opening patch "echojam-keymouse.pd" failed
Patch: "" $0: 0 valid: 0
FINISH Patch Test

Am I supposed to do something else to make sure the build/deploy puts the pd files on the phone as well?

danomatika commented 4 years ago

You shouldn't need to do anything else. There is a general OF script that Xcode calls which should copy everything from bin/data into the app bundle. If that is not working, then it's an issue with OF and probably not ofxPd.

One thing to try is manually deleting the app on the device via long pressing then tapping the X in "wiggle mode." Rebuilding and uploading the app will force Xcode to copy everything. This can sometimes be required as it doesn't always detect that resource files have changed and need to be copied again, especially when a script is doing it instead of Xcode directly.

batchku commented 4 years ago

Yup! That was my issue; Thank you!