Just to document & share knowledge: These are the steps I took to add FMOD to an iOS/iphone/ipad project in XCode:
[list]
[]Download FMOD Api for iOS[/1p0ym9q7]
[]Copy all .h (headers) and .a (libraries) into your project[/1p0ym9q7]
[]Click the project to and select “Build Settings” tab. Make sure to select “All” and “Combined” to view all settings.[/1p0ym9q7]
[]Add the header directory to the “Header Search Paths” (under de “Search” section)[/1p0ym9q7]
[]Add the library directory to the “Library Search Paths”[/1p0ym9q7]
[]Add “-lfmodL_$PLATFORM_NAME” and “-lfmodstudioL_$PLATFORM_NAME” to “Other Linker Flags” (in the “Linker” section)[/1p0ym9q7]
[]Check “Build Active Architecture Only” (Architecture section)[/1p0ym9q7][/list:u:1p0ym9q7]
I’m not sure if the last step is necessary, and I am also not sure whether I have to configure the project or the “build target” (or how the build target inherits settings from the project?)
Can anybody confirm this is the proper way to add FMOD to an iOS project?
Thanks heaps for posting this. The documentation isn’t clear on all of the steps. I was missing the linker flags, and getting all sorts of weird issues (such as it worked in the iOS Simulator, but not on the device)
Those settings look good to me, however the “build active arch only” isn’t necessary, that just ensures you don’t build a universal binary (useful in debug to reduce build times). Also be aware that with fmodL and fmodstudioL, the ‘L’ signifies ‘logging’, these versions should be used with your debug configuration to get more feedback about errors, in release mode use the libraries ‘fmod’ and ‘fmodstudio’.
Linking - General (on the Target, not just the Project):
Other Linker Flags (Debug): -lfmodL_$PLATFORM_NAME
Other Linker Flags (Release): -lfmod_$PLATFORM_NAME
Be sure you’ve linked AudioToolbox.framework & CoreAudio.framework like btrussin said
Note -lfmod_$PLATFORM_NAME is shorthand for -libfmod_iphoneos.a (if you’re building iphoneos)
You can also use full paths to the lib files in other linker flags (so you would just put “/Users/you/code/FMOD Programmers API/api/core/lib/libfmod_iphoneos.a” in your Xcode Project/Build Settings/Other linker flags
Be sure to also put those same flags in Targets/Build Settings/Other linker flags, or you could just put $(inherited) there, if you’ve already specified the flags in Project/Build Settings