Jump to content

kabiri

Members
  • Content Count

    60
  • Joined

  • Last visited

Everything posted by kabiri

  1. I have old app in Android. I have used uniDac to connect to sqlite database. The database is encrypted using leAES256 method. FD cannot connect to it. I need to convert database for FD. But when I use both of these in the app, Delphi gives an error : sqlite3.c:(.text+0xb5e8): multiple definition of `sqlite3_aggregate_context' (And many other errors) I know the reason for the error but how to convert the database when I can't use both of them?
  2. kabiri

    [Problem] Convert DB from unidac sqlite to FD sqlite

    The settings are almost the same
  3. kabiri

    [Problem] Convert DB from unidac sqlite to FD sqlite

    I used aes-256 in FD and leAES256 in uni. The only similar option is this.
  4. kabiri

    [Problem] Convert DB from unidac sqlite to FD sqlite

    Because Delphi cannot deploy two libraries with the same name. On Android it stops at the splash screen FD : uni:
  5. kabiri

    [Problem] Convert DB from unidac sqlite to FD sqlite

    This is possible. But at the same time it is impossible. Android phone users have downloaded it from Google Play. If there were private users, this migration would be easy. The problem is that not all users update their app at the same time. Perhaps the best way is to use a database other than sqlite. Or rename the sqlite library (which I don't know how to do)
  6. kabiri

    [Problem] Convert DB from unidac sqlite to FD sqlite

    It is not a problem on PC and it is easy to migrate. There is a problem with the Android device. The DB is on the user's Android device.
  7. Sometimes in IOS when I open the form, the Gesture event does not happen. But in Android this event always happens. I have a form on which I have placed the GestureManager component I have selected it in the Touch section and only the Pan option is enabled. In the event of closing the form, I have acted as follows: Action:=TCloseAction.caFree; And I create it every time before the show. In the Gesture event, I have acted like this if EventInfo.GestureID = igiPan then begin Handled := True; if TInteractiveGestureFlag.gfBegin in EventInfo.Flags then begin fPanPoint := EventInfo.Location; end else begin // end; if TInteractiveGestureFlag.gfEnd in EventInfo.Flags then begin // end; end But in IOS, this event happens randomly. Do you know what the problem is? If the event happens after displaying the form, the event will happen until I close the form. If the event doesn't happen after displaying the form, the event won't happen until I close the form.
  8. Because I did not understand the problem, I wrote with the touch event. Now it works without problems.
  9. I tried that the rest of the controls do not have hittest equal to true. I assign tap event for the form, which always works even when pan does not work. When I enable all gestures the event always happens (but GestureID is never igipan)
  10. I wrote a simple program before and it was running well. I did exactly the same things in the main program, but sometimes when I open the form it works and sometimes it doesn't. In the main form, there are many layers and a rectangle as a background and a 3D view. Even if I hide all of them and the form remains, there is still a problem (only on IOS) I have a tap event on the form that always works. I transferred the components of the previous program to the test program, but the test program works without problems. I have not removed the Gesture event or changed the OnGesture event of the form anywhere in the source.
  11. I had an app that works well on Android and Windows. I added the IOS platform yesterday. But the program remains on the splash screen. uses System.StartUpCopy, FMX.Forms, untMain in 'untMain.pas' {frmMain}, untDataModule in 'untDataModule.pas' {frmDataModule: TDataModule}, untAddTitle in 'untAddTitle.pas' {frmAddTitle: TFrame}, untCategoryList in 'untCategoryList.pas' {frmCategory: TFrame}, untPlay in 'untPlay.pas' {frmPlay}, {$IFDEF android} Androidapi.JNI.Toast in 'Androidapi.JNI.Toast.pas', {$endif} untServerCategory in 'untServerCategory.pas' {frmServerCategory}, untReport in 'untReport.pas' {frmReport}, untSelectCategoryList in 'untSelectCategoryList.pas' {frmSelectCategoryList}, untCategoryItem in 'untCategoryItem.pas' {frmCategoryItem: TFrame}, untHelp in 'untHelp.pas' {frmHelp}; {$R *.res} begin Application.Initialize; Application.CreateForm(TfrmDataModule, frmDataModule); Application.CreateForm(TfrmMain, frmMain); Application.CreateForm(TfrmPlay, frmPlay); Application.CreateForm(TfrmServerCategory, frmServerCategory); Application.CreateForm(TfrmSelectCategoryList, frmSelectCategoryList); Application.CreateForm(TfrmHelp, frmHelp); Application.Run; end. All FormCreate events except frmMain are executed. When I change the main form in the project settings and select another form, it displays that form.
  12. kabiri

    The problem of running the app on IOS

    It depends on whether you decide to use multiple queries or joins or views. Since the ActiveLitnerBox table only contains one record, I decided not to use join tables. The next reason was that in older versions the DefaultCategory could be zero (but I don't want to force the user to change it to 1), but in the newer version I decided that if this value was 0, I would consider a value of 1 for it. This was not possible if I was using Join. But it would have been better if I used if for the second query. Writing code depends on how you look at it.
  13. kabiri

    The problem of running the app on IOS

    Thanks @programmerdelphi2k You are right. I migrated from uniDac to FD and forgot to put the TFDGUIxWaitCursor component on the form and set the Provider property. But putting it on the form didn't help the problem. I noticed this happens on IOS when I call the GetDefaltCategory function on the untDataModule inside the DataModuleCreate function. procedure TfrmDataModule.GetDefaltCategory; var qry: TFDQuery; begin qry := TFDQuery.Create(nil); qry.Connection := DBCon; qry.SQL.Clear; qry.SQL.Add('select * from ActiveBox'); try qry.Open; if not qry.IsEmpty then begin DefaultCategory := qry.fieldByname('ActiveBox').asinteger; if DefaultCategory = 0 then DefaultCategory := 1; end else DefaultCategory := -1; qry.Close; except end; // if DefaultCategory = 0 then // DefaultCategory := 1; DefaultCategoryName := ''; qry.Open; qry.SQL.Clear; qry.SQL.Add('select * from Category'); qry.SQL.Add('where id=' + DefaultCategory.ToString); try qry.Open; if not qry.IsEmpty then begin DefaultCategoryName := qry.fieldByname('Name').AsString; FreeDownload := qry.fieldByname('FreeDownload').asinteger; end; except end; qry.Close; qry.Free; end; But when I call this function from somewhere else, there is no problem.
  14. kabiri

    The problem of running the app on IOS

    Yes , i khow. but when a put TFDConnection on the form delphi add "FireDAC.VCLUI.Wait" to DataModule unit!!! I add FireDAC.FMXUI.Wait myself, but it didn't help. That's why I didn't put the component on the form. This code is also {%CLASSGROUP 'FMX.Controls.TControl'} in the unit. I even created a new form Datamodule and it was the same.
  15. kabiri

    The problem of running the app on IOS

    Create database : procedure TfrmDataModule.DataModuleCreate(Sender: TObject); var DBN: string; NewDb: Boolean; pth: string; applayUpdate: Boolean; newVersion: Integer; begin DBCon:=TFDConnection.Create(Self); qryTmp.Connection:=DBCon; newVersion := 14; DBN := 'myDB.db3'; {$IF Defined(MSWINDOWS)} pth := ExtractFilePath(ParamStr(0)) + DBN; {$ENDIF} {$IF Defined(ANDROID)} pth := GetHomePath + '/' + DBN; {$ENDIF} {$IF Defined(IOS)} pth := TPath.Combine(TPath.GetDocumentsPath, DBN); {$ENDIF} DBCon.Close(); DBCon.DriverName := 'SQLite'; with DBCon.Params as TFDPhysSQLiteConnectionDefParams do begin DriverID:='SQLite'; Database:=pth; Password:='159753'; Encrypt:=TFDSQLiteEncrypt.enAes_256; end; if not FileExists(pth) then begin NewDb := True; end else begin NewDb := False; end; DBCon.Open; {$REGION 'Database'} if NewDb then begin qryTmp.SQL.Clear; qryTmp.SQL.Add ('CREATE TABLE [Category] ([ID] INTEGER PRIMARY KEY AUTOINCREMENT'); qryTmp.SQL.Add(',[ServerCategoryID] INTEGER'); qryTmp.SQL.Add(',[FreeDownload] INTEGER'); qryTmp.SQL.Add(',[Name] NVARCHAR(200) NOT NULL);'); try qryTmp.ExecSQL; except end; . . . //other tables qryTmp.SQL.Clear; qryTmp.SQL.Add('insert into version (ver) values (' + inttostr(newVersion) + ')'); try qryTmp.ExecSQL; except end; FirstRun := True; end else begin FirstRun := False; applayUpdate := False; //update table here for example if Version <= 13 then begin qryTmp.SQL.Clear; qryTmp.SQL.Add('alter TABLE Category add COLUMN [FreeDownload] INTEGER;'); try qryTmp.ExecSQL; except end; qryTmp.SQL.Clear; qryTmp.SQL.Add('update Category set FreeDownload=1'); try qryTmp.ExecSQL; except end; qryTmp.SQL.Clear; qryTmp.SQL.Add('CREATE TABLE WorkTime('); qryTmp.SQL.Add('[Date_] string(10)'); qryTmp.SQL.Add(',[TimeInSec] INTEGER);'); try qryTmp.ExecSQL; except end; applayUpdate := True; end; if applayUpdate then begin qryTmp.SQL.Clear; qryTmp.SQL.Add('update version set ver=' + inttostr(newVersion)); try qryTmp.ExecSQL; except end; end; end; GetDefaltCategory; //GetTotalTime; end;
  16. kabiri

    The problem of running the app on IOS

    Sorry, I forgot that I rewrote untMain from scratch and it only has the TfrmMain.FormCreate event. Now the breakpoint works. Now the event time of TfrmDataModule.DataModuleCreate ends, the program stops in the System.Generics.Collections unit, I have not put a breakpoint here. I didn't understand anything from Call Stack which routine made me go here
  17. kabiri

    The problem of running the app on IOS

    No, It does not run
  18. kabiri

    The problem of running the app on IOS

    Maybe the problem is Delphi. Because I recently had several problems with the IDE (especially after installing the patch). The back button does not work in the toolbar Also these buttons. I use a shortcut: Sometimes I see the selection form like this in the settings: When I change the platform in the toolbar, it does not change in the project manager panel. Exactly like this: https://quality.embarcadero.com/browse/RSP-30799?jql=text ~ "select platform"
  19. kabiri

    The problem of running the app on IOS

    I will check again. But my breakpoints work on Android and Windows. I've used global variables and functions elsewhere and it's unlikely that they were removed by the compiler optimizer. windows: IOS:
  20. kabiri

    The problem of running the app on IOS

    In the DataModuleCreate function, if the sqlite database and tables do not exist, they are created. This part apparently runs without errors because it works correctly during debugging and the first time it creates the tables and inserts the default value, and the second time the app is run it receives the information from the tables correctly. If I put breakpoints in all lines of unit main, it doesn't make any difference and the execution doesn't stop at breakpoints.
  21. kabiri

    The problem of running the app on IOS

    Yes, it is in debug mode. Breakpoint works in other forms, but it does not work in this form(frmMain/untMain) What could be the problem that only happens on IOS?
  22. kabiri

    The problem of running the app on IOS

    The previous post was about 2 hours ago, I don't know why it was not sent! @Dave Nottage & @programmerdelphi2k Thankful Yes, I had tried the blank project, it work. One of the problems is that the main file is not debugged. I first tested the things I knew, then I asked a question here because I couldn't debug. I don't know why unit main is not traceable and debug is disabled only in this form.
  23. kabiri

    The problem of running the app on IOS

    DB is created at runtime and does not exist at design time. But to be sure, I checked its connection value is False. In TfrmMain.FormCreate and TfrmMain.FormShow TfrmMain.FormActivate events, I have nothing to do with the database. begin Application.Initialize; Application.CreateForm(TfrmMain, frmMain); Application.Run; end. procedure TfrmMain.FormCreate(Sender: TObject); begin //Application.Create(TfrmDataModule, frmDataModule); frmDataModule:=TfrmDataModule.Create(self); isEmpty:=True; I gave these changes and it didn't make any difference. Line frmDataModule:=TfrmDataModule.Create(self); I deleted Now it displays the main form, but breakpoints are still disabled.
  24. I have a $99 developer account from Apple. Now I can compile the app for the actual phone and run it on the phone. But when I select Application store mode. In the Project - Option - Development - Provisioning section, the Provision Profile value is empty and only the default AUTO option is displayed. On the Apple website, in the Certificates section, I have created the iOS Distribution certificate and installed it in MACOS as well. Where am I wrong?
×