Vanar 2 Posted August 2 (edited) I tested Kastri-master\Demos\AdMob. Advertising works perfectly in both iOS and Android! But when I try to use this mechanism in my iOS application, the application does not start (crashes on startup) Everything works well under Android. After a long search for the error, it turned out that the culprit is the unit FireDAC.Phys.SQLiteWrapper.Stat, which is used in my application! I can’t give up the unit FireDAC.Phys.SQLiteWrapper.Stat, since I’ll have to rewrite everything. The problem is described in https://en.delphipraxis.net/topic/6440-firebase-adertising-problem-after-ios-14/ and the same thing happens to me How to check (see the error): If you add the unit FireDAC.Phys.SQLiteWrapper.Stat to Kastri-master\Demos\AdMob\Unit1.pas, the iOS application does not launch (crashes on startup) Are there ways to fix the error? Edited August 2 by Vanar Share this post Link to post
PetrifiedDelhpi 0 Posted August 2 (edited) I had the same problem in an own application, and with Kastri FCMRebooted demo. I just removed FireDAC.Phys.SQLiteWrapper.Stat, and then FireDAC uses dynamic linking, and probably uses the native sqlite3 dylib. The database still works. ChatGPT suggested using TFDPhysSQLiteDriverLink.Create(nil).VendorLib := ''; to use the native library, but that didn't help with statical linking. Another option would to edit the linking of the static library in the unit, to use the iOS native lib. EDIT: on Android, you have to use the SQLiteWrapper.Stat unit, or deploy the dynamic lib.. Edited August 2 by PetrifiedDelhpi Add info Share this post Link to post
Vanar 2 Posted August 5 On 8/2/2024 at 10:09 PM, PetrifiedDelhpi said: I had the same problem in an own application, and with Kastri FCMRebooted demo. I just removed FireDAC.Phys.SQLiteWrapper.Stat, and then FireDAC uses dynamic linking, and probably uses the native sqlite3 dylib. The database still works. ChatGPT suggested using TFDPhysSQLiteDriverLink.Create(nil).VendorLib := ''; to use the native library, but that didn't help with statical linking. Another option would to edit the linking of the static library in the unit, to use the iOS native lib. EDIT: on Android, you have to use the SQLiteWrapper.Stat unit, or deploy the dynamic lib.. Thanks for the answer, but can you explain in more detail or maybe you have a ready-made module? "- Another option would to edit the linking of the static library in the unit, to use the iOS native lib." Share this post Link to post
PetrifiedDelhpi 0 Posted August 9 On 8/5/2024 at 9:30 AM, Vanar said: Thanks for the answer, but can you explain in more detail or maybe you have a ready-made module? "- Another option would to edit the linking of the static library in the unit, to use the iOS native lib." I tried to go that way before I realized that FireDAC.Phys.SQLiteWrapper.Stat is totally unnecessary on iOS. I don't have Delphi at home, but there are somewhere in the units or inc files the linking of the static library used by Delphi. Delphi can also link statically to a "dynamic" library if it is available, at least on Windows. http://docwiki.embarcadero.com/RADStudio/Athens/en/Connect_to_SQLite_database_(FireDAC) btw, I don't believe that the dynamic linking of the proprietary iOS lib works, although it is mentioned on that page Share this post Link to post
Vanar 2 Posted August 9 3 hours ago, PetrifiedDelhpi said: I tried to go that way before I realized that FireDAC.Phys.SQLiteWrapper.Stat is totally unnecessary on iOS. I don't have Delphi at home, but there are somewhere in the units or inc files the linking of the static library used by Delphi. Delphi can also link statically to a "dynamic" library if it is available, at least on Windows. http://docwiki.embarcadero.com/RADStudio/Athens/en/Connect_to_SQLite_database_(FireDAC) btw, I don't believe that the dynamic linking of the proprietary iOS lib works, although it is mentioned on that page Thank you very much Share this post Link to post