These steps are based on the original steps from https://github.com/libpd/pd-for-ios/wiki/ios for setting up libpd to an existing Xcode 4 project. I’ve updated it with minor changes so that it works with Xcode 5.0.2. I’ll try to keep updating this for personal and public use. Proceed with caution:
- Drag the libpd.xcodeproj file from the Finder into your project (drop it in the Project Navigator pane on the left).
- Under “Build Phases” of your project add libpd-ios to your “Target Dependencies”.
- Also under “Build Phases”, add these to “Link Binary with Libraries”: libpd-ios.a, AVFoundation.framework, and AudioToolbox.framework.
- Under “Build Settings” of your project add a recursive entry for your base libpd directory to “User Header Search Paths” (this is the local path to where you are storing libpd on your computer, most likely in a folder hierarchy of pd-for-ios/libpd).
- In your AppDelegate class (AppDelegate.h & AppDelegate.m), you may have to delete some unnecessary methods regarding the setup of your view controller (these are most likely just out of date).
Personal documented problems and their solutions:
- PROBLEM: Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_PdAudioController", referenced from: [object file in Xcode] "_OBJC_CLASS_$_PdBase", referenced from: [object files in Xcode] "_OBJC_CLASS_$_PdDispatcher", referenced from: [object file in Xcode] ld: symbol(s) not found for architecture x86_64, clang: error: linker command failed with exit code 1 (use -v to see invocation)
- SOLUTION: fix the “Build Settings” for the libpd-ios target of Architectures to “Standard architectures (including 64-bit)