# FMOD Studio API works in iOS simulator, but not on device

**URL:** <https://qa.fmod.com/t/fmod-studio-api-works-in-ios-simulator-but-not-on-device/11581>\
**Category:** FMOD Engine\
**Created:** [July 28, 2014, 4:38am UTC](https://qa.fmod.com/t/fmod-studio-api-works-in-ios-simulator-but-not-on-device/11581 "2014-07-28T04:38:12Z")\
**Posts on this page:** 2\
**Page:** 1

<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 28, 2014, 4:38am UTC](https://qa.fmod.com/t/fmod-studio-api-works-in-ios-simulator-but-not-on-device/11581/1 "2014-07-28T04:38:12Z")

</div>

(UPDATED)

I’m trying to get FMOD studio working in an iOS application (using C++ in Xcode) and everything works perfectly in the iOS Simulator, but whenever I try to run the app on a physical device everything loads okay, and without errors, but it can’t find and play any events.

Whenever I perform ANY queries I always get FMOD\_ERR\_EVENT\_NOTFOUND responses for them. This includes calling

- Studio::System::getEvent
- Studio::System::getMixerStrip
- even Studio::System::lookupId

When I call any methods on a Studio::Bank class, I get an FMOD\_ERR\_NOTREADY error.

I’ve tried with different devices (including an iPhone 5s and an iPad 3) and neither device works.

Does anyone have any suggestions?

------UPDATE-------

I’ve done some more research, and I was using FMOD\_STUDIO\_LOAD\_BANK\_NONBLOCKING to load the Bank files asynchronously. I’ve switched it to us FMOD\_STUDIO\_LOAD\_BANK\_NORMAL, and now the following method completely locks up the application.

```
FMOD_ErrorCheck(_studioSystem->loadBankFile(bankFilePath, FMOD_STUDIO_LOAD_BANK_NORMAL, &bank));

```

The exact same method on the iOS Simulator works correctly.

---

<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:24am UTC](https://qa.fmod.com/t/fmod-studio-api-works-in-ios-simulator-but-not-on-device/11581/2 "2014-07-29T00:24:25Z")

</div>

It turns out I wasn’t linking the lib files correctly. I was missing the linker flags in my Xcode configuration.

> Add “-lfmodL\_$PLATFORM\_NAME” and “-lfmodstudioL\_$PLATFORM\_NAME” to “Other Linker Flags” (in the “Linker” section)

It was weird because things _appeared_ to be working fine even though I apparently wasn’t even linking the FMOD libs.

The post from markmarijnissen at [http://52.88.2.202/questions/question/forum-39077](http://52.88.2.202/questions/question/forum-39077) helped a lot on how to correctly set up FMOD in an Xcode project.
