Jump to content

Recommended Posts

My app uses Firebase Admob support for showing advertisement banners. I developed app with Delphi 10.4.2 using the information from 

Embarcadero article at https://docwiki.embarcadero.com/RADStudio/Sydney/en/IOS_Firebase_Support  and from Dave Nottage's articles regarding Firebase integration  with Delphi at https://delphiworlds.com/2017/05/adding-firebase-cloud-messaging-mobile-apps-part-2/  and https://delphiworlds.com/2018/08/firebase-cloud-messaging-revisited/. I uploaded my app to App Store.  It is name is "Evdeki Bar". It means "Bar At Home" in Turkish. My app works without problems on IOS 13 , IOS 14 and IOS 15 devices when it is downloaded from App Store. But, When I run from Delphi it does not work with IOS SDK 15.0 and IOS SDK 15.2. It stops executing after showing launch screen and waiting 2-3 seconds. It does not show my first form. 

I inspected the problem thoroughly, but, I could not found a solution to it. I analyzed device logs for my app. There is no app crash in the logs. 

I noticed that during launch of my app by PAServer app in Mac, iosinstall task crashes.  I tried running app with Delphi 10.4.2 and Delphi 11.  The problem exists with the both Delphi versions. I tried with Firebase IOS SDK versions  6.18, 6.19, 6.28, 6,.29, 6.30, 6.31 and 8.10, and problem continues with all of these versions.  Firebase IOS SDK 6.31 includes Google Mobile Ads SDK 7.64 which is recommended version for IOS 14.0. I tried XCode 13.0 and  XCode 13.2.1 and problem still continues. Moreover, I tried with both Debug and Release configurations. 

 

Is there a solution or workaround to this problem?     

Share this post


Link to post
2 minutes ago, Ömer Gözlek said:

Dave Nottage's articles

Those articles relate to Firebase Cloud Messaging, but your question seems to be about Firebase AdMob?

3 minutes ago, Ömer Gözlek said:

Is there a solution or workaround to this problem?

Can you provide a minimal test project that reproduces the problem?

Share this post


Link to post
Posted (edited)

Thank you for your prompt reply.

19 hours ago, Dave Nottage said:

Those articles relate to Firebase Cloud Messaging, but your question seems to be about Firebase AdMob?

As you said, those articles was about to Firebase Cloud Messaging, but I used them to integrate Firebase IOS SDK to my project. Embarcadero article was not complete. It does not mention GoogleService-Info.plist deployment and extra framework definitions. The working link for Embarcadero article is https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Firebase_and_AdMob_iOS_Support.


I prepared a sample project with Bundle identifier of my app in App Store. During testing of sample project, it started to give Class 6 with Debug configuration run. It did not give such an error with my original app.  


By the way, I am using Big Sur and Same project without Firebase Advertising works without errors on my iPAD using Delphi.

 

  

 

FirebaseAdvertisingForIOS.rar

Edited by Ömer Gözlek
typo

Share this post


Link to post
Posted (edited)

I refreshed provisioning profiles, deleted old provisioning profiles from Mac and renewed device support files. After doing these operations, sample project started to run as expected. But, my original project isn't running as before. I am searching for the cause of it.  

FirebaseAdvertisingForIOS.rar

Edited by Ömer Gözlek
Correction

Share this post


Link to post
1 hour ago, Ömer Gözlek said:

But, my original project isn't running as before

What happens when you run the project via the debugger?

Share this post


Link to post
Posted (edited)

I have just found the culprit. It is FireDAC.Phys.SQLiteWrapper.Stat unit.

 

I will explain how did I reach this conclusion. I debugged the source and found that breaks at the constructor of TiOSFirebaseBannerAd in FMX.Advertising.Firebase.iOS unit.  The first line of constructor   which is TGADMobileAds.OCClass.sharedInstance.startWithCompletionHandler(nil) causes error. This line initializes the Admob library.  But, my application id and banner id s are all correct since sample app works without problems. Then I started to add my original app's units to sample project step by step. Firstly, I found the unit which is causing the problem. After that, I focused on the units in its uses list. Finally I found the actual offending unit. It is FireDAC.Phys.SQLiteWrapper.Stat. I think something in its initialization section is causing the problem.  

 

Actually, I don't need that unit in my source code. It is a left over unit from my previous works.

 

Thank you very much for your help on directing me towards the solution.
     

Edited by Ömer Gözlek
Some typos
  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×