Jump to content

grantful

Members
  • Content Count

    85
  • Joined

  • Last visited

Posts posted by grantful


  1. I am trying to to take a backup sqlite database and move it from the default Downloads folder to the default documets folder.

    procedure CopyFileFromUri(const AUri: string; const ADestPath: string);
    var
      LInputStream: JInputStream;
      LOutputStream: JFileOutputStream;
      LBuffer: TJavaArray<Byte>;
      LBytesRead: Integer;
    begin
      LInputStream := TAndroidHelper.Context.getContentResolver.openInputStream(StrToJURI(AUri));
      try
        LOutputStream := TJFileOutputStream.JavaClass.init(StringToJString(ADestPath));
        try
          LBuffer := TJavaArray<Byte>.Create(1024);
          try
            repeat
              LBytesRead := LInputStream.read(LBuffer);
              if LBytesRead > 0 then
                LOutputStream.write(LBuffer, 0, LBytesRead);
            until LBytesRead = -1;
          finally
            LBuffer.Free;
          end;
        finally
          LOutputStream.close;
        end;
      finally
        LInputStream.close;
      end;
    end;
     procedure TfrmVehicle.ReplaceDBFile(const SourcePath: string);
    var
      DestPath: string;
    begin
      // Assuming the destination database is in the documents folder
      DestPath := TPath.Combine(TPath.GetDocumentsPath, 'AutoRepair.db');
    
      try
        // If a database file already exists at the destination, delete it first
        if TFile.Exists(DestPath) then
          TFile.Delete(DestPath);
    
        // Copy the selected database file to the destination
        TFile.Copy(SourcePath, DestPath);
        //CopyFileFromUri(SourcePath, DestPath);
        ShowMessage('Database replaced successfully.');
    
        // Refresh the FireDAC connection and datasets
        //RefreshFireDACConnection;
    
      except
        on E: Exception do
        begin
          ShowMessage('Error replacing database: ' + E.Message);
          // Handle the exception as needed, e.g., log it or take appropriate action.
        end;
      end;
    end;
    
    function GetFilePathFromUri(const AUri: string): string;
    var
      LUri: Jnet_Uri;
      LCursor: JCursor;
      LColumnIndex: Integer;
    begin
      Result := '';
      LUri := StrToJURI(AUri); // Convert the URI string to a Jnet_Uri object
      if LUri.getScheme.equals(StringToJString('content')) then
      begin
        // Query the content resolver to get the file path
        LCursor := TAndroidHelper.Context.getContentResolver.query(LUri, nil, nil, nil, nil);
        if LCursor <> nil then
        begin
          try
            if LCursor.moveToFirst then
            begin
              LColumnIndex := LCursor.getColumnIndex(StringToJString('_data')); // Column for file path
              if LColumnIndex <> -1 then
                Result := JStringToString(LCursor.getString(LColumnIndex));
            end;
          finally
            LCursor.close;
          end;
        end;
      end
      else if LUri.getScheme.equals(StringToJString('file')) then
      begin
        // If it's a file URI, just return the path
        Result := JStringToString(LUri.getPath);
      end;
    end;
    
    procedure TfrmVehicle.FileSelectorComplete(Sender: TObject; const AOK: Boolean);
    var
      I: Integer;
      FileName, FilePath, RawUri: string;
    begin
      try
        if AOK then
        begin
          for I := Low(FFilesSelector.SelectedFiles) to High(FFilesSelector.SelectedFiles) do
          begin
            try
              // Get the raw URI and log it
              RawUri := FFilesSelector.SelectedFiles[I].RawPath;
              ShowMessage('Raw URI: ' + RawUri); // Log the raw URI
    
              // Get the decoded file path and log it
              FilePath := GetFilePathFromUri(RawUri);
              ShowMessage('Decoded File Path: ' + FilePath); // Log the decoded file path
    
              // Extract the file name from the decoded path
              FileName := ExtractFileName(FilePath);
              ShowMessage('Selected File Name: ' + FileName); // Log the selected file name
    
              if SameText(FileName, 'AutoRepair.db') then
              begin
                ReplaceDBFile(FilePath);
                Exit;
              end;
            except
              on E: Exception do
              begin
                ShowMessage('An error occurred while processing file: ' + E.Message);
                // Additional exception handling code here, if needed
              end;
            end;
          end;
          ShowMessage('No file named AutoRepair.db was selected.');
        end
        else
        begin
          ShowMessage('No files were selected.');
        end;
      except
        on E: Exception do
        begin
          ShowMessage('An error occurred: ' + E.Message);
          // Additional exception handling code here, if needed
        end;
      end;
    end;

    It compiles but

    I am having a problem implementing this into my app. On android i get Selected filename : =  nothing. ANy help is much appreciated. 


  2. I have not compiled this source in a while .  It compiles and runs fine on Android.  Bun now on my Iphone it runs and looks like it closes , but if i swipe up from bottom of phone it is in the apps that are running  but stulck at the splashscreen. here is crash log from the macbook

    Incident Identifier: 12B98614-9FFE-4BAB-B6F8-713A95799FBA
    CrashReporter Key:   56e486012e72219e36649602f327ff3173d04242
    Hardware Model:      iPhone15,3
    Process:             FlatRateJobTracker [5835]
    Path:                /private/var/containers/Bundle/Application/0A97B18F-C59A-4747-B1FF-DC958AAF3205/FlatRateJobTracker.app/FlatRateJobTracker
    Identifier:          FlatRateJobTracker
    Version:             1.0.0 (1.0.0)
    Code Type:           ARM-64 (Native)
    Role:                Foreground
    Parent Process:      launchd [1]
    Coalition:           FlatRateJobTracker [3549]
    
    Date/Time:           2025-02-13 12:22:54.0737 -0500
    Launch Time:         2025-02-13 12:22:53.6455 -0500
    OS Version:          iPhone OS 18.3 (22D63)
    Release Type:        User
    Baseband Version:    3.40.03
    Report Version:      104
    
    Exception Type:  EXC_CRASH (SIGABRT)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Termination Reason: SIGNAL 6 Abort trap: 6
    Terminating Process: FlatRateJobTracker [5835]
    
    Triggered by Thread:  0
    
    Application Specific Information:
    abort() called
    
    
    Thread 0 name:   Dispatch queue: com.apple.main-thread
    Thread 0 Crashed:
    0   libsystem_kernel.dylib        	       0x1d5a472d4 __pthread_kill + 8
    1   libsystem_pthread.dylib       	       0x20f0a159c pthread_kill + 267
    2   libsystem_c.dylib             	       0x18c160b08 abort + 127
    3   libc++abi.dylib               	       0x20efc75b8 abort_message + 131
    4   libc++abi.dylib               	       0x20efb5ad4 demangling_terminate_handler() + 131
    5   libc++abi.dylib               	       0x20efc687c std::__terminate(void (*)()) + 15
    6   libc++abi.dylib               	       0x20efc67d8 std::terminate() + 35
    7   libdispatch.dylib             	       0x18c0a6fbc _dispatch_client_callout + 39
    8   libdispatch.dylib             	       0x18c0aa9f0 _dispatch_block_invoke_direct + 283
    9   FrontBoardServices            	       0x19de39378 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 51
    10  FrontBoardServices            	       0x19de392f8 -[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible] + 239
    11  FrontBoardServices            	       0x19de391d0 -[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource] + 27
    12  CoreFoundation                	       0x184358f4c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 27
    13  CoreFoundation                	       0x184358ee0 __CFRunLoopDoSource0 + 175
    14  CoreFoundation                	       0x18435bb40 __CFRunLoopDoSources0 + 243
    15  CoreFoundation                	       0x18435ad3c __CFRunLoopRun + 839
    16  CoreFoundation                	       0x1843ad284 CFRunLoopRunSpecific + 587
    17  GraphicsServices              	       0x1d16194c0 GSEventRunModal + 163
    18  UIKitCore                     	       0x186ef6674 -[UIApplication _run] + 815
    19  UIKitCore                     	       0x186b1ce88 UIApplicationMain + 339
    20  FlatRateJobTracker            	       0x1010dd058 0x100c3c000 + 4853848
    21  FlatRateJobTracker            	       0x101127f00 0x100c3c000 + 5160704
    22  FlatRateJobTracker            	       0x10169d470 0x100c3c000 + 10884208
    23  dyld                          	       0x1aa605de8 start + 2723
    
    Thread 1:
    0   libsystem_pthread.dylib       	       0x20f09a46c start_wqthread + 0
    
    Thread 2:
    0   libsystem_pthread.dylib       	       0x20f09a46c start_wqthread + 0
    
    Thread 3:
    0   libsystem_kernel.dylib        	       0x1d5a3c788 mach_msg2_trap + 8
    1   libsystem_kernel.dylib        	       0x1d5a3fe98 mach_msg2_internal + 79
    2   libsystem_kernel.dylib        	       0x1d5a3fdb0 mach_msg_overwrite + 423
    3   libsystem_kernel.dylib        	       0x1d5a3fbfc mach_msg + 23
    4   FlatRateJobTracker            	       0x100c66940 0x100c3c000 + 174400
    5   libsystem_pthread.dylib       	       0x20f09a7d0 _pthread_start + 135
    6   libsystem_pthread.dylib       	       0x20f09a480 thread_start + 7
    
    Thread 4:
    0   libsystem_pthread.dylib       	       0x20f09a46c start_wqthread + 0
    
    Thread 5 name:   Dispatch queue: com.apple.mobileassetd.v2.maxpcmanager.state
    Thread 5:
    0   libsystem_kernel.dylib        	       0x1d5a3c788 mach_msg2_trap + 8
    1   libsystem_kernel.dylib        	       0x1d5a3fe98 mach_msg2_internal + 79
    2   libsystem_kernel.dylib        	       0x1d5a3fdb0 mach_msg_overwrite + 423
    3   libsystem_kernel.dylib        	       0x1d5a3fbfc mach_msg + 23
    4   libdispatch.dylib             	       0x18c0c1f4c _dispatch_mach_send_and_wait_for_reply + 543
    5   libdispatch.dylib             	       0x18c0c22ec dispatch_mach_send_with_result_and_wait_for_reply + 59
    6   libxpc.dylib                  	       0x20f0f4870 xpc_connection_send_message_with_reply_sync + 255
    7   MobileAsset                   	       0x1b3f5345c __73-[MAXpcManager sendSync:gettingResponseCode:codeForXpcError:loggingName:]_block_invoke + 123
    8   libdispatch.dylib             	       0x18c0a6fa8 _dispatch_client_callout + 19
    9   libdispatch.dylib             	       0x18c0b6c2c _dispatch_sync_invoke_and_complete_recurse + 63
    10  libdispatch.dylib             	       0x18c0b66b0 _dispatch_sync_f_slow + 175
    11  MobileAsset                   	       0x1b3f55888 -[MAXpcManager sendSync:gettingResponseCode:codeForXpcError:loggingName:] + 251
    12  MobileAsset                   	       0x1b3f55638 -[MAAssetQuery queryMetaDataSync] + 603
    13  DataDeliveryServices          	       0x1e59d0798 -[DDSMobileAssetv2Provider assetsInCalalogForQuery:errorPtr:] + 207
    14  DataDeliveryServices          	       0x1e59cf944 -[DDSMobileAssetv2Provider assetsForQuery:errorPtr:] + 151
    15  DataDeliveryServices          	       0x1e59ceda0 -[DDSAssetCenter assetsForQuery:error:] + 291
    16  LinguisticData                	       0x214278210 0x214277a61 + 1967
    17  LinguisticData                	       0x214275294 0x2142750b1 + 483
    18  LinguisticData                	       0x214277464 0x214277401 + 99
    19  LinguisticData                	       0x214274e88 LDEnumerateAssetDataItems + 327
    20  Lexicon                       	       0x19f89b7b8 0x19f89b689 + 303
    21  Lexicon                       	       0x19f84b204 0x19f84b05d + 423
    22  Lexicon                       	       0x19f7e4924 LXLexiconCreate + 107
    23  ProofReader                   	       0x20e49bbec -[PRLexicon initWithLocalization:unigramsPath:cachedOnly:] + 227
    24  ProofReader                   	       0x20e49bf20 +[PRLexicon lexiconWithLocalization:unigramsPath:cachedOnly:] + 51
    25  ProofReader                   	       0x20e4985c8 __80-[AppleSpell(Lexicon) _loadLexiconsForLanguage:localization:cachedOnly:onQueue:]_block_invoke_2 + 79
    26  libdispatch.dylib             	       0x18c0a6fa8 _dispatch_client_callout + 19
    27  libdispatch.dylib             	       0x18c0b67fc _dispatch_lane_barrier_sync_invoke_and_complete + 55
    28  ProofReader                   	       0x20e498430 -[AppleSpell(Lexicon) _loadLexiconsForLanguage:localization:cachedOnly:onQueue:] + 387
    29  ProofReader                   	       0x20e498b58 __53-[AppleSpell(Lexicon) _lexiconsForLanguage:loadType:]_block_invoke_3 + 51
    30  libdispatch.dylib             	       0x18c0a5248 _dispatch_call_block_and_release + 31
    31  libdispatch.dylib             	       0x18c0a6fa8 _dispatch_client_callout + 19
    32  libdispatch.dylib             	       0x18c0ae5cc _dispatch_lane_serial_drain + 767
    33  libdispatch.dylib             	       0x18c0af124 _dispatch_lane_invoke + 379
    34  libdispatch.dylib             	       0x18c0ba38c _dispatch_root_queue_drain_deferred_wlh + 287
    35  libdispatch.dylib             	       0x18c0b9bd8 _dispatch_workloop_worker_thread + 539
    36  libsystem_pthread.dylib       	       0x20f09c680 _pthread_wqthread + 287
    37  libsystem_pthread.dylib       	       0x20f09a474 start_wqthread + 7
    
    Thread 6:
    0   libsystem_pthread.dylib       	       0x20f09a46c start_wqthread + 0
    
    Thread 7 name:   Dispatch queue: com.apple.UIKit.KeyboardManagement
    Thread 7:
    0   libsystem_kernel.dylib        	       0x1d5a42bd0 __ulock_wait + 8
    1   libdispatch.dylib             	       0x18c0a7998 _dlock_wait + 55
    2   libdispatch.dylib             	       0x18c0a774c _dispatch_thread_event_wait_slow + 55
    3   libdispatch.dylib             	       0x18c0b6ae8 __DISPATCH_WAIT_FOR_QUEUE__ + 367
    4   libdispatch.dylib             	       0x18c0b6694 _dispatch_sync_f_slow + 147
    5   UIKitCore                     	       0x186ef848c __37-[_UIRemoteKeyboards startConnection]_block_invoke_3 + 143
    6   CoreFoundation                	       0x184314e34 __invoking___ + 147
    7   CoreFoundation                	       0x184313e7c -[NSInvocation invoke] + 427
    8   Foundation                    	       0x182fa0ae0 __NSXPCCONNECTION_IS_CALLING_OUT_TO_EXPORTED_OBJECT__ + 15
    9   Foundation                    	       0x182f9f514 -[NSXPCConnection _decodeAndInvokeReplyBlockWithEvent:sequence:replyInfo:] + 531
    10  Foundation                    	       0x182fa253c __88-[NSXPCConnection _sendInvocation:orArguments:count:methodSignature:selector:withProxy:]_block_invoke_5 + 187
    11  libxpc.dylib                  	       0x20f103b80 _xpc_connection_reply_callout + 115
    12  libxpc.dylib                  	       0x20f0f62d0 _xpc_connection_call_reply_async + 79
    13  libdispatch.dylib             	       0x18c0a7028 _dispatch_client_callout3 + 19
    14  libdispatch.dylib             	       0x18c0c4b64 _dispatch_mach_msg_async_reply_invoke + 339
    15  libdispatch.dylib             	       0x18c0ae42c _dispatch_lane_serial_drain + 351
    16  libdispatch.dylib             	       0x18c0af158 _dispatch_lane_invoke + 431
    17  libdispatch.dylib             	       0x18c0ba38c _dispatch_root_queue_drain_deferred_wlh + 287
    18  libdispatch.dylib             	       0x18c0b9bd8 _dispatch_workloop_worker_thread + 539
    19  libsystem_pthread.dylib       	       0x20f09c680 _pthread_wqthread + 287
    20  libsystem_pthread.dylib       	       0x20f09a474 start_wqthread + 7
    
    Thread 8 name:  com.apple.uikit.eventfetch-thread
    Thread 8:
    0   libsystem_kernel.dylib        	       0x1d5a3c788 mach_msg2_trap + 8
    1   libsystem_kernel.dylib        	       0x1d5a3fe98 mach_msg2_internal + 79
    2   libsystem_kernel.dylib        	       0x1d5a3fdb0 mach_msg_overwrite + 423
    3   libsystem_kernel.dylib        	       0x1d5a3fbfc mach_msg + 23
    4   CoreFoundation                	       0x18435b804 __CFRunLoopServiceMachPort + 159
    5   CoreFoundation                	       0x18435aeb0 __CFRunLoopRun + 1211
    6   CoreFoundation                	       0x1843ad284 CFRunLoopRunSpecific + 587
    7   Foundation                    	       0x182f130e8 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 211
    8   Foundation                    	       0x18306fbb0 -[NSRunLoop(NSRunLoop) runUntilDate:] + 63
    9   UIKitCore                     	       0x186f89a78 -[UIEventFetcher threadMain] + 419
    10  Foundation                    	       0x182ffef30 __NSThread__start__ + 723
    11  libsystem_pthread.dylib       	       0x20f09a7d0 _pthread_start + 135
    12  libsystem_pthread.dylib       	       0x20f09a480 thread_start + 7
    
    Thread 9:
    0   libsystem_pthread.dylib       	       0x20f09a46c start_wqthread + 0
    
    Thread 10:
    0   libsystem_pthread.dylib       	       0x20f09a46c start_wqthread + 0
    
    Thread 11:
    0   libsystem_pthread.dylib       	       0x20f09a46c start_wqthread + 0
    
    Thread 12:
    0   libsystem_pthread.dylib       	       0x20f09a46c start_wqthread + 0
    
    Thread 13:
    0   libsystem_pthread.dylib       	       0x20f09a46c start_wqthread + 0
    
    Thread 14:
    0   libsystem_pthread.dylib       	       0x20f09a46c start_wqthread + 0
    
    
    Thread 0 crashed with ARM Thread State (64-bit):
        x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
        x4: 0x000000020efcbee4   x5: 0x000000016f1c2570   x6: 0x000000000000006e   x7: 0x0000000301000360
        x8: 0x07fe695f0749afdd   x9: 0x07fe695eebd137dd  x10: 0x0000000000000064  x11: 0x000000016f1c20a0
       x12: 0x0000000000000008  x13: 0x000000020efcbf66  x14: 0x00000000ffffffcb  x15: 0x00000000000007fb
       x16: 0x0000000000000148  x17: 0x00000001ec989800  x18: 0x0000000000000000  x19: 0x0000000000000006
       x20: 0x0000000000000103  x21: 0x00000001ec9898e0  x22: 0x0000000000000000  x23: 0x00000001ec9898e0
       x24: 0x0000000103918010  x25: 0x0000000000000000  x26: 0x0000000000000000  x27: 0x0000000000000000
       x28: 0x00000000211200d5   fp: 0x000000016f1c24e0   lr: 0x000000020f0a159c
        sp: 0x000000016f1c24c0   pc: 0x00000001d5a472d4 cpsr: 0x40001000
       far: 0x0000000000000000  esr: 0x56000080  Address size fault
    
    Binary Images:
           0x100c3c000 -        0x101ab7fff FlatRateJobTracker arm64  <9aa9ffc01fc33775abffa622cbc72f0a> /private/var/containers/Bundle/Application/0A97B18F-C59A-4747-B1FF-DC958AAF3205/FlatRateJobTracker.app/FlatRateJobTracker
           0x102af0000 -        0x102afbfff libobjc-trampolines.dylib arm64e  <4aba9420e4d03c989d62c653b259eab4> /private/preboot/Cryptexes/OS/usr/lib/libobjc-trampolines.dylib
           0x1d5a3b000 -        0x1d5a74fe3 libsystem_kernel.dylib arm64e  <881fe934759c3089b98660344cb843e3> /usr/lib/system/libsystem_kernel.dylib
           0x20f099000 -        0x20f0a5ff3 libsystem_pthread.dylib arm64e  <6f6e49251fb43a0b99d26bd8b7b1a148> /usr/lib/system/libsystem_pthread.dylib
           0x18c0e9000 -        0x18c168ffb libsystem_c.dylib arm64e  <400d888f854833fc802ff29678681197> /usr/lib/system/libsystem_c.dylib
           0x20efb4000 -        0x20efcefff libc++abi.dylib arm64e  <93fe31d773fb338eb696211de65fd7ed> /usr/lib/libc++abi.dylib
           0x18c0a3000 -        0x18c0e8fff libdispatch.dylib arm64e  <c05e486d81f2367e9ce1e14573c4c268> /usr/lib/system/libdispatch.dylib
           0x19de21000 -        0x19def4fff FrontBoardServices arm64e  <8ae153d7d76135c9b0ce3590d954943a> /System/Library/PrivateFrameworks/FrontBoardServices.framework/FrontBoardServices
           0x1842e5000 -        0x184828fff CoreFoundation arm64e  <0013a8b125243534b5ba681aaf18c798> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
           0x1d1618000 -        0x1d1620fff GraphicsServices arm64e  <3eca7962867b3029adc8bbe100f85ba5> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
           0x186b08000 -        0x188a20fff UIKitCore arm64e  <8cc54497f7ec3903ae5aa274047c0cf1> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
           0x1aa5d6000 -        0x1aa659137 dyld arm64e  <a770ff8c8fb93e0385fe7f26db36812b> /usr/lib/dyld
                   0x0 - 0xffffffffffffffff ??? unknown-arch  <00000000000000000000000000000000> ???
           0x20f0e4000 -        0x20f12bfff libxpc.dylib arm64e  <527f7127958632c89d8b2972d39ead7a> /usr/lib/system/libxpc.dylib
           0x1b3f50000 -        0x1b4013fff MobileAsset arm64e  <2a323bcd82f634ebab914de4e47009d4> /System/Library/PrivateFrameworks/MobileAsset.framework/MobileAsset
           0x1e59cc000 -        0x1e5a03fff DataDeliveryServices arm64e  <ba74d90aaba03a72976bef43b37efd1d> /System/Library/PrivateFrameworks/DataDeliveryServices.framework/DataDeliveryServices
           0x214270000 -        0x214279fff LinguisticData arm64e  <e092fc0f81c53622b7d0cd731def056a> /System/Library/PrivateFrameworks/LinguisticData.framework/LinguisticData
           0x19f7df000 -        0x19f8deffb Lexicon arm64e  <d54ae8c4d31d3fe09056def596bf7594> /System/Library/PrivateFrameworks/Lexicon.framework/Lexicon
           0x20e440000 -        0x20e525fff ProofReader arm64e  <b4b8fc64253d343da89a7ac54f28ea71> /System/Library/PrivateFrameworks/ProofReader.framework/ProofReader
           0x182ee9000 -        0x183c19fff Foundation arm64e  <e2f95328659e3c0197f752b5b3bb7aa5> /System/Library/Frameworks/Foundation.framework/Foundation
    
    EOF

    Thanks for any help.


  3. Tring to get my D12 CE installed and new install i get

    [PAClient Error] Error: E6664 /* com.apple.actool.errors */
    [PAClient Error] Error: E6664 /Users/grantfullen/PAServer/scratch-dir/Grant-macBookPRo/Project1.launchscreen/Assets: error: The operation couldn’t be completed. Failed to locate any simulator runtime matching options: {
    [PAClient Error] Error: E6664     BuildVersionString = 21F77;
    [PAClient Error] Error: E6664     Platforms =     (
    [PAClient Error] Error: E6664         "com.apple.platform.iphonesimulator"
    [PAClient Error] Error: E6664     );
    [PAClient Error] Error: E6664     VersionString = "17.5";
    [PAClient Error] Error: E6664 }
    [PAClient Error] Error: E6664     Failure Reason: Failed to locate any simulator runtime matching options: {
    [PAClient Error] Error: E6664     BuildVersionString = 21F77;
    [PAClient Error] Error: E6664     Platforms =     (
    [PAClient Error] Error: E6664         "com.apple.platform.iphonesimulator"
    [PAClient Error] Error: E6664     );
    [PAClient Error] Error: E6664     VersionString = "17.5";
    [PAClient Error] Error: E6664 }
    [PAClient Error] Error: E6664 /* com.apple.actool.compilation-results */
    [PAClient Error] Error: E6664 /Users/grantfullen/PAServer/scratch-dir/Grant-macBookPRo/Project1.app/AppIcon60x60@2x.png
    [PAClient Error] Error: E6664 /Users/grantfullen/PAServer/scratch-dir/Grant-macBookPRo/Project1.app/AppIcon76x76@2x~ipad.png
    [PAClient Error] Error: E6664 /Users/grantfullen/PAServer/scratch-dir/Grant-macBookPRo/Project1.launchscreen/partial_info.plist

    any help is very much appreciated. THis mac stuff is not what i am use to.


  4. I been testing my app on newer android phones. 

    I have a galaxy s7 android 8.0.0  .

    When I try to use the camara the app crashes.

    procedure TForm1.Image1Click(Sender: TObject);
    var
      Service: IFMXCameraService;
      Params: TParamsPhotoQuery;
    
    begin
           ClearUIInputs;
      if TPlatformServices.Current.SupportsPlatformService(IFMXCameraService,
        Service) then
      begin
        Params.Editable := True;
        Params.NeedSaveToAlbum := False;  // Specifies whether to save a picture to device Photo Library
        Params.RequiredResolution := TSize.Create(320, 320);
        Params.OnDidFinishTaking := DoDidFinish;
        Service.TakePhoto(Image1, Params);
      end
      else
        ShowMessage('This device does not support the camera service');
    
    end;
    MobilePermissions1.Dangerous.ReadExternalStorage := True;
      MobilePermissions1.Dangerous.WriteExternalStorage := True;
      MobilePermissions1.Dangerous.CAMERA := True;
      MobilePermissions1.Standard.AccessNetworkState := True;
    
      MobilePermissions1.Apply;

    This works fine on the newer android versions.  Anyone have any thoughts. 

    Thanks for any comments and help.


  5. well on android in debug i got

    constructor TIdSSLContext.Create;
    begin
      inherited Create;
      //an exception here probably means that you are using the wrong version
      //of the openssl libraries. refer to comments at the top of this file.
      if not LoadOpenSSLLibrary then begin
        raise EIdOSSLCouldNotLoadSSLLibrary.Create(RSOSSLCouldNotLoadSSLLibrary);
      end;
      fVerifyMode := [];
      fMode := sslmUnassigned;
      fSessionId := 1;
    end;

     

    I will have to check this out


  6. Thanks for all comments and corrected code .

     

    Remy I was using (nil)  and trying to take care of freeing the objects.

     

    I noticed you used (smpt)

     

    what advantage is there to doing it that way. 

    Thanks i am trying to learn

     

     

     

    I am trying to use this code but

     

    on ios 

    ios.thumb.jpg.b2a094aaa7731183fbc4b95ab35421d7.jpg

     

    and android 

    and.thumb.jpg.3fbaf94fa0c3c1fac2a39d86870308f4.jpg


  7. i am using Delphi 11CE

     

    I am trying to send a basic email with indy;

    procedure SendTestEmail2;
    var
      SMTP: TIdSMTP;
      Message: TIdMessage;
      SSLHandler: TIdSSLIOHandlerSocketOpenSSL;
    begin
      SMTP := TIdSMTP.Create(nil);
      Message := TIdMessage.Create(nil);
      //SSLHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
      SSLHandler.SSLOptions.Method := sslvTLSv1_2;  // or sslvTLSv1, sslvTLSv1_1, etc.
    
      try
        SSLHandler.SSLOptions.Method := sslvTLSv1_2;
        SSLHandler.SSLOptions.Mode := sslmUnassigned;
        SSLHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
    
        SMTP.IOHandler := SSLHandler;
        SMTP.Host := 'smtp.gmail.com';
    
        SMTP.Port := 465;  // or 465, depending on your server
        SMTP.UseTLS := utUseExplicitTLS;  // or utUseImplicitTLS
    
        SMTP.Username := 'UserName';
        SMTP.Password := 'Pass';
    
        Message.From.Address := 'men@gmail.com';
        Message.Recipients.EMailAddresses := 'grantful@yahoo.com';
        Message.Subject := 'Test Subject';
        Message.Body.Add('Test message.');
    
        try
          SMTP.Connect;
          SMTP.Send(Message);
        except
          on E: Exception do
          begin
            ShowMessage('Error: ' + E.Message);
          end;
        end;
      finally
        SMTP.Free;
        Message.Free;
        SSLHandler.Free;
      end;
    end;

    Never worked with indy before .  

    on the android phone i get Error Sending Email External exception 4e

    on my iphone i get error Sending Email: acces violation  at address0000000000104b-d0788

    Thanks for any help and or point me to a working example.


  8. I have a sqlite database file( app.s3db)  in my app i wold like to send with share sheet to back up to email ,etc .

     

    I am working on a class to do this but have an error.

     

    unit ShareDatabaseFile;
    
    interface
    
    uses
      System.SysUtils, System.Classes, FMX.Types, FMX.Controls,
      FMX.MediaLibrary.Actions, FMX.Dialogs, FMX.ActnList;
    
    type
      TDatabaseFileSharer = class(TComponent)
      private
        FShareSheet: TShowShareSheetAction;
        FActionList: TActionList;
        procedure DoBeforeExecute(Sender: TObject); // Declaration
      public
        constructor Create(AOwner: TComponent); override;
        destructor Destroy; override;
        procedure ShareDatabaseFile;
      end;
    
    implementation
    
    uses
      System.IOUtils;
    
    { TDatabaseFileSharer }
    
    constructor TDatabaseFileSharer.Create(AOwner: TComponent);
    begin
      inherited;
      FActionList := TActionList.Create(Self);
    
      FShareSheet := TShowShareSheetAction.Create(Self);
      FShareSheet.ActionList := FActionList;
      FShareSheet.OnBeforeExecute := DoBeforeExecute;  // Assignment
    end;
    
    destructor TDatabaseFileSharer.Destroy;
    begin
      FShareSheet.Free;
      FActionList.Free;
      inherited;
    end;
    
    procedure TDatabaseFileSharer.DoBeforeExecute(Sender: TObject);  // Implementation
    var
      DatabaseFilePath: string;
    begin
      DatabaseFilePath := TPath.Combine(TPath.GetDocumentsPath, 'mydatabase.db');
      if TFile.Exists(DatabaseFilePath) then
      begin
        FShareSheet.SharedFileName := DatabaseFilePath;
    
      end
      else
      begin
        ShowMessage('Database file not found.');
        Abort;
      end;
    end;
    
    procedure TDatabaseFileSharer.ShareDatabaseFile;
    begin
      FShareSheet.ExecuteTarget(nil);
    end;
    
    end.

     I am getting undeclared identifier

     

    procedure TDatabaseFileSharer.DoBeforeExecute(Sender: TObject);  // Implementation
    var
      DatabaseFilePath: string;
    begin
      DatabaseFilePath := TPath.Combine(TPath.GetDocumentsPath, 'mydatabase.db');
      if TFile.Exists(DatabaseFilePath) then
      begin
        FShareSheet.SharedFileName := DatabaseFilePath;
    
      end
      else
      begin
        ShowMessage('Database file not found.');
        Abort;
      end;
    end;

    here is the error  FShareSheet.SharedFileName is the undeclared identifier. 

     

    so the .sharedFileName is the issue.

     

    i am looking in the FMX.MediaLibrary.Actions and can not see anything about the shared file name.

     

     

     

    Thanks for any help.


  9. Is there a way to back up my keychain and certificates and my project on the MacBook ?

     

    I am not familiar with a Mac just got one to compile Delphi apps

     

    I use git on windows to back up the Delphi project code

     

    just asking u guys to see if u have any tips or best practice for backing up the Mac with all the keychain ,certificates,ect

     

    Thanks for any suggestions 


  10. Hello all.

    I am trying to learn how to deploy an app to testflight for testing.

    I would like to use testflight to let my friends try my app.

     

    I have been looking around google, youtube  .

     

    Can anyone share how to deploy an app to testflight from delphi.

     

    Thanks for the advice.

×