# Adding FMOD to XCode iOS/iphone/ipad project

**URL:** <https://qa.fmod.com/t/adding-fmod-to-xcode-ios-iphone-ipad-project/11005>\
**Category:** FMOD Studio\
**Created:** [June 10, 2013, 8:24am UTC](https://qa.fmod.com/t/adding-fmod-to-xcode-ios-iphone-ipad-project/11005 "2013-06-10T08:24:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![markmarijnissen](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@markmarijnissen](https://qa.fmod.com/u/markmarijnissen)\
**Post date:** [June 10, 2013, 8:24am UTC](https://qa.fmod.com/t/adding-fmod-to-xcode-ios-iphone-ipad-project/11005/1 "2013-06-10T08:24:10Z")

</div>

Hi,

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!

---

<div class="post-metadata">

**Author:** ![buzzrick](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/buzzrick/32/473_2.png) [@buzzrick](https://qa.fmod.com/u/buzzrick)\
**Post date:** [July 29, 2014, 12:23am UTC](https://qa.fmod.com/t/adding-fmod-to-xcode-ios-iphone-ipad-project/11005/2 "2014-07-29T00:23:11Z")

</div>

> [@](#):
>
> Hi,
> 
> 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!

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)

---

<div class="post-metadata">

**Author:** ![markmarijnissen](https://avatars.discourse-cdn.com/v4/letter/m/c5a1d2/32.png) [@markmarijnissen](https://qa.fmod.com/u/markmarijnissen)\
**Post date:** [June 18, 2013, 10:43am UTC](https://qa.fmod.com/t/adding-fmod-to-xcode-ios-iphone-ipad-project/11005/3 "2013-06-18T10:43:00Z")

</div>

Ah, didn’t know the L stands for Logging!

That’s useful to know - I’m happy I posted.

---

<div class="post-metadata">

**Author:** ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)\
**Post date:** [June 11, 2013, 12:48am UTC](https://qa.fmod.com/t/adding-fmod-to-xcode-ios-iphone-ipad-project/11005/4 "2013-06-11T00:48:55Z")

</div>

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’.

---

<div class="post-metadata">

**Author:** ![btrussin](https://avatars.discourse-cdn.com/v4/letter/b/bbe5ce/32.png) [@btrussin](https://qa.fmod.com/u/btrussin)\
**Post date:** [April 17, 2017, 10:39pm UTC](https://qa.fmod.com/t/adding-fmod-to-xcode-ios-iphone-ipad-project/11005/5 "2017-04-17T22:39:56Z")

</div>

This is an old post, but useful!

If anybody has tried this and still can’t get it to work (like me), here is another necessary step:

Target -\> Build Phases -\> Link Binary With Libraries -\> [Add Frameworks]  
AudioToolbox.framework  
CoreAudio.framework

---

<div class="post-metadata">

**Author:** ![bills1](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@bills1](https://qa.fmod.com/u/bills1)\
**Post date:** [March 18, 2024, 9:08pm UTC](https://qa.fmod.com/t/adding-fmod-to-xcode-ios-iphone-ipad-project/11005/6 "2024-03-18T21:08:16Z")

</div>

May find the Xcode project in api/core//examples/xcode32 in the FMOD Porgrammers API download useful

Main things you have to do:

1. Xcode project / Search Paths / Header Search Paths: “/Users/you/code/FMOD Programmers API/api/core/inc” (or wherever you put it)

2. Search paths / Library Search Paths: “/Users/you/code/FMOD Programmers API/api/core/lib”

3. Linking - General (on the _Target_, not just the Project):  
Other Linker Flags (Debug): -lfmodL\_$PLATFORM\_NAME  
Other Linker Flags (Release): -lfmod\_$PLATFORM\_NAME

4. Be sure you’ve linked AudioToolbox.framework & CoreAudio.framework like btrussin said

---

<div class="post-metadata">

**Author:** ![bills1](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@bills1](https://qa.fmod.com/u/bills1)\
**Post date:** [April 7, 2024, 7:00pm UTC](https://qa.fmod.com/t/adding-fmod-to-xcode-ios-iphone-ipad-project/11005/7 "2024-04-07T19:00:19Z")

</div>

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
