get_isDebugBuild error in Xcode

Hi Everyone,
I have no problem building and running my game until I check Development Build in the build settings. I then receive the below error in Xcode.
I don’t make any calls to this in my project so I’m not sure where it is coming from. Does anyone have any experience with this error?
Unhandled Exception: System.ArgumentException: get_isDebugBuild can only be called from the main thread.

Constructors and field initializers will be executed from the loading thread when loading a scene.

It was something in the Unity standard assets

I am having the same problem when running on iOS. It apears it is something in Unity Ads.

Unhandled Exception: System.ArgumentException: get_isDebugBuild can only be called from the main thread.

How did you solve this?

Does Unity Ads even work on Unity 5? When installing it gives a warning that it might be incompatible with Unity 5.