# Firebase issues!

**URL:** <https://forum.juce.com/t/firebase-issues/52579>\
**Category:** General JUCE discussion\
**Created:** [August 12, 2022, 9:34am UTC](https://forum.juce.com/t/firebase-issues/52579 "2022-08-12T09:34:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![dankly](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dankly/32/13848_2.png) [@dankly](https://forum.juce.com/u/dankly)\
**Post date:** [August 12, 2022, 9:34am UTC](https://forum.juce.com/t/firebase-issues/52579/1 "2022-08-12T09:34:26Z")

</div>

Is anyone having any success with the Firebase frameworks, particularly Google Mobile Ads, in their iOS apps?

I cannot for the life of me get the ads working. I have been through these excellent threads from @matkatmusic but cannot replicate what he has achieved

> [@JUCE + Firebase/AdMob: Lets monetize our JUCE iOS apps with Ads (partial How-To)](https://forum.juce.com/t/juce-firebase-admob-lets-monetize-our-juce-ios-apps-with-ads-partial-how-to/29369):
>
> I would like to open the discussion of added Ads via Google Mobile Ads/Firebase Admob to JUCE. I’ll start by explaining how I got it to “work” on my end, getting around the issue of Google wanting us to use CocoaPods to install/configure Firebase-AdMob with our xcode projects. So, without further adieu… After downloading the SDK from the Google Firebase website, and creating a generic JUCE GUI application for iOS: I was able to get it working/compiling by doing the following: I had to inc…

> [@Mobile JUCE + Admob/Firebase Library Repo & Tutorials](https://forum.juce.com/t/mobile-juce-admob-firebase-library-repo-tutorials/29555):
>
> I have created a few tutorials for adding support for Google’s Firebase framework to JUCE iOS and Android projects. This will allow you to monetize your iOS and Android Apps written with JUCE. They are in the playlist on Youtube here: [https://www.youtube.com/watch?v=614Sxootyw0&list=PLL4Pwd7fD7npBIpgp6Hwzod1PkjsbI0dW&index=2](https://www.youtube.com/watch?v=614Sxootyw0&list=PLL4Pwd7fD7npBIpgp6Hwzod1PkjsbI0dW&index=2) You can check out the repo that results from the videos here: [https://github.com/matkatmusic/AdMob](https://github.com/matkatmusic/AdMob)

The guides are 4 years old now and I can only guess that some things have changed since then. Firstly, I cannot get the .xc frameworks to be detected by Xcode when I add them to the custom frameworks section. The only way I can seem to get them loaded into the project is if I embed them, but I think this may be the wrong way to do it. I can build at this point, but the app fails to install (on simulator) with this error message

 ![Screenshot 2022-08-12 at 10.17.14](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/4/4784b975a9786f1451972960a9ef6e1c4e73f464.png)

When I follow that folder structure there is no such folder beyond ‘com.apple.mobile.installd.staging’, as in it is empty.

Going back to the embedding of the framework, the problem I am having looks like it could be the same as this [https://developer.apple.com/forums/thread/126598](https://developer.apple.com/forums/thread/126598)

I’m pulling my hair out with it, as I’m sure it is not as complicated as it seems to me. I must confess I don’t know much about static and dynamic libraries and how they need to be structured. I did try and load the frameworks in as libraries (firebase.a) but again they could not be detected by Xcode. Any pointers in the right direction would be hugely appreciated, as I’m sure people are monetising ads in their Juce apps??

Thanks

---

<div class="post-metadata">

**Author:** ![dikadk13](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dikadk13/32/17750_2.png) [@dikadk13](https://forum.juce.com/u/dikadk13)\
**Post date:** [August 30, 2022, 12:57am UTC](https://forum.juce.com/t/firebase-issues/52579/2 "2022-08-30T00:57:52Z")

</div>

Hey @dankly!

I just ran into issues with Firebase myself. OMG I wasted so many hours trying different combination of Header Search Path, Frameworks, XFrameworks, other Projucer/xCode evil things. But I finally got Firebase Analytics and Crashlytics to work on iOS. I suspect issue with Google Mobile Ads are most likely have similar causes.

Due to changed in recent Firebase iOS SDK (i.e. 9.5.0) - it uses now Swift binaries I didn’t find any way to link it properly and make some with Projucer. I went back on GH looking for older release of Firebase which doesn’t use Swift Binaries and it worked with 8.5.0!

Firebase 8.5.0 [Release Firebase iOS 8.5.0 · firebase/firebase-ios-sdk · GitHub](https://github.com/firebase/firebase-ios-sdk/releases/tag/8.5.0) [Release Firebase C++ SDK 8.5.0 · firebase/firebase-cpp-sdk · GitHub](https://github.com/firebase/firebase-cpp-sdk/releases/tag/v8.5.0)

I’ve updated my sample repo:

> **[GitHub - dikadk/Juce-Firebase](https://github.com/dikadk/Juce-Firebase)**
>
> Contribute to dikadk/Juce-Firebase development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![dankly](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dankly/32/13848_2.png) [@dankly](https://forum.juce.com/u/dankly)\
**Post date:** [August 30, 2022, 4:12pm UTC](https://forum.juce.com/t/firebase-issues/52579/3 "2022-08-30T16:12:29Z")

</div>

Hi, thanks for your help. I may be being stupid but there doesn’t seem to be any xcframeworks in the v8.5 cpp-sdk folder?!

---

<div class="post-metadata">

**Author:** ![eyalamir](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/eyalamir/32/2978_2.png) [@eyalamir](https://forum.juce.com/u/eyalamir)\
**Post date:** [August 30, 2022, 4:20pm UTC](https://forum.juce.com/t/firebase-issues/52579/4 "2022-08-30T16:20:08Z")

</div>

My solution to similar issues with Firebase and other kinds of databases was to add a container in Google Cloud Run, or a cloud function that would be the only entity communicating with the database directly and forward whatever results back to the plugin.

That way, the plugin can just send plain https messages, which makes the cross platform build way simpler, and works easily on iOS too.

---

<div class="post-metadata">

**Author:** ![dikadk13](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dikadk13/32/17750_2.png) [@dikadk13](https://forum.juce.com/u/dikadk13)\
**Post date:** [August 30, 2022, 5:05pm UTC](https://forum.juce.com/t/firebase-issues/52579/5 "2022-08-30T17:05:39Z")

</div>

No worries. Firebase setup is too complicated. You need to download pre-build versions of the libraries.

 ![Screen Shot 2022-08-30 at 1.03.13 PM](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/f/f523aa89c5a223fc09ae2b68876746636f7f3434.jpeg)  
 ![Screen Shot 2022-08-30 at 1.03.35 PM](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/a/a787bf570adf2f438f7fd06359e684533e6e82d4.jpeg)

---

<div class="post-metadata">

**Author:** ![dikadk13](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dikadk13/32/17750_2.png) [@dikadk13](https://forum.juce.com/u/dikadk13)\
**Post date:** [August 30, 2022, 5:09pm UTC](https://forum.juce.com/t/firebase-issues/52579/6 "2022-08-30T17:09:24Z")

</div>

@eyalamir Can you please elaborate on your approach?  
Also I would love to turn Firebase into juce module… But I’m not sure how to approach it. I’ve created simple just modules before, but not something that has quite an extensive setup.

I’m currently running into issue when iOS Auv3 plugin doesn’t report Analytics even after confirming that Firebase was successfully initialized. Of course this issue is not present in Standalone build.

---

<div class="post-metadata">

**Author:** ![eyalamir](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/eyalamir/32/2978_2.png) [@eyalamir](https://forum.juce.com/u/eyalamir)\
**Post date:** [August 30, 2022, 5:21pm UTC](https://forum.juce.com/t/firebase-issues/52579/7 "2022-08-30T17:21:05Z")

</div>

Yeah, sure.  
Google has a service called “Cloud Run”

> **[Cloud Run](https://cloud.google.com/run)**
>
> Build and deploy scalable containerized apps written in any language (like Go, Python, Java, Node.js, .NET, and Ruby) on a fully managed platform.

It lets you essentially run a docker container which will be launched and run for a short period of time whenever an http request happens. That container can run a node.js program, a C++ program, a Python program… whatever you want, on a Linux machine you configure with a dockerfile.

Then you set up a simple web server that answers HTTP requests that take some input and returns an output, and does all the heavy duty of talking to Firebase, SQL or whatever your database is.

Then the plugin/app only needs to make regular HTTPS requests (for example, using `juce::URL`) without any direct connection to the specific type of database, which you can in fact even change later without the plugin knowing about it.

> [@dikadk13](#):
>
> Also I would love to turn Firebase into juce module… But I’m not sure how to approach it.

TBH I tried it and the Firebase build system was too complicated and non-portable, which is why I went with the solution above, and never looked back. 🙂

---

<div class="post-metadata">

**Author:** ![dikadk13](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dikadk13/32/17750_2.png) [@dikadk13](https://forum.juce.com/u/dikadk13)\
**Post date:** [August 30, 2022, 5:50pm UTC](https://forum.juce.com/t/firebase-issues/52579/8 "2022-08-30T17:50:14Z")

</div>

Thanks for detailed overview! Sounds like a great approach, plus prevents from future issues with dependency changes (i.e. Firebase moving to Swift binaries)

What do you use for Crash reporting of Auv3 plugins?

---

<div class="post-metadata">

**Author:** ![eyalamir](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/eyalamir/32/2978_2.png) [@eyalamir](https://forum.juce.com/u/eyalamir)\
**Post date:** [August 30, 2022, 5:54pm UTC](https://forum.juce.com/t/firebase-issues/52579/9 "2022-08-30T17:54:14Z")

</div>

Not sure I’m the right person to get the tips on AUv3: we’re now in the process of working on the first commercial AUv3 I’ve ever done, so it’s possible I might not have all the answers.

But so far I just used the mechanisms that are built in the App Store (App Store Connect) to see crash logs and such from users, which was pretty helpful.

---

<div class="post-metadata">

**Author:** ![dikadk13](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dikadk13/32/17750_2.png) [@dikadk13](https://forum.juce.com/u/dikadk13)\
**Post date:** [August 30, 2022, 7:37pm UTC](https://forum.juce.com/t/firebase-issues/52579/10 "2022-08-30T19:37:47Z")

</div>

Gotcha! Thanks!

---

<div class="post-metadata">

**Author:** ![dankly](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dankly/32/13848_2.png) [@dankly](https://forum.juce.com/u/dankly)\
**Post date:** [August 31, 2022, 2:37pm UTC](https://forum.juce.com/t/firebase-issues/52579/11 "2022-08-31T14:37:08Z")

</div>

Great info from you both, thank you. I STILL can’t even get a single firebase framework (even the v8.5 ones) to copy into Xcode via that ‘Extra Custom Frameworks’ box. Ive added the search path, but as soon as Xcode loads up it is red in the framework list (and has the .xcframework extension). It works fine if I drag them direct into Xcode from the exact same location. The only way it will work (or at least seem to) is if I embed them from Projucer, but then that gives me the weird info.plist error in post 1. Im tearing my hair out with it!

---

<div class="post-metadata">

**Author:** ![dikadk13](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dikadk13/32/17750_2.png) [@dikadk13](https://forum.juce.com/u/dikadk13)\
**Post date:** [September 1, 2022, 12:35am UTC](https://forum.juce.com/t/firebase-issues/52579/12 "2022-09-01T00:35:05Z")

</div>

Did you modified Projucer to work with \*.xcframeworks"?  
I think it’s a good idea to checkout my repo I posted above and see if you’re still getting same issues with that project.

---

<div class="post-metadata">

**Author:** ![dankly](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dankly/32/13848_2.png) [@dankly](https://forum.juce.com/u/dankly)\
**Post date:** [September 1, 2022, 9:57am UTC](https://forum.juce.com/t/firebase-issues/52579/13 "2022-09-01T09:57:07Z")

</div>

Yes I did, but I think you may be correct in that this is where the problem lies. Ive changed that code in this path JUCE/extras/Projucer/Source/ProjectSaving/jucer\_ProjectExport\_Xcode.h but it doesn’t seem to be doing anything. In fact I’ve commented out a huge chunk of code in that header file and it isn’t doing anything, no errors or anything! The header is not copied into the project file either that I can see. Ill try start a new project with this edited header in place and see what happens. I feel like I’m on the right track though. Thanks.

---

<div class="post-metadata">

**Author:** ![dankly](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dankly/32/13848_2.png) [@dankly](https://forum.juce.com/u/dankly)\
**Post date:** [September 1, 2022, 11:43am UTC](https://forum.juce.com/t/firebase-issues/52579/14 "2022-09-01T11:43:16Z")

</div>

I think my issue may be to do with ‘Build custom Projucer from source’, in your guide. If I just start a new project as I always do, nothing that I do to change those jucer\_ProjectExport\_Xcode.h makes any difference. If I modify those and then open the /Users/…/Documents/JUCE/extras/Projucer/Projucer.jucer the effects can be seen with errors etc. What is the purpose of that Projucer.jucer? Am I supposed to start a new project from that somehow?

Sorry I know I’m being an amateur but I’ve never had to do anything but start a new project from the standard Producer app icon in the top of the Juce directory.

---

<div class="post-metadata">

**Author:** ![dikadk13](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dikadk13/32/17750_2.png) [@dikadk13](https://forum.juce.com/u/dikadk13)\
**Post date:** [September 1, 2022, 2:11pm UTC](https://forum.juce.com/t/firebase-issues/52579/15 "2022-09-01T14:11:38Z")

</div>

jucer\_ProjectExport\_Xcode.h you need to edit is not part of juce\_modules. It’s code for the app - Projucer. So you need to rebuild it and use if to open project you’re working on.

1. Checkout juce repo
2. If you’re on Mac - Go to extras/Projucer/Build/
3. Open Xcode project Projucer.xcodeproj
4. Edit jucer\_ProjectExport\_Xcode.h
5. Build Projucer
6. Use new Projucer.app to open your project with “.xcframeworks”

---

<div class="post-metadata">

**Author:** ![dankly](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dankly/32/13848_2.png) [@dankly](https://forum.juce.com/u/dankly)\
**Post date:** [September 2, 2022, 2:24pm UTC](https://forum.juce.com/t/firebase-issues/52579/16 "2022-09-02T14:24:21Z")

</div>

Deleted, apologies. I may have got it working. Will update soon.

---

<div class="post-metadata">

**Author:** ![dankly](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dankly/32/13848_2.png) [@dankly](https://forum.juce.com/u/dankly)\
**Post date:** [September 5, 2022, 9:20am UTC](https://forum.juce.com/t/firebase-issues/52579/17 "2022-09-05T09:20:10Z")

</div>

That was painful, but I’ve sorted it. The issue I was having all along was as you said @dikadk13 , thanks for all your help. I didn’t realise that was the way the Projucer app was built and so when I edited the code, I was then still using the old Projucer app from my dock. You live and learn.

FYI, I have it working using the latest version of firebase (9.4). I don’t know if this will solve the problems you were having, but you need to add a blank .swift file to your source. I added it direct in Xcode (choose to add bridging header when asked) then that will save in your builds folder. Then back in Projucer/Source choose add existing file and select it.

 ![Simulator Screen Shot - iPhone 13 Pro - 2022-09-05 at 10.10.59](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/d/dfa4ce424c963537e5d33f4b23fbd0186552a723.png)

---

<div class="post-metadata">

**Author:** ![tobyscreamer](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/tobyscreamer/32/12563_2.png) [@tobyscreamer](https://forum.juce.com/u/tobyscreamer)\
**Post date:** [November 22, 2022, 3:35pm UTC](https://forum.juce.com/t/firebase-issues/52579/18 "2022-11-22T15:35:36Z")

</div>

Thanks a lot @dankly @eyalamir @dikadk13 !  
Firebase Analytics and Crashlytics work well on my iOS (and Android) App 🙂

But I can’t get Admob to work on iOS…

@dankly Do you use Admob (depreciated framework) or GMA (Google Mobile Ads)?  
If I use:

- Firebase 8.5 (or Firebase 10.2) and admob.h I have the following errors when compiling:

> Undefined symbol: _OBJC\_CLASS_$\_GADRewardBasedVideoAd  
> Undefined symbol: _OBJC\_CLASS_$\_GADInterstitial  
> Undefined symbol: _OBJC\_CLASS_$\_GADNativeExpressAdView

- Firebase 10.2 and gma.h, compile ok but firebase::gma::Initialize not working…  
Console messages :

> **Loading UIApplication category for Firebase App**  
> **No app has been configured yet.**  
> **The default Firebase app has not yet been configured. Add `FirebaseApp.configure()` to your application initialization. This can be done in in the App Delegate’s application(\_:didFinishLaunchingWithOptions:)`(or the`@main` struct’s initializer in SwiftUI). Read more: [https://goo.gl/ctyzm8.](https://goo.gl/ctyzm8.)**

And “future.status()” stay eternally in firebase::kFutureStatusPending status (Initialization on-going, continue to wait…)

Any idea ?

---

<div class="post-metadata">

**Author:** ![dankly](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/dankly/32/13848_2.png) [@dankly](https://forum.juce.com/u/dankly)\
**Post date:** [November 22, 2022, 4:32pm UTC](https://forum.juce.com/t/firebase-issues/52579/19 "2022-11-22T16:32:55Z")

</div>

Did you add a blank .swift file?

---

<div class="post-metadata">

**Author:** ![tobyscreamer](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/tobyscreamer/32/12563_2.png) [@tobyscreamer](https://forum.juce.com/u/tobyscreamer)\
**Post date:** [November 22, 2022, 4:41pm UTC](https://forum.juce.com/t/firebase-issues/52579/20 "2022-11-22T16:41:08Z")

</div>

@dankly Yes

[Next page](https://forum.juce.com/t/firebase-issues/52579.md?page=2)
